""" 输入年份和月份,输出这一年的这一月有多少天。需要考虑闰年。 """ year, month = map(int, input().split()) if (year % 4 == 0 and year % 100 != 0) or year % 400 == 0: if month == 1: print(31) elif month == 2: print(29) elif month == 3: print(31) elif month == 4: print(30) elif month == 5: print(31) elif month == 6: print(30) elif month == 7: print(31) elif month == 8: print(31) elif month == 9: print(30) elif month == 10: print(31) elif month == 11: print(30) elif month == 12: print(31) else: exit() else: if month == 1: print(31) elif month == 2: print(28) elif month == 3: print(31) elif month == 4: print(30) elif month == 5: print(31) elif month == 6: print(30) elif month == 7: print(31) elif month == 8: print(31) elif month == 9: print(30) elif month == 10: print(31) elif month == 11: print(30) elif month == 12: print(31) else: exit()
09-19
135
![](https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png)