Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections.Generic;
- using System.Linq;
- namespace sad
- {
- class Program
- {
- static void Main(string[] args)
- {
- List<int> numbers = Console.ReadLine().Split(' ').Select(int.Parse).ToList();
- numbers.RemoveAll(num => Math.Sqrt(num) != (int)Math.Sqrt(num));
- Console.WriteLine(string.Join(" ",numbers.OrderByDescending(x => x)));
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment