| # | Problem | Pass Rate (passed user / total user) |
|---|---|---|
| 12951 | Star Underscore Pyramid |
|
| 12952 | Integer to Binary Conversion |
|
| 12953 | Mother's Day |
|
Description
Write a C program that reads a positive integer
n>0, representing the number of lines, and then
prints the pattern shown in the sample I/O.
If the user’s input is invalid, output
“invalid\n”.
Input
Positive Integer
Output
Combination of "*" and "_"
Sample Input Download
Sample Output Download
Tags
Discuss
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.