```python year = int(input("请输入年份:")) if year % 100 != 0 and year % 4 == 0 or year % 400 == 0: print("%d为闰年" % year) else: print("%d不是闰年" % year)
```