Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /**
- * Project: Exam_06_March_2016 - created by borkins on 2017-05-14.
- */
- import java.util.Scanner;
- public class _06_StupidPasswordGenerator
- {
- public static void main(String[] args)
- {
- Scanner console = new Scanner(System.in);
- int n = Integer.parseInt(console.nextLine());
- int l = Integer.parseInt(console.nextLine());
- for (int i = 1; i < n; i++)
- {
- for (int j = 1; j < n; j++)
- {
- for (char a = 'a'; a < 'a' + l; a++)
- {
- for (char b = 'a'; b < 'a' + l; b++)
- {
- for (int k = Math.max(i, j) + 1; k <= n; k++)
- {
- System.out.printf("%d%d%c%c%d ", i, j, a, b, k);
- }
- }
- }
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment