输入四位数的年份,若不符合四位数,则输出错误,若为四位数,则判断该年份是否为闰年,并输出结果
year = int (input())
if (year // 10000 != 0 or year // 100 < 10):
print("error")
else:
if ((year % 4 == 0 and year % 100 != 0) or year % 400 == 0):
print("闰年");
else:
print("不是闰年");