core-algorithm
core-algorithm copied to clipboard
isLeapYear 可能是笔误,不过应该加上()
def isLeapYear(year): # return (not year % 4 and year % 100) or (not year % 400) return (not (year % 4 and year % 100)) or (not year % 400)
thanks, you can apply a pull request
def isLeapYear(year):
return (not year % 4 and year % 100) or (not year % 400)
return (not (year % 4 and year % 100)) or (not year % 400)
原来的没错,1900年不是闰年