
Fax McClad, Croneria's luckiest bounty hunter, is playing a guessing game with Flaco.
Flaco chooses an integer
Suppose Fax guesses
There are a lot of Moneys on the line, and the fewer the guesses Fax makes, the more Moneys he will win! Please help Fax to determine what Flaco's secret number is!
Interaction
This is an interactive problem.
Output guess n
to guess a number n
. This number should be between
When you are sure about your answer, output answer n
, where n
is your answer, and terminate.
If your answer is wrong, you will receive
Each time you output a number, make sure to output a new line \n
and flush your output buffers. You can use fflush(stdout)
in C++, System.out.flush();
in Java, or import sys; sys.stdout.flush()
in Python 2/3. For other languages, search in its documentation.
Sample Interaction
>>>
denotes your output; don't actually print this out.
>>> guess 5
5
>>> guess 3
7
>>> guess 14
4
>>> guess 10
0
>>> guess 11
1
>>> answer 10
Note that answer
does not count as a guess.
Comments