Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- a = int(input())
- b = int(input())
- answer = []
- for i in range(a // 100, b // 100 + 1):
- f = i % 10
- s = i // 10
- first = 100 * i + f * 10 + f
- second = 100 * i + s * 10 + s
- if f == s:
- for j in range(10):
- third = 100 * i + f * 10 + j
- chetire = 100 * i + j * 10 + f
- if a < third < b:
- answer.append(third)
- if a < chetire < b:
- answer.append(chetire)
- else:
- if a < first < b:
- answer.append(first)
- if a < second < b:
- answer.append(second)
- answer.sort()
- for i in range(len(answer)):
- print(answer[i])
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement