Go Back
Time Never Stops (0)
Description

Mithil has used up a lot of his time coding. Now he has realised he is running out of time for exam preparation! Mithil has calculated some geeky stuff and says he could probably fix it all! He wants to be very precise here, can you help him know the exact amount of time (in seconds) left for the exam to start?

Input

First line consist of number of test cases. Each case will have current time and exam time on 2 lines. Time is in 24 hours format HH:MM .

Output

Print the time left in seconds on new line.

Constraints

0<=HH<=24
0<=MM<=60

Example
Copy Input

Input:
1
13:06
14:02
Output:
3360

Explanation

Current time is 13:06 and exam time is 14:02 which has 56 minutes in between. That is, 3360 seconds.

Universe
Contest open for 1 year with playlists problems



Announcement


Supported by our Coding Partner