#include<stdio.h>
#include<string.h>
int a[100010];
int main()
{
int step,m,i;
while(scanf("%d%d",&step,&m)!=EOF)
{
i=0;
memset(a,0,sizeof(a));
a[0]=1;
i+=step;
i%=m;
while(i)
{
if(a[i])
break;
a[i]=1;
i+=step;
i%=m;
}
for(i=1;i<m;i++)
if(!a[i])
break;
if(i!=m)
printf("%10d%10d Bad Choice\n\n",step,m);
else
printf("%10d%10d Good Choice\n\n",step,m);
}
}HDU 1014
最新推荐文章于 2020-02-09 20:30:07 发布
960

被折叠的 条评论
为什么被折叠?



