Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- num_start = int(input())
- list_num_start = []
- num_start_str = str(num_start)
- for x in num_start_str:
- list_num_start.append(int(x))
- num_end = int(input())
- list_num_end = []
- list_a = []
- list_b = []
- list_c = []
- list_d = []
- num_end_str = str(num_end)
- for x in num_end_str:
- list_num_end.append(int(x))
- for a in range(list_num_start[0], list_num_end[0] + 1):
- if a % 2:
- list_a.append(a)
- for b in range(list_num_start[1], list_num_end[1] + 1):
- if b % 2:
- list_b.append(b)
- for c in range(list_num_start[2], list_num_end[2] + 1):
- if c % 2:
- list_c.append(c)
- for d in range(list_num_start[3], list_num_end[3] + 1):
- if d % 2:
- list_d.append(d)
- for a in list_a:
- i = a * 1000
- for b in list_b:
- j = b * 100
- for c in list_c:
- k = c * 10
- for d in list_d:
- z = i + j + k + d
- print(z, end=' ')
Add Comment
Please, Sign In to add comment