SHOW:
|
|
- or go back to the newest paste.
| 1 | import java.util.Scanner; | |
| 2 | ||
| 3 | - | public class Main {
|
| 3 | + | public class PasswordGenerator {
|
| 4 | public static void main(String[] args) {
| |
| 5 | - | Scanner scan = new Scanner(System.in); |
| 5 | + | |
| 6 | Scanner scanner = new Scanner(System.in); | |
| 7 | - | int n = Integer.parseInt(scan.nextLine()); |
| 7 | + | |
| 8 | - | int l = Integer.parseInt(scan.nextLine()); |
| 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 | - | } |
| 24 | + | |
| 25 | } | |
| 26 |