每次这个算法都去查,原因就是容易弄混那个逻辑,这次好了: 四年一闰,百年不闰,四百年再闰。 if (year能被4整除 and 不能被100整除) or year能被400整除 then 该年为闰年 else 该年为平年