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

Обсуждение задачи 1925. О заслуге британских учёных

F. British scientists save the world
Послано cplayer 27 окт 2012 15:27
Why the 2nd sample's answer is Big Bang?
Re: F. British scientists save the world
Послано Canko 27 окт 2012 15:29
But why realy?
I cant understand
Re: F. British scientists save the world
Послано Blackwizard 27 окт 2012 15:39
and could you please explain the first test too?
Re: F. British scientists save the world
Послано Dimitar Linov 27 окт 2012 15:42
Because the expected sum is 4+3-2*2(sum of the numbers shown on the screen+k-(n+1)*2) while the real sum is 6+x(the sum of the inputed numbers+the number YOU have to input), but they have to be equal:
4+3-2*2=6+x
7-4=6+x
x=-3, but the answer is non-negative, so it is "Big Bang!".
(in first sample you have 3+3+5+6+5+7+5-7*2 as the expected sum, and 1+1+3+5+5+2+x as the real sum:
3+3+5+6+5+7+5-7*2=1+1+3+5+5+2+x
34-14=17+x
x=20-17
x=3
)
X is the output number.
Or at least that is how i understood this problem.

edit: what is the limit of X???

Edited by author 27.10.2012 15:43
Re: F. British scientists save the world
Послано Blackwizard 27 окт 2012 15:53
Thanks for your answer!
Re: F. British scientists save the world
Послано BillSu 25 апр 2014 05:56
You answer is kick ass. How can you figure out something like that?
I check again and again, and it seems gibberish to me.
Re: F. British scientists save the world
Послано mr.sanatbek_94 22 мар 2015 20:22
I don't understand (n+1)*2. Can you tell me Why do you subtract (n+1)*2;
Re: F. British scientists save the world
Послано IlushaMax 24 мар 2016 02:00
Cause we subtracted 2        n+1 times