Problem G
Parent Gap
In North America, and in many countries around the world, Mother’s Day is celebrated on the second Sunday in May, and Father’s Day is celebrated on the third Sunday in June. The interval between Mother’s Day and Father’s Day in any particular year, sometimes referred to as the parent gap, is always either $5$ weeks or $6$ weeks. For example, in $2022$ Mother’s Day was on May $8$ and Father’s Day was on June $19$, a parent gap of $6$ weeks, but in $2023$ Mother’s Day will be on May $14$ and Father’s Day will be on June $18$, a parent gap of only $5$ weeks.
Your task is to determine the parent gap for a given year. The following information may be helpful. In a year that is not a leap year, the months have the following number of days: January: $31$, February: $28$, March: $31$, April: $30$, May: $31$, June: $30$, July: $31$, August: $31$, September: $30$, October: $31$, November: $30$, December: $31$. In a leap year, February has an extra day (February $29^{\textrm{th}}$), and the Leap Year Rule is as follow: a year that is divisible by $4$ is a leap year, unless it is divisible by $100$, with the exception (to the exception) that a year that is divisible by $400$ is a leap year.
Input
Input consists of a single year, $y$ $(2\, 000 \leq y \leq 3\, 000)$.
Output
Output the parent gap for the input year, either “5 weeks” or “6 weeks”.
Sample Input 1 | Sample Output 1 |
---|---|
2022 |
6 weeks |
Sample Input 2 | Sample Output 2 |
---|---|
2023 |
5 weeks |