It is given to you that on 1st January 2001 it was monday. Let's call a year as Geeky if the 1st January of that year happens to be on Sunday. You will be given two years 'a' and 'b'. The task is to find the no. of Geeky years between those two years (including 'a' and 'b' as well)
The first line of input contains an Integer T denoting the number of test cases. Then T test cases follow. Each test case consists of a single line containing two integer values denoting the two years 'a' and 'b'.
Corresponding to each test case, print the number of Geeky years for each interval in a new line.
1 <= T <= 1000
1000 <= a <= b <= 3000
If you have purchased any course from GeeksforGeeks then please ask your doubt on course discussion forum. You will get quick replies from GFG Moderators there.