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

Locomotive Very Very Very Simple [4] // Problem 1194. Handshakes 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
Caesar11 Re: Very Very Very Simple // Problem 1194. Handshakes 4 Nov 2011 09:21
n(n-1)/2-k。。。
BillSu Re: Very Very Very Simple // Problem 1194. Handshakes 27 Apr 2014 10:30
What is The Autor Thinking?
What's the meaning of the spliting group numbers?
It just piss me off.
bstu_student Re: Very Very Very Simple // Problem 1194. Handshakes 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;)