So Since Since actually has a proper sleep schedule and doesn't sleep at 3 am likes to sleep, he sleeps earlier than does. However, this gives less time to discuss about the problem! And since they have to get the problem finished, she is debating whether she should start writing the problem, or wait for him to wake up to create his own idea to write the problem.
It is known that
is very slow at writing problems, so it would be better if wrote the problem as they would both be able to finish earlier. Given the time that it takes for to write one problem, the time that it takes for to write one problem, the amount of time that he sleeps for, and the current time, print the earliest possible time for them to get the problem done.Input Specification
The first line will contain , the amount of time in minutes it takes to think and write a problem, , the amount of time it takes for to write a problem, and , the amount of minutes that he sleeps for before waking up to actually doing something productive.
The next line will be in the format HH:MM
denoting the current time, in 24-hour clock time. , .
Output Specification
Output the time in which they will finish the problem, in HH:MM
format, in 24-hour clock time.
Sample Input 1
10 3 6
12:05
Sample Output 1
12:14
Sample Input 2
3 1 5
23:59
Sample Output 2
00:02
Comments