Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- n = int(input())
- l = int(input())
- output = ''
- for a in range(1, n + 1):
- for b in range(1, n + 1):
- for c in range(97, 97 + l):
- for d in range(97, 97 + l):
- for e in range(1, n + 1):
- if a < e and e > b:
- output += f'{a}{b}{chr(c)}{chr(d)}{e} '
- print(output)
- ИЛИ:
- n = int(input())
- l = int(input())
- for a in range(1, n + 1):
- for b in range(1, n + 1):
- for c in range(97, 97 + l):
- for d in range(97, 97 + l):
- for e in range(1, n + 1):
- if a < e and e > b:
- print(f'{a}{b}{chr(c)}{chr(d)}{e}', end=' ')
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement