#include<cstdio>
#include<iostream>
#define LL __int64
#define cc 4294967295
using namespace std;
LL l[1001],r[1001];
int main()
{
l[1]=2;
r[1]=9;
int i,cnt,n;
for(i=2;;i++)
{
if(r[i-1]>cc)
break;
l[i]=r[i-1]+1;
if(i%2==0)
r[i]=2*r[i-1];
else
r[i]=9*r[i-1];
cnt=i;
}
while(scanf("%d",&n)!=EOF)
{
for(i=1;i<=cnt;i++)
if(l[i]<=n && n<=r[i])
{
if(i%2==1)
printf("Stan wins.\n");
else
printf("Ollie wins.\n");
break;
}
}
return 0;
}
hdu 1517
最新推荐文章于 2019-10-28 09:38:41 发布