All Submissions


How many times does the minute hand and the hour hand intersect each other in the given time ?

Input
First line contains the number of test cases t. Each test case has two lines representing the start time and end time respectively. The time would be in format (hh:mm). hh will be between 00 and 23, mm will be between 00 and 59. If the minute and hour hand are overlapping right at the start time (like at 12:00) then it would not be counted. However, intersection at end time is counted .
(00:00 <= 'start time' < 'end time' <= 23:59).

Output:
For each test case print, on a separate line, the number of times they overlap each other.

SAMPLE INPUT
2

00:00
03:00

00:00
00:10


SAMPLE OUTPUT
2
0

Problem Setter : Sunny Lalwani
Problem Tester: Pushkar Anand

Languages: AWK,Bash,Brain,C,C++,Java,C#,JavaScript,Pascal,Perl,PHP,Python,Python3,Ruby,Text

Time Limit: 1 Second(s)
Score: 0 Point(s)
Input File Limit: 50000 Bytes

Submit

Login to post clarification.

No Clarifications.

Contest

Mode Judge

Passive

Online

Overall Rankings

RankNameScore
1xyz0
2Ams0
3TIP0
4team420
5xyzz0
6asdasdasd0
7abcd0
8khankhan0
9Gabriel0
10gigel0