Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- a, b = map(int, input().split())
- power = 3
- ans = ''
- while len(str(power)) <= 4:
- if len(str(power)) == 4 and a <= power <= b:
- ans = str(power) + ' ' + ans
- power *= 3
- print(ans)
Advertisement
Add Comment
Please, Sign In to add comment