#C10853. Calculate Total Hours Worked
Calculate Total Hours Worked
Calculate Total Hours Worked
You are given a list of time intervals representing working periods during a day. Each time interval is provided in the format HH:MM
for both the start and end times. Your task is to calculate the total number of hours worked. The time difference for each interval should be computed as (\frac{\text{seconds}}{3600}) hours.
Note: The intervals do not overlap and the end time is always greater than or equal to the start time. If the start time and end time are the same, it represents 0 hours worked.
inputFormat
The input is read from standard input (stdin). The first line contains an integer (n) representing the number of time intervals. Each of the following (n) lines contains two strings separated by a space representing the start time and end time in the format "HH:MM".
outputFormat
Output the total number of hours worked as a floating point number on a single line to standard output (stdout).## sample
1
08:00 12:00
4.0