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

有没有搞错?!!我这样都会超时而不是wa!!

Posted by ferrettemp at 2005-03-15 19:21:01 on Problem 2210
#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:
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