代码一
# encoding = utf-8
# 开发者:xxx
# 开发时间: 20:55
# "Stay hungry,stay foolish."
y = int(input())
is_leap_year = (y % 4 == 0 and y % 100 != 0) or (y % 400 == 0)
if is_leap_year:
print("yes")
else:
print("no")
简化代码
n = int(input())
is_leap_year = (n % 4 == 0 and n % 100 != 0) or (n % 400 == 0)
print('yes' if is_leap_year else 'no')