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 1787. Turn for MEGA

Что не верно? c#
Posted by dearboss 14 Mar 2018 18:54
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Task1787
{
    class Program
    {
        static void Main(string[] args)
        {
            string[] kMinute = Console.ReadLine().Split(new char[] { ' ', '\t', '\n', '\r' }, StringSplitOptions.RemoveEmptyEntries);
            int k = int.Parse(kMinute[0]);
            int n = int.Parse(kMinute[1]);
            string[] nCam = Console.ReadLine().Split(new char[] { ' ', '\t', '\n', '\r' }, StringSplitOptions.RemoveEmptyEntries);
            int sum = 0;
            foreach (var item in nCam)
            {
                sum += int.Parse(item);
            }
            Console.WriteLine(sum - (k * n));
        }
    }
}