I pick a number. You guess it.
You can guess at most 25 times. For every guess you make, I will tell you if the number I picked is “Bigger” or “Smaller”. And, if you get it right, I will say “Bingo!”.
The number I will pick will be between 0 and 1000000.
In this problem, for every time you print an integer, you will receive one of the following as input (w/o quotes):
There will be at most 25 inputs for each of the 25 attempts you can make in this problem to guess the number.
Print at most 25 integers, one per line. Do not print anything after you have guessed the correct number (i.e. after you receive “Bingo!” as input).
Let’s imagine the number is 16. Here is what a possible interaction would look like.
< 5 > Bigger < 10 > Bigger < 20 > Smaller < 16 > Bingo!
> indicates what your program reads and
< indicates what your program writes. These symbols are here to make it easy to understand. You do not have to print such symbols from your program.
Your program prints 5. As a result, your program will receive “Bigger” as input. Your program then prints 10. As a result, your program will receive “Bigger” as input.
Your program then prints 20. As a result, your program will receive “Smaller” as input. Your program then prints 16. As a result, your program will receive “Bingo!”.