J |
Stopping
Doom’s Day Input: Standard Input Output: Standard Output |
So! The time of the universe is up and it is the dooms day
after five hours :-P, and you must stop it. But to do so you have to know the
value of the following expression T:
Because the secret code that will save the universe from
being doomed have something to do with the value of the above expression for
some value of n.
The input file contains 1000 lines of inputs.
Each line contains a single integer n (0<n≤2000000000).
A line containing a single zero terminates input.
For each line of input produce one
line of output. This line contains the value of T.
12 20 1001 0 |
2199 803 2390 |
Problem setter: Shahriar Manzoor,
Special Thanks: Derek Kisman