Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.util.Scanner;
- public class sz {
- 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 i1 = 1; i1 <= n; i1++) {
- for (int i2 = 1; i2 <= n; i2++) {
- for (int i3 = 97; i3 < 97 + l; i3++) {
- for (int i4 = 97; i4 < 97 + l; i4++) {
- for (int i5 = 1; i5 <= n; i5++) {
- if (i5 > i1 && i5 > i2){
- System.out.printf("%d%d%c%c%d ",i1,i2,(char)i3,(char)i4,i5);
- }
- }
- }
- }
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement