Online JudgeProblem SetAuthorsOnline ContestsUser
Web Board
Home Page
F.A.Qs
Statistical Charts
Problems
Submit Problem
Online Status
Prob.ID:
Register
Update your info
Authors ranklist
Current Contest
Past Contests
Scheduled Contests
Award Contest
User ID:
Password:
  Register

闰年的处理

Posted by szliuxf at 2006-03-08 00:54:37 on Problem 2210
处理 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:
User ID:
Password:
Title:

Content:

Home Page   Go Back  To top


All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator