| ||||||||||
| 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>
#include<math.h>
void main()
{ int i,j,m,n;
int t,temp;
while(1){
scanf("%d",&i);
if(i==0) break;
t=temp=0;
for(j=0;j<i;j++)
{ scanf("%d%d",&m,&n);
if(n>=0) { temp=ceil(4500.0*3600.0/(float)m/1000.0+(float)n);
if(j==0) t=temp;
else t=temp>t?t:temp;
}
}
printf("%d\n",t);}}
Followed by:
Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator