Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def rec(found=None):
- if found is None:
- found = [False]
- n = int(input())
- if n != 0:
- rec(found)
- if n ** 0.5 == int(n ** 0.5):
- found[0] = True
- print(n, end=' ')
- return found[0]
- if not rec():
- print(0)
Add Comment
Please, Sign In to add comment