#include "iostream"
#include "vector"
#include "string.h"
using namespace std;
void swap(int &a, int &b)
{
int temp = a;
a = b;
b = temp;
}
int main()
{
int a, b;
cout << "a = ";
cin >> a;
cout << "b = ";
cin >> b;
bool f = true;
while(true)
{
if(a > b)
swap(a, b);
if(b % a == 0)
break;
if(b - a > a)
break;
b -= a;
f = !f;
}
if(f)
cout << "Stan wins" << endl;
else
cout << "Ollie wins" << endl;
return 0;
}
Euclid's Game---博弈
最新推荐文章于 2020-10-29 20:26:38 发布