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;
}
本文来自博客园,作者:斯文~,转载请注明原文链接:https://www.cnblogs.com/zhiweb/p/15483238.html

浙公网安备 33010602011771号