Watch
Time limit1sMemory limit1024 MB
Given the hour, minute, and second shown on a watch, print the time one second later in HH:MM:SS format.
- Level
Easy1 of 10
- Topics
- Implementation, Math
- Solved
- No attempts yet
Problem
Bajtazar is working on software for a new, very advanced watch. One of its functions is to display the current time. Every second, the display must change to the current time. For example, if the watch shows 17:08:50, after one second it should show 17:08:51. Bajtazar wants to check whether the watch changes its display correctly. Can you help him?
Write a program that reads the time currently shown on the watch, computes the time it should show one second later, and prints the result to standard output.
Input
The first line of the input contains three natural numbers H, M, and S (0 ≤ H ≤ 23, 0 ≤ M, S ≤ 59), separated by single spaces and without superfluous leading zeros. They are the hour, minute, and second shown by the watch.
Output
Print the time the watch should show one second later in the HH:MM:SS format.