2 1 8 4 4 7
0 1 0
威佐夫博奕!!!!!
表示还没有全懂!!!
但是公式是记住了。。。。。。。
x>y,如果y=(取整)(x-y)*((1+根号5)/2)时,先下就输了!!!
#include<stdio.h>
#include<math.h>
int main()
{
int n,m;
int t;
double a;
while(~scanf("%d%d",&n,&m))
{
if(n<m)
{t=n;n=m;m=t;}
a=1.0*n-m;
if((int)(((sqrt(5)+1.0)/2.0)*a)==m)
printf("0\n");
else printf("1\n");
}
return 0;
}
原文地址:http://blog.csdn.net/hanhai768/article/details/38125441