POJ - 1067 取石子游戏

https://vjudge.net/problem/POJ-1067

#include<iostream>
#include<algorithm>
#include<cmath>
using namespace std;
int ttt;
int main()
{
	int a,b;
	while(cin>>a>>b)
	{
		if(a>b)
			swap(a,b);
		double x=(int)((b-a)*(sqrt(5)+1)/2);
		if(a==x)
			cout<<"0\n";
		else
			cout<<"1\n";
	}
	return 0;
}
posted @ 2021-09-04 20:17  斯文~  阅读(16)  评论(0)    收藏  举报

你好!