Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import math
- nums_list = [int(items) for items in input().split(" ")]
- result_list = []
- for i in nums_list:
- if i > 0 and math.sqrt(i) % 1 == 0:
- result_list.append(i)
- result_list.sort(reverse=True)
- print(" ".join(map(str, result_list)))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement