using System; using System.Collections.Generic; using System.Linq; class Program { static string InputPattern = "Input4"; static List GetInputList() { var WillReturn = new List(); if (InputPattern == "Input1") { WillReturn.Add("4"); WillReturn.Add("500 300 200 100"); //30 } else if (InputPattern == "Input2") { WillReturn.Add("5"); WillReturn.Add("400 250 200 100 50"); //60 } else if (InputPattern == "Input3") { WillReturn.Add("5"); WillReturn.Add("200 200 200 200 200"); //0 } else { string wkStr; while ((wkStr = Console.ReadLine()) != null) WillReturn.Add(wkStr); } return WillReturn; } static void Main() { List InputList = GetInputList(); int[] CArr = InputList[1].Split(' ').Select(X => int.Parse(X)).ToArray(); int SumHyou = CArr.Sum(); Console.WriteLine(30 * CArr.Count(X => X * 10 <= SumHyou)); } }