• + 0 comments

    For Python3 Platform

    I wrote the code from scratch just to get more practice

    def minMaxSum(arr):
        total = sum(arr)
        min_ele = min(arr)
        max_ele = max(arr)
        
        print(total-max_ele, total-min_ele)
    
    arr = list(map(int, input().split()))
    
    minMaxSum(arr)