#K55092. Calculate Movie Duration
Calculate Movie Duration
Calculate Movie Duration
You are given time intervals in the format HH:MM. For each pair of times, compute the duration in minutes. If the end time is earlier than the start time, it is assumed that the end time is on the next day.
For example, if \(start = "23:45"\) and \(end = "01:15"\), the duration is calculated as \(90\) minutes.
Your task is to read multiple such pairs and output the corresponding durations.
inputFormat
The first line contains an integer \(N\) representing the number of test cases.
Each of the following \(N\) lines contains two strings separated by a space, representing the start and end times in HH:MM format.
outputFormat
For each test case, output a single integer on a new line denoting the duration (in minutes) between the start and end times.
## sample4
12:30 14:00
23:45 01:15
09:10 09:15
00:00 23:59
90
90
5
1439
</p>