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