mirror of
https://github.com/Kiritow/OJ-Problems-Source.git
synced 2024-03-22 13:11:29 +08:00
ed2de2e423
1500-1599
26 lines
421 B
C++
26 lines
421 B
C++
#include<stdio.h>
|
|
int main ()
|
|
{
|
|
int a,b,t,sw;
|
|
while(~scanf("%d%d",&a,&b))
|
|
{
|
|
if(!a&&!b)
|
|
break;
|
|
t=0;
|
|
while(1)
|
|
{
|
|
if(a<b)
|
|
sw=a,a=b,b=sw;
|
|
t++;
|
|
if(!b||!(a%b)||a/b>=2)
|
|
break;
|
|
a=a%b;
|
|
}
|
|
if(t&1)
|
|
printf("Stan wins\n");
|
|
else
|
|
printf("Ollie wins\n");
|
|
}
|
|
return 0;
|
|
}
|