core-algorithm icon indicating copy to clipboard operation
core-algorithm copied to clipboard

isLeapYear 可能是笔误,不过应该加上()

Open nonocoke opened this issue 6 years ago • 2 comments

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)

nonocoke avatar Jun 06 '18 23:06 nonocoke

thanks, you can apply a pull request

yidao620c avatar Jun 08 '18 06:06 yidao620c

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年不是闰年

pluieciel avatar Sep 21 '18 15:09 pluieciel