Problem Description Loading... Problem Analysis The data is small just brute-force it
[HDU] [2099] Divisible MantissaProblem Description Loading...Problem AnalysisThe data is smalljust brute-force itcpp 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 #include<stdio.h> int main() { int n,m; while(scanf("%d %d",&n,&m),n||m) { int t=n%m; bool flag=false; for(int i=0; i<10; i++) { for(int j=0; j<10; j++) { if((t*100+i*10+j)%m==0) { if(flag) printf(" "); printf("%d%d",i,j); flag=true; } } } printf("\n"); } return 0; }Problem link: [HDU] [2099] Divisible Suffix