1204: 蓝桥每日一题200807:多少个闰年
Memory Limit:128 MB
Time Limit:1.000 S
Judge Style:Text Compare
Creator:
Submit:2
Solved:2
Description
2020年是闰年。输入一个数字n,代表未来的某个年份,请你计算一下,2020至n年之间,有多少个闰年。
满足下列两个条件之一即为闰年:能被4整除且不能被100整除;能被400整除。
满足下列两个条件之一即为闰年:能被4整除且不能被100整除;能被400整除。
Input
一个数字n(2020<n<9999)
Output
2020至n年之间的闰年个数,包括2020年和n年。
Sample Input Copy
2024
Sample Output Copy
2