/*
*State: 1067    Accepted    176K    16MS    C++    435B
*题目大意:
*        威佐夫博弈
*解题思路:
*        略。
*/
#include <iostream>
#include <stdio.h>
#include <cmath>
using namespace std;

int main(void)
{
    int big, small;
    while(scanf("%d %d", &big, &small) == 2)
    {
        if(big < small)
        {
            big = big ^ small;
            small = big ^ small;
            big = big ^ small;
        }
        double hj = (1.0 + sqrt(5.0)) / 2.0;
        int k = big - small;
        int tmp = k * hj;
        if(tmp == small)
            printf("0\n");
        else
            printf("1\n");
    }
    return 0;
}

相关文章:

  • 2022-12-23
  • 2021-08-12
  • 2022-02-14
  • 2021-08-11
  • 2021-08-17
  • 2021-07-30
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2021-08-01
  • 2021-08-23
  • 2021-12-26
  • 2022-12-23
  • 2022-01-20
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案