|
|
back to boardгде ошибка? Posted by Nick 16 Jun 2012 19:10 using System; class Program { static void Main() { int t = int.Parse(Console.ReadLine()); string[] s = Console.ReadLine().Split(' '); Array.Sort(s); int r = 0; for (int i = 0; i < (t / 2)+1; i++) { r += ((int.Parse(s[i]) / 2) +1); } Console.WriteLine(r); } } Edited by author 16.06.2012 19:10 Edited by author 16.06.2012 19:11 Re: где ошибка? You must input all the array first, and only then work with it Re: где ошибка? Edited by author 10.12.2016 03:26 |
|
|