(Calculating Number of Seconds) Write a function that takes the time as three integer arguments (hours, minutes and seconds) and returns the number of seconds since the last time the clock “struck 12.” Use this function to calculate the amount of time in seconds between two times, both of which are within one 12-hour cycle of the clock.
The input consists of n (0<n<100) samples.
Each sample consists of two lines.
Each line of each sample consists of hours(ranges from 0 to 11), minutes(ranges from 0 to 59), seconds(ranges from 0 to 59)
The last line of input consists of Int(-1).
Output the amount of time in seconds between two times
输入
6 7 5
5 7 4
5 7 5
6 7 4
-1
输出
3601
3599