题目链接:点击打开链接
题目分析:裸运用
题目小结:floor()函数!!,没用差一点错了
#include<cstdio>
#include<cstdlib>
#include<cstring>
#include<algorithm>
#include<cmath>
using namespace std;
int if_odd(int a,int b)
{
int j=b-a;
if(a==floor(j*(sqrt(5.0)+1.0)/2.0))
{
return 1;
} return 0;
}
int main()
{
int a,b;
while(scanf("%d %d",&a,&b)!=EOF)
{
if(a>b)
swap(a,b);
if(if_odd(a,b)) printf("0\n");
else printf("1\n");
}
return 0;
}