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:有没有搞错?!!我这样都会超时而不是wa!!In Reply To:有没有搞错?!!我这样都会超时而不是wa!! Posted by:ferrettemp at 2005-03-15 19:21:01 > #include <stdio.h> > void main() > { > int moban[2][13]={{0,31,28,31,30,31,30,31,31,30,31,30,31},{0,31,29,31,30,31,30,31,31,30,31,30,31}}; > __int64 year,month,day,hour,minute,second; > __int64 nian,yue,ri,xiaoshi,fen,miao,totle; > int k,runnian,t; > scanf("%d",&t); > while (t--) > { > totle=0; > scanf("%I64d:%I64d:%I64d %I64d.%I64d.%I64d",&hour,&minute,&second,&day,&month,&year); > for (k=2000;k<year;k++) > { > if (k%400==0||k%100!=0&&k%4==0) > totle+=366; > else totle+=365; > } > } > } Followed by: Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator