| # | Problem | Pass Rate (passed user / total user) |
|---|---|---|
| 12899 | Calendar Calculation |
|
| 12900 | Detecting Leap Year |
|
Description
Write a program to input a date in year 2020 and calculate the number of days from 1/1/2020 to that date, inclusive.
Hint:
Your output needs a break line character "\n".
Input
M/D
Integer M (month) such that 1 <= M <= 12.
Integer D (day) such that 1 <= D <= 31.
Output
E
Integer E (difference in days) such that 1 <= D <= 366.
Sample Input Download
Sample Output Download
Tags
Discuss
Description
Write a program to determine if the input year is a leap year (閏年).
- Any year indivisible by 4 is a non-leap year.
- Any year divisible by 4 and indivisible by 100 is a leap year.
- Any year divisible by 100 and indivisible by 400 is a non-leap year.
- Any year divisible by 400 is a leap year.
Given a year. Please Write a C program to tell whether it is a leap year.
Input
An integer Y(year). Note that 1 <= Y <= 2600.
Output
"non-leap year. " or "leap year. "