|
|
back to boardЧто не верно? c# 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)); } } } |
|
|