Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Linq;
- using System.Collections.Generic;
- namespace Numbers
- {
- class Program
- {
- static void Main(string[] args)
- {
- var numbers = Console.ReadLine().Split(' ').Select(int.Parse).OrderByDescending(n => n).ToList();
- var top5 = numbers.Where(n => n > numbers.Sum() / numbers.Count).ToList();
- Console.WriteLine(top5.Count == 0 ? "No" : String.Join(' ', top5.Count > 5 ? top5.GetRange(0, 5) : top5));
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement