Advertisement
veronikaaa86

Stupid Pass Generator

Oct 29th, 2017
203
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.80 KB | None | 0 0
  1. import java.util.Scanner;
  2.  
  3. public class P06_StupidPassGenerator {
  4.     public static void main(String[] args) {
  5.         Scanner scanner = new Scanner(System.in);
  6.  
  7.         int n = Integer.parseInt(scanner.nextLine());
  8.         int l = Integer.parseInt(scanner.nextLine());
  9.  
  10.         for (int i = 1; i < n; i++) {
  11.             for (int j = 1; j < n; j++) {
  12.                 for (char k = 97; k <(char)97+l; k++) {
  13.                     for (char m = 97; m < (char)97+l; m++) {
  14.                         for (int o = 1; o <=n; o++) {
  15.                             if (o>i && o>j) {
  16.                                 System.out.print(i + "" + j + "" + k + "" + m + "" + o + "" + " ");
  17.                             }
  18.                         }
  19.                     }
  20.                 }
  21.             }
  22.         }
  23.     }
  24. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement