12900 - Detecting Leap Year
|
Time |
Memory |
| Case 1 |
1 sec |
32 MB |
| Case 2 |
1 sec |
32 MB |
| Case 3 |
1 sec |
32 MB |
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. "
Tags