| ||||||||||
| 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?帮帮忙。#include<stdio.h>
#include<stdlib.h>
main()
{
int i,n,v,t;
float temp1,temp2,fast=999999999;
while(scanf("%d",&n)==1)
{
if(n==0) exit(0);
for(i=0;i<n;i++)
{
scanf("%d %d",&v,&t);
if(t>0)
{
temp1=(4.5/v)*3600+t;
temp2=(4.5*3600)/v+t;
if(temp1>temp2) temp1=temp2+1;
if(temp1<fast) fast=temp1;
}
}
printf("%.f\n",fast);
}
}
Followed by:
Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator