Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- x = ord(input())
- y = ord(input())
- z = ord(input())
- counter = 0
- output = ''
- for i in range(x, y + 1):
- for k in range(x, y + 1):
- for j in range(x, y + 1):
- if i != z and k != z and j != z:
- output += f"{chr(i)}{chr(k)}{chr(j)} "
- counter += 1
- print(output + str(counter))
- Или:
- x = ord(input())
- y = ord(input())
- z = ord(input())
- counter = 0
- for i in range(x, y + 1):
- for k in range(x, y + 1):
- for j in range(x, y + 1):
- if i != z and k != z and j != z:
- print(chr(i) + chr(k) + chr(j), end=' ')
- counter += 1
- print(counter)
Add Comment
Please, Sign In to add comment