Mini-Max Sum

  • + 0 comments

    def miniMaxSum(arr): total_sum = sum(arr) min_val = min(arr) max_val = max(arr) min_sum = total_sum - max_val max_sum = total_sum - min_val print(min_sum, max_sum)

    if name == 'main':

    arr = list(map(int, input().rstrip().split()))
    
    miniMaxSum(arr)