1 # 普通方法 2 year = int(input('请输入年份:')) 3 month = int(input('请输入月份(1~12):')) 4 if month == 2: 5 if year % 4 == 0 and year % 100 != 0