Leap year
Xem dạng PDF
Gửi bài giải
C, C++, Java, Kotlin, Pascal, PyPy, Python, Scratch, TEXT
Điểm:
1,00 (OI)
Giới hạn thời gian:
1.0s
Giới hạn bộ nhớ:
256M
Dạng bài
Ngôn ngữ cho phép
Leap Year
A leap year is a year that has 366 days.
A year is a leap year if it is divisible by 4, except for years that are exactly divisible by 100. However, years divisible by 100 are still leap years if they are also exactly divisible by 400.
Given a year n, determine whether it is a leap year.
Input
The input contains a single integer n:
0 <= n <= 10^9
Output
Output YES if n is a leap year. Otherwise, output NO.
Example
Input
2016
Output
YES
Bình luận