SvetlanPetrova

Untitled

May 26th, 2021 (edited)
212
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. import java.util.Scanner;
  2.  
  3. public class PasswordGenerator {
  4.     public static void main(String[] args) {
  5.  
  6.         Scanner scanner = new Scanner(System.in);
  7.  
  8.         int n = Integer.parseInt(scanner.nextLine());
  9.         int l = Integer.parseInt(scanner.nextLine());
  10.  
  11.         for (int i = 1; i < n; i++) {
  12.             for (int j = 1; j < n; j++) {
  13.                 for (char k = 'a'; k < 'a' + l; k++) {
  14.                     for (char m = 'a'; m < 'a' + l; m++) {
  15.                         for (int o = 2; o <= n; o++) {
  16.                             if (o > i && o > j) {
  17.                                 System.out.printf("%d%d%c%c%d ", i, j, k, m, o);
  18.                             }
  19.                         }
  20.                     }
  21.                 }
  22.             }
  23.         }
  24.     }
  25. }
  26.  
Add Comment
Please, Sign In to add comment