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

????????????????好象很简单,但老是过不了,又测试不出

Posted by 00348276 at 2004-11-09 16:25:21 on Problem 1067
# include <iostream.h>
# include <math.h>
void main()
{
	int a,b;
	double m=(1+sqrt(5))/2,n=m+1;
	int c,d;
	while(cin>>a>>b)
	{
	//	m=(1+sqrt(5))/2;n=m+1;
		d=int( (a+1)/m );//N
		c=int(m*d);
		d=int(n*d);
		if( a==c && b==d )
			cout<<0<<endl;
		else
			cout<<1<<endl;
	}
	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