200 40 1992 95 0 0
00 40 80 15
#include<iostream> #include<cstring> using namespace std; int main(){ int n,m; while(cin>>n>>m){ if(n==0 && m==0) break; int a[105]={0}; int i,j,r=0; for(i=0;i<100;i++){ if((i+n*100)%m==0) a[r++]=i; } for(i=0;i<r-1;i++){ if(a[i]<10) cout<<0; cout<<a[i]<<" "; } if(a[r-1]<10) cout<<0; cout<<a[r-1]<<endl; } return 0; }
原文地址:http://blog.csdn.net/hyccfy/article/details/41624729