11356 - Dates


Difficulty : easy

Solution Description :

Ad hoc simulation problem

This is an ad hoc/simulation question where it is required to find the date in the calendar after K days from the given date. Since K * number of test cases is small, it suffices to iterate through the valid dates incrementally (day by day) until the desired number of days has passed.

Do not forget about leap year
leap year February -> 29 days
other wise February->28 days