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的大虾们:-)

Posted by 00003019 at 2003-05-23 18:00:19 on Problem 1067
把您过了的程序给我看一下好吗?非常感谢!
#include<iostream.h>
#include<math.h>
void main()
{
	int a,b,m,n;
	double c;
	double d;
	while(cin>>a>>b)
	{
		c=(1+sqrt(5))/2;d=c+1;
		do
		{
			m=(a+1)/c;n=c*m;
			m*=d;
			if(a==n&&b==m)
				a=0;
			d=c;c++;
		}while(c<3);
		if(a>0)cout<<1<<endl;else cout<<0<<endl;
		//	cout<<sign(a);}
	}cout<<endl;
}

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