import java.util.*;
public class Main {
public static void main(String[] args) {
Scanner in = new Scanner(System.in);
while (in.hasNext()) {
int a = in.nextInt();
int b = in.nextInt();
if (a == 0 && b == 0)
break;
int m = a * 100;
List<Integer> list = new ArrayList<Integer>();
for (int i = 0; i <= 99; i++) {
if ((m + i) % b == 0) {
list.add(i);
}
}
for (int i = 0; i < list.size(); i++) {
if (i < list.size() - 1) {
if (list.get(i) >= 0 && list.get(i) <= 9) {
System.out.printf("%02d ", list.get(i));// 2的宽度,用0填充
} else {
System.out.printf("%d ", list.get(i));
}
} else {
if (list.get(i) >= 0 && list.get(i) <= 9) {
System.out.printf("%02d", list.get(i));
} else {
System.out.printf("%d", list.get(i));
}
}
}
System.out.println();
}
}
}
HDOJ2099 JAVA
最新推荐文章于 2024-08-26 16:40:46 发布