| ||||||||||
| Online Judge | Problem Set | Authors | Online Contests | User | ||||||
|---|---|---|---|---|---|---|---|---|---|---|
| Web Board Home Page F.A.Qs Statistical Charts | Current Contest Past Contests Scheduled Contests Award Contest | |||||||||
超时,我无语,求牛人解释,是不是输入输出控制上的问题,诚谢!#include<stdio.h>
#include<math.h>
int main (void)
{
long int a,b,r,temp;
while(1)
{
scanf("%ld%ld",&a,&b);
r=abs(a-b);
if(a>b)
{
temp=b;
}
else
{
temp=a;
}
if(r>=2*temp/(sqrt(5)+1) && r<2*(temp+1)/(sqrt(5)+1))
{
printf("0\n");
}
else
{
printf("1\n");
}
}
return 0;
}
Followed by:
Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator