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
Hint 1Approach
Hint 2Approach
Hint 3Pseudocode
Hint 4Full solution