
After a particularly bad ice storm, the central clock from the little town of Alert, Nunavut has frozen, and the hands no longer move.
Since the clock stopped, the locals have been using a stopwatch to determine the current time by adding the stopwatch's current time
Input Specification
The first line of input will contain the space-separated integers
The second line of input will contain the integer
Output Specification
Output the current time in 24-hour format, with the hours and minutes separated by a space.
Sample Input 1
Copy
11 59
2
Sample Output 1
Copy
12 1
Sample Input 2
Copy
12 0
61
Sample Output 2
Copy
13 1
Sample Input 3
Copy
23 58
5
Sample Output 3
Copy
0 3
Comments
I'm getting a time error on the 2nd part, anyone know why?
There is an O(1) solution...
WARNING:
The test cases used for this problem involve putting in the time not in the correct 24-hour format.
Ex: It will test the time "24 12", or "24 45".
Methinks that 100 test cases is slightly excessive, but who knows?