| ||||||||||
| Online Judge | Problem Set | Authors | Online Contests | User | ||||||
|---|---|---|---|---|---|---|---|---|---|---|
| Web Board Home Page F.A.Qs Statistical Charts | Current Contest Past Contests Scheduled Contests Award Contest | |||||||||
为什么会WA??大虾帮忙~~~~#include<iostream>
using namespace std;
int main()
{
int a,b;
while(cin>>a>>b)
{
if(a==0&&b==0)return 0;
if(a==b)cout<<"Stan wins\n";
else{
if(a<b)swap(a,b);
int num=0;
while(a<(2*b))
{
b=a-b;a=a-b;num++;
}
if(num%2==0)cout<<"Stan wins\n";
else cout<<"Ollie wins\n";}
}
return 0;
}
Followed by:
Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator