ENG  RUSTimus Online Judge
Online Judge
Problems
Authors
Online contests
About Online Judge
Frequently asked questions
Site news
Webboard
Links
Problem set
Submit solution
Judge status
Guide
Register
Update your info
Authors ranklist
Current contest
Scheduled contests
Past contests
Rules
back to board

Discussion of Problem 1025. Democracy in Danger

где ошибка?
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: где ошибка?
Posted by NumbMoon 10 Dec 2016 01:41
You must input all the array first, and only then work with it
Re: где ошибка?
Posted by ToadMonster 10 Dec 2016 03:24


Edited by author 10.12.2016 03:26