Advertisement
Spocoman

14. Password Generator

Jan 2nd, 2022 (edited)
94
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.67 KB | None | 0 0
  1. n = int(input())
  2. l = int(input())
  3. output = ''
  4. for a in range(1, n + 1):
  5.     for b in range(1, n + 1):
  6.         for c in range(97, 97 + l):
  7.             for d in range(97, 97 + l):
  8.                 for e in range(1, n + 1):
  9.                     if a < e and e > b:
  10.                         output += f'{a}{b}{chr(c)}{chr(d)}{e} '
  11. print(output)
  12.  
  13. ИЛИ:
  14.  
  15. n = int(input())
  16. l = int(input())
  17.  
  18. for a in range(1, n + 1):
  19.     for b in range(1, n + 1):
  20.         for c in range(97, 97 + l):
  21.             for d in range(97, 97 + l):
  22.                 for e in range(1, n + 1):
  23.                     if a < e and e > b:
  24.                         print(f'{a}{b}{chr(c)}{chr(d)}{e}', end=' ')
  25.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement