hdu1014 请问为什么???
这是我的代码:程序代码:
#include<stdio.h> #include<string.h> int chart[100001]; void work(int n,int k) { int i,tmp=0; memset(chart,0,sizeof(chart)); do { tmp = (tmp+n)%k; chart[tmp]=1; }while(tmp!=0); for(i=1;i<n;i++) if(chart[i]==0)break; if(i==n) printf("%10d%10d Good Choice\n",n,k); else printf("%10d%10d Bad Choice\n",n,k); printf("\n"); } int main() { int n,k; while(scanf("%d%d",&n,&k) != EOF) { work(n,k); } return 0; }请路过的各位看看哪里错了!!!!!!!!!!!