注意是两位数,必须输出01,02,03,这种
#include <stdio.h> int main(){ int begin,end; int i; int res[110]; int cnt; int sign; while(~scanf("%d%d",&begin,&sign)){ if(begin==0&&sign==0) break; end=(begin+1)*100-1; begin*=100; cnt=0; for(i=begin;i<=end;++i){ if(i%sign==0){ res[cnt++]=i%100; } } if(res[0]<10) printf("0%d",res[0]); else printf("%d",res[0]); for(i=1;i<cnt;++i){ if(res[i]<10) printf(" 0%d",res[i]); else printf(" %d",res[i]); } printf("\n"); } return 0; }