Appointment Dates

1

1 votes
Easy-Medium
Problem

Rahul's Dad is the CEO of one of the leading companies. Every time somebody seeks for an appointment he calls up his secretary and asks her whether the day is a Sunday or not. He has to keep his caller on hold and is unhappy about it. Knowing that his son Mayank knows a bit of programming he asks him to make a program to help him find all the sundays in a given month of a specific year.

Input: The first Line contains t an integer, the number of test cases. The next t lines contain to integers first the year and then month.
Output: Output consists of t lines containing the dates of sundays in that particular month

Constraints : t<100000, month<=12, 2000<=year<=5000

Test cases updated.. You may submit now

Time Limit: 1
Memory Limit: 256
Source Limit:
Editor Image

?