UVA 847 - A Multiplication Game

Problem PDF

Solution:

#include 
int main()
{
    long long int n,p;
    while(scanf("%lld",&n)!=EOF)
    {
        p=1;
        while(p=n)
            {
                puts("Stan wins.");
                break;
            }
            p*=2;
            if(p>=n)
            {
                puts("Ollie wins.");
                break;
            }
        }
    }
}

https://github.com/Shipu/OnlineJudgeProblemSolutionWithCPlusPlus/tree/master/uva/847/847.cpp