A Second Opinion
Question
Solution
Idea
To break this problem into several small problems:
Find the hours
Find the minutes
Find the seconds
For hours, we just need to use integer division /, hours = input secs / 3600. After we get the hours, substract it from our input secs.
Do the similar operation on minutes. The remaining are seconds.
Code
https://github.com/mendax1234/Coding-Problems/blob/main/kattis/secondopinion/secondopinion.c
Last updated