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:bergkamp at 2006-08-04 20:38:33 通常忘记考虑 260天,这个tzokin的年底最后一天 如果 t_year = total_day/260; t_month = (total_day%260)%13; if(t_month == 0) t_month =13; t_day = (total_day%260)%20; if(t_dy == 0) t_day=20; 但是这样无法处理total_day为260整数倍的情况 当total_day为260的整数倍时,会多出一年。 所以必须加上判断条件:if(total_day%260 == 0) t_year -= 1; Followed by: Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator