| ||||||||||
| 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 | |||||||||
求教一下,为什么老是wa,快哭了.本来很有信心ac的#include <stdio.h>
int main()
{
long i,n;
double s,v,t,t0,time;
scanf("%ld",&n);
while(n){
time=900000000;
s=4500;
for(i=0;i<n;i++){
scanf("%lf%lf",&v,&t);
if(t>=0){
t0=s/(v/3.6)+t;
if(t0<time)
time=t0;
}
}
if(time-(long)time>0)
time+=1;
printf("%ld\n",(long)time);
scanf("%ld",&n);
}
return 0;
}
Followed by: Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator