Online Judge | Problem Set | Authors | Online Contests | User | ||||||
---|---|---|---|---|---|---|---|---|---|---|
Web Board Home Page F.A.Qs Statistical Charts | Current Contest Past Contests Scheduled Contests Award Contest |
Re:闰年的处理In Reply To:闰年的处理 Posted by:szliuxf at 2006-03-08 00:54:37 应该是 365*(year-2000)+(year-1997)/4-(year-2000)/100+(year-2000)/400; > 处理 0:0:0 1.1.2100, 看大家的算法好象是错的. 还是我错啦? > > 2000 - 2100 should have 25 leap years. > > total += 365*(year - 2000) + (year - 2000)/4 - (year - 2000)/100 + (year - 2000)/400; > will give 25 - 1 = 24. Followed by: Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator