编程题:16
import java.util.Scanner;

public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int A = sc.nextInt();
int[] nums = {A, A + 1, A + 2, A + 3};
int count = 0;
for (int i = 0; i < 4; i++) {
for (int j = 0; j < 4; j++) {
for (int k = 0; k < 4; k++) {
if (i != j && j != k && i != k) {
int num = nums[i] * 100 + nums[j] * 10 + nums[k];
System.out.print(num);
count++;
if (count % 6 != 0 && count != getTotal(A)) {
System.out.print(" ");
} else {
System.out.println();
}
}
}
}
}
}

public static int getTotal(int A) {
    return 4 * 3 * 2; 
}

}

posted on 2025-05-12 23:22  Swishy  阅读(5)  评论(0)    收藏  举报