Advertisement
aneliabogeva

Square Numbers

Jun 18th, 2019
112
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.25 KB | None | 0 0
  1. import math
  2.  
  3. nums_list = [int(items) for items in input().split(" ")]
  4.  
  5. result_list = []
  6.  
  7. for i in nums_list:
  8. if i > 0 and math.sqrt(i) % 1 == 0:
  9. result_list.append(i)
  10.  
  11. result_list.sort(reverse=True)
  12. print(" ".join(map(str, result_list)))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement