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 1925. British Scientists Save the World

F. British scientists save the world
Posted by cplayer 27 Oct 2012 15:27
Why the 2nd sample's answer is Big Bang?
Re: F. British scientists save the world
Posted by Canko 27 Oct 2012 15:29
But why realy?
I cant understand
Re: F. British scientists save the world
Posted by Blackwizard 27 Oct 2012 15:39
and could you please explain the first test too?
Re: F. British scientists save the world
Posted by Dimitar Linov 27 Oct 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
Posted by Blackwizard 27 Oct 2012 15:53
Thanks for your answer!
Re: F. British scientists save the world
Posted by BillSu 25 Apr 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
Posted by mr.sanatbek_94 22 Mar 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
Posted by IlushaMax 24 Mar 2016 02:00
Cause we subtracted 2        n+1 times