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?
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 .
Print the time left in seconds on new line.
Current time is 13:06 and exam time is 14:02 which has 56 minutes in between. That is, 3360 seconds.