题意:容易理解。
分析:威佐夫博奕的模板题。
代码实现:
#include<stdio.h> #include<string.h> #include<math.h> int main() { int n,m,temp,k; while(scanf("%d%d",&n,&m)!=EOF) { if(n<m) { temp=n; n=m; m=temp; } k=n-m; n=(int)(k*(1+sqrt(5))/2.0); if(n==m) printf("0 "); else printf("1 "); } return 0; }