25. Train Journey Timer

Acceptance — 0 accepted 0 submissions

Easy
BasicsFormattingMath
No companies listed
The railway display board shows journey time as HH:MM:SS. The system only stores the total number of seconds.

Given S seconds, convert it into hours, minutes and seconds, each shown with two digits.

Input Format
A single integer S.

Output Format
Print the time as HH:MM:SS with leading zeros, for example 01:05:09.

Constraints
• 0 ≤ S < 86400 (less than one day)

Example 1

Input
3909
Output
01:05:09

Explanation 3909 = 1 hour (3600) + 5 minutes (300) + 9 seconds, so 01:05:09.

Example 2

Input
59
Output
00:00:59

Explanation Less than a minute: 00:00:59.

Example 3

Input
86399
Output
23:59:59

Explanation The last second of the day: 23:59:59.

Acceptance —
Accepted 0
Submissions 0
Auto-save
Saved Ln 1, Col 1
Submit a solution to see its status here.
Input
Expected Output
01:05:09
No results yet
Run your code to test it against the sample cases.
Problem List