Submit | All submissions | Best solutions | Back to list |
EIEASY02 - Leap year |
A leap year is a year with 366 days, those years are divisible by 4 but not divisible by 100, or are divisible by 400. Given a list of years, output if they are lead year.
Input
+ The first line contains the number of testcases T (0 < T < 10^3)
+ Each line in the next T lines contains an integer which is the year to be checked (n > 0)
Output
For each year, out "YES" if the year is leap year, otherwise output "NO" (without a quote)
Example
Input:
4 2005 2012 1900 2000
Output:
NO YES NO YES
Added by: | Ha Minh Ngoc |
Date: | 2015-01-02 |
Time limit: | 1s |
Source limit: | 50000B |
Memory limit: | 1536MB |
Cluster: | Cube (Intel G860) |
Languages: | All except: NCSHARP GOSU JULIA PYPY3 |