https://vjudge.net/problem/POJ-2505
#include<iostream>
#include<algorithm>
using namespace std;
int main()
{
ios::sync_with_stdio(false);
int n;
while(cin>>n)
{
int f=0;
while(n>1)
{
if(f)
{
if(n%2==0) n=n/2; //向上取整
else n=n/2+1;
}
else
{
if(n%9==0) n=n/9;
else n=n/9+1;
}
f=!f;
}
if(f) cout<<"Stan wins.\n";
else cout<<"Ollie wins.\n";
}
return 0;
}