fork download
  1. year = int(input("请输入年份:"))
  2. if (year % 4 == 0 and year % 100 != 0) or year % 400 == 0:
  3. print(f"{year}是闰年")
  4. else:
  5. print(f"{year}不是闰年")
Success #stdin #stdout 0.12s 14032KB
stdin
29
stdout
请输入年份:29不是闰年