Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.util.Scanner;
- public class FOX {
- public static void main(String[] args) {
- Scanner input = new Scanner(System.in);
- int n = Integer.parseInt(input.nextLine());
- int l = Integer.parseInt(input.nextLine());
- for (int i = 1 ; i <= n; i++) {
- for (int j = 1; j <= n; j++) {
- for (char k = 'a'; k < 'a' + l; k++) {
- for (char m = 'a'; m < 'a' + l; m++) {
- for (int o = (i + 1 & j + 1); o <= n ; o++) {
- if (o > i & o > j) {
- System.out.printf("%s%s%s%s%s ", i, j, k, m, o);
- }
- }
- }
- }
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment