# 输入一年份,判断该年份是否是闰年并输出结果。
# 注: 凡符合下面两个条件之一的年份是闰年。
# 1. 能被4整除但不能被100整除。
# 2. 能被400整除。

year = int(input("please enter the year: "))

if year % 4 == 0 and year % 100 > 0:
print("The %s is leap year" % year)
elif year % 400 == 0:
print("The %s is leap year" % year)
else:
print("The %s is NOT leap year" % year)

相关文章:

  • 2022-02-01
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-06-24
  • 2021-11-28
  • 2021-11-28
  • 2021-11-28
猜你喜欢
  • 2022-12-23
  • 2021-04-09
  • 2021-12-04
  • 2022-12-23
  • 2021-11-28
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案