Online JudgeProblem SetAuthorsOnline ContestsUser
Web Board
Home Page
F.A.Qs
Statistical Charts
Problems
Submit Problem
Online Status
Prob.ID:
Register
Update your info
Authors ranklist
Current Contest
Past Contests
Scheduled Contests
Award Contest
User ID:
Password:
  Register

wrong answer,请帮忙看看错在哪里。我在自己机器上用那两组数据没错的

Posted by baiyuyang at 2009-10-11 12:22:24 on Problem 1922
#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:
User ID:
Password:
Title:

Content:

Home Page   Go Back  To top


All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator