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 掉了,但自以为思路清晰,并且应该ACIn Reply To:帮我看一下吧,实在没办法了:(近乎哀求)wa 掉了,但自以为思路清晰,并且应该AC Posted by:iowyh at 2005-07-29 23:13:37 #include<stdio.h> #include<math.h> int main() { int n,i,min,t,v; double tt,vv,mmin,s; while(1) { scanf("%d",&n); if(n==0) break; min=65536; mmin=65536.0; for(i=1;i<=n;i++) { scanf("%d %d",&v,&t); tt=(double)t; vv=(double)v; if(tt>=0) { s=tt+(double)4500/(vv/3.6); if(s<mmin) mmin=s; } } min=(int)ceil(mmin); printf("%d\n",min); } return 0; } Followed by: Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator