Raslboyy

Untitled

May 21st, 2021 (edited)
502
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.19 KB | None | 0 0
  1. a, b = map(int, input().split())
  2.  
  3. power = 3
  4. ans = ''
  5. while len(str(power)) <= 4:
  6.     if len(str(power)) == 4 and a <= power <= b:
  7.         ans += str(power) + ' '
  8.     power *= 3
  9. print(ans)
Advertisement
Add Comment
Please, Sign In to add comment