Submit | All submissions | Best solutions | Back to list |
RPLF - Fast Schedule |
Rodolfo is preparing for an important programming contest, but he have a disorganized schedule, he hasn't organized his day and he's going desperate on the task, he says to you “Man, I spend K minutes on every activity I start in the morning, can you help me with the ending hour of the activity?”
It is known that Rodolfo's day start every single day at 9 o'clock, some activities started by Rodolfo can have a duration of more than the 24 normal hours of a day! So, beware of this. For example, if Rodolfo's activities lasts for twenty minutes, then Rodolfo will end his activities at 09:20.
Input
The first line of input will contain an integer T denoting the T test cases, then T lines will follow. Each of the following line will contain a number N, this number means the minutes of duration of Rodolfo's activities.
Output
Output the string "Scenario #i: " where i is the test case you are analyzing followed by the ending hour of all Rodolfo's activities, format (hh:mm).
Constraints
0 <= N <= 10^8
Example
Input: 4 20 61 1441 240 Output: Scenario #1: 09:20 Scenario #2: 10:01 Scenario #3: 09:01 Scenario #4: 13:00
Added by: | david_8k |
Date: | 2012-05-05 |
Time limit: | 0.205s |
Source limit: | 50000B |
Memory limit: | 1536MB |
Cluster: | Cube (Intel G860) |
Languages: | All except: ASM64 |
Resource: | Own Problem used for the RPL contest |