FunctionRacerProblemsRace

Seconds to Clock

BeginnerMathPython, JavaScript, TypeScript, Java, C++

Convert a number of seconds into the text "H:MM:SS": hours with no leading zero (and no limit, 100 hours is "100"), then minutes and seconds as two digits each.

Example 1

seconds 3661
returns "1:01:01"

1 hour, 1 minute, 1 second: "1:01:01".

Constraints

Race itor take your time

Write it in your browser, against the clock. The model solution, stepped through line by line, comes after.

More Math problems