Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- start_num = int(input())
- final_num = int(input())
- for a in range(start_num // 1000, final_num // 1000 + 1):
- for b in range(start_num // 100 % 10, final_num // 100 % 10 + 1):
- for c in range(start_num // 10 % 10, final_num // 10 % 10 + 1):
- for d in range(start_num % 10, final_num % 10 + 1):
- if a % 2 == 1 and b % 2 == 1 and c % 2 == 1 and d % 2 == 1:
- print(f'{a}{b}{c}{d}', end=' ')
- ИЛИ:
- start_num = input()
- final_num = input()
- for a in range(int(start_num[0]), int(final_num[0]) + 1):
- for b in range(int(start_num[1]), int(final_num[1]) + 1):
- for c in range(int(start_num[2]), int(final_num[2]) + 1):
- for d in range(int(start_num[3]), int(final_num[3]) + 1):
- if a % 2 == 1 and b % 2 == 1 and c % 2 == 1 and d % 2 == 1:
- print(f'{a}{b}{c}{d}', end= ' ')
Add Comment
Please, Sign In to add comment