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

我每次提交1067都说我Output Limit Exceed,我检查不出来,能帮忙看看吗?

Posted by 20050503 at 2006-12-03 20:12:28
#include<iostream>
using namespace std;

int main()
{
	long i, j;
	long min, max;
	
    cin>>i>>j;
	while(i >= 0 && j>=0)
	{
		max = (i>j)?i:j;
		min = (i>j)?j:i;
		if(max == min || min == 0)
		{
			cout<<1<<endl;
			goto step;
		}
		if(max != int(min*1.618+1))
		{
			cout<<1<<endl;
			goto step;
		}
		if(min == int((max - min)*1.618))
		   cout<<0<<endl;
		else
		   cout<<1<<endl;
step:	cin>>i>>j;
	}
	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