Problem C
Good Morning!
Good morning! This is your 5am wake-up call! A partly cloudy day is expected with light rain coming afternoon…
You have just woken up. You desperately need coffee… and… more coffee… and some cereal. And your clothes. And coffee.
To prepare warm cereal, you put some milk into a microwave,
trying to heat it for
![\includegraphics[width=0.4\textwidth ]{keypad.png}](/problems/goodmorning/file/statement/en/img-0001.png)
As you still haven’t had your coffee, your hand (along with eyes and brain) keeps falling down. You are only able to enter a number if your hand would only move downwards and/or to the right. You cannot go back left, nor move your hand up, though you can press the same key again. And again…and again…
For example, you can enter the number
Input
The first line of input contains the number of test cases
Each test case consists of one line containing an integer
Output
For each test case, output a number that is closest to
Sample Input 1 | Sample Output 1 |
---|---|
3 180 83 132 |
180 80 133 |