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 |
wrong answer,请帮忙看看错在哪里。我在自己机器上用那两组数据没错的#include<iostream> #include<math.h> using namespace std; int main() { int n; double speed,offTime; double totalTime = 10000.0; double tempTime; cin>>n; while(n != 0) { while(n--) { cin>>speed>>offTime; if(offTime < 0) tempTime = 10000.0; else tempTime = ceil((4500.0*3.6)/speed)+offTime; if(tempTime < totalTime) totalTime = tempTime; } cout<<(int)totalTime<<endl; cin>>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