Solving HackerRank Warmup Problem: Mini-Max Sum In Go Language

Problem

Given five positive integers, find the minimum and maximum values that can be calculated by summing exactly four of the five integers. Then print the respective minimum and maximum values as a single line of two space-separated long integers

See the full description of the problem Mini-Max Sum

Sample Input

1 2 3 4 5

Sample Output

10 14