Leap Year
Time limit: 1.0s
Memory limit: 512M
Cho một năm Y. Hãy xác định năm đó có phải là năm nhuận hay không.
Input
- Một số nguyên
Y(\(1 \le Y \le 10^9\)).
Output
- In
YES.nếuYlà năm nhuận. - In
N0nếuYkhông phải là năm nhuận.
Sample 1
Input
2024
Output
YES.
Sample 2
Input
1900
Output
N0
Sample 3
Input
2000
Output
YES.
Code editor
Sign in to write and submit your solution.
Log in
Comments
SailFishOnTop=int(input()) n=SailFishOnTop if n%4==0: if n%400==0: print('YES') elif n%100==0: print('NO') else: print('YES') else: print('NO')