Description
Counting Sundays
This problem is a programming version of Problem 19 from projecteuler.net
All the rest have thirty-one,
Which has twenty-eight, rain or shine.
And on leap years, twenty-nine.
A leap year occurs on any year evenly divisible by , but not on a century unless it is divisible by .
How many Sundays fell on the first of the month between two dates(both inclusive)? Input Format
The first line contains an integer , i.e., number of test cases.
Print the values corresponding to each test case.
Sample Input
Sample Output
Explanation
For testcase 1, we have the following sundays :-




Reviews
There are no reviews yet.