Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
67192 陆宥呈 闰年的数量 Python3 Wrong Answer 30 MS 3760 KB 469 2024-03-15 18:30:35

Tests(0/10):


Code:

def isLeapYear(y): if y % 4 == 0: return True else: return False """ 返回True:是闰年,返回False:是平年 如果y年份是400的倍数,判定为闰年; 如果y年份是4的倍数且不是100的倍数,也判定为闰年; 上面2种情况不成立,则为平年 """ a,b= input().split() a,b=int(a),int(b) cnt =0 for y in range(a,b+1): if isLeapYear(y): cnt +=1 print(cnt)


Run Info:

------Input------
685 1586
------Answer-----
218
------Your output-----
225