Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
66907 胡海峰老师 闰年的数量 Python3 Accepted 32 MS 3780 KB 266 2024-03-11 15:18:48

Tests(10/10):


Code:

def is_leap_year(year): if year%400==0: return True if year%4==0 and year %100!=0: return True return False a,b = list(map(int,input().split())) cnt =0 for y in range(a,b+1): if is_leap_year(y): cnt +=1 print(cnt)