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

帮我看看这怎么回事的 Output Limit Exceeded

Posted by zyguyi at 2010-09-02 22:33:16 on Problem 1067
#include<stdio.h>
#include<math.h>
void main()
{
	while(1)
	{
	int i,n,m,a,b,t;
	scanf("%d %d",&n,&m);
    if(n>m)
	{
		t=n;
		n=m;
        m=t;
	}
	i=m-n;
	a=(i*(1+sqrt(5))/2);
	b=a+i;
	if(a==n&&b==m)
	printf("%d\n",0);
	else printf("%d\n",1);
	}
}

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