92. Convert Time to Seconds
Foundation1000 ms256 MBSolved by 0%
A time record holds hours, minutes and seconds.
Read one time as h m s on a single line and print how many seconds have passed since
midnight.
Constraints - `0 ≤ h ≤ 23` - `0 ≤ m ≤ 59` - `0 ≤ s ≤ 59`
Input
A single line containing three integers h m s, separated by spaces.
Output
Print one integer, the number of seconds since midnight.
Input1 0 0
Output3600
Noteis exactly one hour
Input0 1 30
Output90
Noteis a minute and a half
Hints
Four rungs, in order. The last two open once you have submitted an attempt. A wrong one counts.
Hint 1Where to start
Hint 2The approachOpen hint 1 first. This one carries on from it.
Hint 3PseudocodeOpen hint 2 first. This one carries on from it.
Hint 4Full solutionOpen hint 3 first. This one carries on from it.