← Back to User Input
Question 199
Seconds Into Hours Minutes Seconds
Seconds Into Hours Minutes Seconds
Read a number of seconds as a whole number and print it as hours, minutes and seconds separated by colons with no zero padding, so 3725 seconds prints as 1:2:5. Use floor division // by 3600 for the hours, the remainder operator % by 3600 for the seconds left after the hours, then // and % by 60 on that remainder for the minutes and the seconds. Input: one line, an integer, no prompt.
Expected Output:
1:1:1= newline. The output ends with a newline — print one after the last line.
Hints4 available
Sign in to use hintsTopics:
User InputOperators
1
Tab to indent (Esc then Tab to move on) · Ctrl+Enter to run · Ctrl+Space to expand shortcuts (pr, inp, def)
Your Output
Run your code to see the output here...
Test Cases
Run your code to see test case results.