You are viewing a single comment's thread. Return to all 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)
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 →
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':