| ||||||||||
| 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 | |||||||||
求指教,哪里出错了??附上代码,例题代码全部能够解答出来#include<iostream>
#include<cmath>
#include<stdio.h>
using namespace std;
int main()
{
int n;
while(cin>>n&&n!=0)
{
double v,t,x;
double min=100000;
for(int i=0;i<n;i++)
{
cin>>v>>t;
if(t>0&&(x=t+4.5*3600/v)<min)
min=x;
}
cout<<ceil(min)<<endl;
}
return 0;
}
Followed by: Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator