Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.util.Scanner;
- public class E01stupidPasswordGenerator {
- 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 first = 1; first < n; first++) {
- for (int second = 1; second < n; second++) {
- for (char third = 'a'; third < 'a' + l; third++) {
- for (char fourth = 'a'; fourth < 'a' +l; fourth++) {
- for (int fifth = Math.max(first, second) + 1; fifth <= n; fifth++) {
- System.out.print(String.format("%d%d%c%c%d ", first, second, third, fourth, fifth));
- }
- }
- }
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment