标签:dfs ble show hdu swap wap int space include
#include <stdio.h>
#include <iostream>
using namespace std;
int dfs(int a,int b,int ans)
{
if(a%b==0)
{
return ans;
}
else if(a>b&&a<2*b)
{
return dfs(b,a%b,ans^1);
}
else
{
return ans;
}
}
int main()
{
int a,b;
while(scanf("%d%d",&a,&b)!=EOF)
{
if(a==0&&b==0)
break;
if(a<b) swap(a,b);
if(dfs(a,b,1)==1)
{
printf("Stan wins\n");
}
else
printf("Ollie wins\n");
}
}
标签:dfs ble show hdu swap wap int space include
原文地址:https://www.cnblogs.com/dacc123/p/11162115.html