标签:
Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)
Total Submission(s): 2193 Accepted Submission(s): 981
#include<iostream> #include<cstdio> #include<cstring> #include<cmath> #include<string> #include<algorithm> #include<cstdlib> using namespace std; int a,b; int main() { while(scanf("%d%d",&a,&b)!=EOF) { if(a==0&&b==0) break; if(a<b) swap(a,b); bool flag=true; while(1) { if(b==0||a%b==0||a/b>=2) break; int t=b; b=a-b; a=t; flag=!flag; } if(flag) { printf("Stan wins\n"); } else printf("Ollie wins\n"); } return 0; }
标签:
原文地址:http://www.cnblogs.com/a972290869/p/4229868.html