#135BeginnerOperators· Floor Division and Modulo
Seconds to Clock Time
Input format
`total_seconds`: a non-negative integer.
Output format
A string in the form `H:MM:SS`.
Examples
Input: total_seconds = 3661
Output: "1:01:01"
3661 seconds is 1 hour, 1 minute and 1 second.
Input: total_seconds = 59
Output: "0:00:59"
Less than a minute: 0 hours and 0 minutes.
Constraints
- 0 <= total_seconds <= 10^9
Study first
- #python
- #operators
- #floor-division
- #modulo
