Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- count = 0
- for number in range(100, 151):
- digit1 = number % 10
- digit2 = (number // 10) % 10
- digit3 = (number // 100) % 10
- digit4 = (number // 1000) % 10
- if digit1 != digit2 and digit1 != digit3 and digit1 != digit4 and digit2 != digit3 and digit2 != digit4 and digit3 != digit4:
- count += 1
- print("Количество чисел с разными цифрами:", count)
- print(list(range(100, 151)))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement