解题思路:
注意事项:
参考代码:
import java.util.*;
public class Text_1224 {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
while (sc.hasNext()) {
int a = sc.nextInt();
int b = sc.nextInt();
if (a == 0 && b == 0) {
break;
} else {
String s1 = String.valueOf(a);
for (int i = 0; i <= 9; i++) {
for (int j = 0; j <= 9; j++) {
String s2 = String.valueOf(i);
String s3 = String.valueOf(j);
String s4 = s1 + s2 + s3;
int result = Integer.parseInt(s4);
if (result % b == 0) {
System.out.print(s2 + s3 + " ");
}
}
}
}
}
}
}