Advertisement
Spocoman

Stupid Password Generator

Sep 9th, 2024
85
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.69 KB | None | 0 0
  1. import java.util.Scanner;
  2.  
  3. public class Main {
  4.     public static void main(String[] args) {
  5.         Scanner scanner = new Scanner(System.in);
  6.         int n = Integer.parseInt(scanner.nextLine()),
  7.                 l = Integer.parseInt(scanner.nextLine());
  8.  
  9.         for (int a = 1; a <= n; a++) {
  10.             for (int b = 1; b <= n; b++) {
  11.                 for (int c = 97; c < 97 + l; c++) {
  12.                     for (int d = 97; d < 97 + l; d++) {
  13.                         for (int e = Math.max(a, b) + 1; e <= n; e++) {
  14.                             System.out.printf("%d%d%c%c%d ", a, b, c, d, e);
  15.                         }
  16.                     }
  17.                 }
  18.             }
  19.         }
  20.     }
  21. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement