HDOJ 1014
//小心格式问题
#include <iostream>
#include <iostream>
#include <iomanip>
#include <string.h>
using namespace std;
int str[100010];
int main()
{
int step,mod;
while(cin>>step>>mod)
{
memset(str,10010,sizeof(str));
str[0]=1;
int seed=0;
for(int i=0;i<mod;i++)
{
seed=(seed+step)%mod;
str[seed]=1;
}
cout<<setw(10)<<step<<setw(10)<<mod;
int sig=0;
for(int i=0;i<mod;i++)
{
if(str!=1)
{
cout<<" "<<"Bad Choice"<<endl<<endl;
sig=1;
break;
}
}
if(sig!=1) cout<<" "<<"Good Choice"<<endl<<endl;
}
return 0;
}