#include <stdio.h>
#include <math.h>
int main()
{
int a,b,t,c;
double p=(sqrt(5)+1)/2;
while(scanf("%d%d",&a,&b)!=EOF)
{
if (a>b)
{
t=a;
a=b;
b=t;
}
c=b-a;
if (a==(int)(c*p))
{
printf("%d\n",0);
}
else
{
printf("%d\n",1);
}//如果a是黄金分割数*n就是败了!<h2 class="sio" style="margin-top: 10px; font-size: 21px; border-bottom-width: 1px; border-bottom-style: solid; border-bottom-color: rgb(102, 102, 102); font-family: Verdana, Geneva, Arial, Helvetica, sans-serif; background-color: rgb(40, 85, 126);"><span style="color: rgb(0, 0, 255);">威佐夫问题</span></h2>
}
}
取石子游戏
最新推荐文章于 2023-09-02 15:10:52 发布