|
Time |
Memory |
| Case 1 |
1 sec |
32 MB |
| Case 2 |
1 sec |
32 MB |
| Case 3 |
1 sec |
32 MB |
| Case 4 |
1 sec |
32 MB |
| Case 5 |
1 sec |
32 MB |
| Case 6 |
1 sec |
32 MB |
Description
- Write a program to input a year n and output out the Mother’s day (2nd Sunday of May) in that year.
- Your program must be able to show the Mother’s days in the past and in the future.
- We have 1582 < n ≤ 2147483647 (Hint: 1583/1/1 is Saturday.)
- If the user’s input is invalid, output “invalid\n”.
Input
Integer n, such that 1582 < n ≤ 2147483647
Output
M/D, such that M is tthe month and D the date.
Tags