CCC '16 J4 - Arrival Time


Submit solution

Points: 1
Time limit: 2.0s
Memory limit: 256M

Problem type
Allowed languages
C++, Python
HH:MM .

Sample Input 1

05:00

Output for Sample Input 1

07:00

Explanation for Output for Sample Input 1

Fiona does not encounter any rush-hour traffic, and leaving at 5am, she arrives at exactly 7am.

Sample Input 2

07:00

Output for Sample Input 2

10:30

Explanation for Output for Sample Input 2

Fiona drives for 3 hours in rush-hour traffic, but only travels as far as she normally would after driving for 1.5 hours. During the final 30 minutes (0.5 hours) she is driving in non-rush-hour traffic.

Sample Input 3

23:20

Output for Sample Input 3

01:20

Explanation for Output for Sample Input 3

Fiona leaves at 11:20pm, and with non-rush-hour traffic, it takes two hours to travel, so she arrives at 1:20am the next day.


Comments

There are no comments at the moment.