ENG  RUSTimus Online Judge
Online Judge
Problems
Authors
Online contests
About Online Judge
Frequently asked questions
Site news
Webboard
Links
Problem set
Submit solution
Judge status
Guide
Register
Update your info
Authors ranklist
Current contest
Scheduled contests
Past contests
Rules
back to board

Discussion of Problem 1194. Handshakes

Very Very Very Simple
Posted by Locomotive 8 Jan 2003 14:45
every body handshakes all else his couple
so
n*(n-1) div 2
-
k (couples doesnt handshake eachother)!
-->

Var
  n,k:integer;
begin
  readln(n,k);
  writeln(((n*(n-1)) div 2) -k);
end.

Aidin_n7
it's not right to post the accepted program.
Posted by Koala 23 Aug 2003 16:40
Re: Very Very Very Simple
Posted by Caesar11 4 Nov 2011 09:21
n(n-1)/2-k。。。
Re: Very Very Very Simple
Posted by BillSu 27 Apr 2014 10:30
What is The Autor Thinking?
What's the meaning of the spliting group numbers?
It just piss me off.
Re: Very Very Very Simple
Posted by bstu_student 6 Aug 2019 04:13
Yep, this is the one way for solution.

I've met problem like that earlier. Statements consist kinda "you need to get very-very much operation with binary code of number", but after some tests we understood, that solution was kinda "ans = n*(-1)".

And it's good to have a short cut in problems for clever men;)