题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=1014
//hdu1014 0ms
#include<stdio.h>
#include<iostream>
#include<algorithm>
#include<string.h>
using namespace std; int a[]; int main()
{
int n,m,flag,t;
a[]=;
while(scanf("%d %d",&n,&m)!=EOF)
{
flag=;
t=;
memset(a,,sizeof(a));
a[]=;
for(int i=;i<=m-;i++)
{
t=(t+n)%m;
a[t]++;
if(a[t]>=)
{
flag=;
break;
}
}
if(flag)
printf("%10d%10d Good Choice\n\n",n, m);
else
printf("%10d%10d Bad Choice\n\n",n, m);
} return ;
}