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

Re:哪位能看看,谢谢

Posted by zfjrz at 2004-10-19 11:05:09 on Problem 1922
In Reply To:哪位能看看,谢谢 Posted by:zfjrz at 2004-10-19 11:04:51
#include <stdio.h>
#include <math.h>


void main()
{

	long n;
	long Ut,min;
	int t,i,v;
	
	const L=4500;
	scanf("%ld",&n);
	
	while (n!=0)
	{
			
	
		min=-1;
		Ut=4500;
		
		for (i=0;i<n;i++)
		{
			scanf("%d\t%d",&v,&t);
				if (t>=0 && v>=0 && v<=40)
							Ut=(int)ceil(L/(v/3.6)+t);
						
				
				if (Ut<min || min==-1) 	min=Ut;
		}
		printf("%ld\n",min);
		scanf("%ld",&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