Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.util.Scanner;
- public class Demo {
- public static void main(String[] args) {
- Scanner scanner = new Scanner(System.in);
- int n = Integer.parseInt(scanner.nextLine());
- int l = Integer.parseInt(scanner.nextLine());
- for (int i = 1; i < n; i++) {
- for (int j = 1; j < n; j++) {
- for (char k = 97; k < 97 + l; k++) {
- for (char m = 97; m < 97 + l; m++) {
- for (int o = 2; o <= n; o++) {
- if (o > i && o > j) {
- System.out.print("" + i + j + k + m + o + " ");
- }
- }
- }
- }
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement