按照你的leap_year=((birthyear+19)-(birthyear-birthyear%4))/4;算法,可以简化成leap_year=(19+birthyear%4)/4;。但这个算法是错误的,因为闰年与年号有关,并非完全每4年一次。