Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include<bits/stdc++.h>
- using namespace std;
- int main()
- {
- long long n,p,stan;
- while(scanf("%lld",&n)==1)
- {
- stan = 0;
- p = 1;
- while(1)
- {
- p*=9;
- if(p>=n)
- {
- stan = 1;
- break;
- }
- p*=2;
- if(p>=n)
- {
- stan = 0;
- break;
- }
- }
- if(stan)
- {
- printf("Stan wins.\n");
- }
- else
- {
- printf("Ollie wins.\n");
- }
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment