Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- from math import sqrt
- def is_perfect_square(num):
- return int(sqrt(num)) == sqrt(num)
- data_list = list(map(int, input().split(" ")))
- list=[]
- for el in data_list:
- if is_perfect_square(el):
- list.append(el)
- list.sort(reverse= True)
- print(*list)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement