CJCoding With Joseph
15free / daySign inCreate account

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
Topics:
User InputOperators
📥 Auto-Input:
3661\n
This input is automatically fed to your program's stdin
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.