UVA 408

#include<iostream>
#include<iomanip>
using namespace std;
int main()
{
    int m,n;
    while(cin>>m>>n)
    {
        cout<<setw(10)<<right<<m<<setw(10)<<right<<n<<"    ";
        int temp1=1,temp2,temp3;
        temp2=m>n?m:n;
        temp3=m<n?m:n;
        while(temp1)
        {
            temp1=temp2%temp3;
            temp2=temp1>temp3?temp1:temp3;
            temp3=temp1;
        }
        if(temp2==1)
            cout<<"Good Choice"<<endl<<endl;
        else
            cout<<"Bad Choice"<<endl<<endl;
    }
    return 0;
}

 

posted @ 2012-04-28 12:15  open your eyes  阅读(194)  评论(0编辑  收藏  举报