ENG  RUSTimus Online Judge
Online Judge
Задачи
Авторы
Соревнования
О системе
Часто задаваемые вопросы
Новости сайта
Форум
Ссылки
Архив задач
Отправить на проверку
Состояние проверки
Руководство
Регистрация
Исправить данные
Рейтинг авторов
Текущее соревнование
Расписание
Прошедшие соревнования
Правила
вернуться в форум

Обсуждение задачи 1194. Рукопожатия

Very Very Very Simple
Послано Locomotive 8 янв 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.
Послано Koala 23 авг 2003 16:40
Re: Very Very Very Simple
Послано Caesar11 4 ноя 2011 09:21
n(n-1)/2-k。。。
Re: Very Very Very Simple
Послано BillSu 27 апр 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
Послано bstu_student 6 авг 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;)