class Solution:
"""
@param year: a number year
@param month: a number month
@return: Given the year and the month, return the number of days of the month.
"""
def getTheMonthDays(self, year, month):
# write your code here
normal_months = [0,31,28,31,30,31,30,31,31,30,31,30,31]
leap_months = [0,31,29,31,30,31,30,31,31,30,31,30,31]
#判断是否闰年
def isLeapYear(year):
return year % 4 == 0 and (year % 100 != 0 or year % 400 == 0)
return leap_months[month] if isLeapYear(year) else normal_months[month]