Problems > Seconds to H:MM:SS > Editorial

Seconds to H:MM:SS — Solution & Editorial

Back to the Problem

Divide out hours (3600 s) and minutes (60 s); pad minutes and seconds to two digits.

Complexity: O(1)