Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package kr_1;
- import java.util.Scanner;
- public class KursovaRabotaZadacha6 {
- 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 i = 1; i <= n; i++) {
- for (int j = 1; j <= n; j++) {
- for (char s1 = 'a'; s1 < 'a' + l; s1++) {
- for (char s2 = 'a'; s2 < 'a' + l; s2++) {
- for (int k = 1; k <= n; k++) {
- if (k > i && k > j) {
- System.out.println(i + " " + j + " " + s1 + " " + s2 + " " + k);
- }
- }
- }
- }
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement