You are viewing a single comment's thread. Return to all comments →
you don't even need a for loop in C#, here is my solution:
static void Main(String[] args) { string[] arr_temp = Console.ReadLine().Split(' '); long[] arr = Array.ConvertAll(arr_temp, Int64.Parse); long minSum = arr.Sum() - arr.Max(); long maxSum = arr.Sum() - arr.Min(); Console.WriteLine("{0} {1}",minSum, maxSum); }
Seems like cookies are disabled on this browser, please enable them to open this website
Mini-Max Sum
You are viewing a single comment's thread. Return to all comments →
you don't even need a for loop in C#, here is my solution: