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 zfjrz at 2004-10-21 20:39:15 on Problem 1922
In Reply To:Re:哪位能看看,谢谢 Posted by:zfjrz at 2004-10-21 20:12:12
void main()
{

	int n;
	int Ut,min;
	int t,i,v;
		
	scanf("%d",&n);
	
	while (n!=0)
	{
			
	
		min=-1;
		Ut=16200;
		
		for (i=0;i<n;i++)
		{
			scanf("%d %d",&v,&t);
				if (t>=0 && v>0 && v<=40)
				{			
                    Ut=(int)ceil((double)16200/v+t);	
				    if (Ut<min || min==-1) 	min=Ut;
				}
		}
		printf("%d\n",min);
		scanf("%d",&n);
	}
	
}
是不是系统对数据类型的要求比较高啊?

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