Clock after K Seconds
Submit solution
Points:
100
Time limit:
2.0s
Memory limit:
256M
Author:
Problem types
Allowed languages
C++, Python
A 24-hour clock currently shows \(h:m:s\). Advance it by \(k\) seconds.
Input
One line contains integers \(h,m,s,k\).
The input satisfies:
- \(0 <= h < 24\)
- \(0 <= m,s < 60\)
- \(0 <= k <= 10^9\)
Output
Print the resulting time as HH:MM:SS, using two digits for every field.
Example
Input
3 17 14 61
Output
03:18:15
Comments