Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Linq;
- namespace TriFunction
- {
- class TriFunction
- {
- static void Main(string[] args)
- {
- int treshold = int.Parse(Console.ReadLine());
- string[] names = Console.ReadLine().Split(" ");
- Console.WriteLine(names.First(name => name .Select(symbol => (int)symbol ).Sum() >= treshold));
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment