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: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: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator