Get Mystery Box with random crypto!

n = int(input()) l = list(map(int,input().split())) l.sort() i | CODING SOLUTION - Placement Jobs & Materials

n = int(input())
l = list(map(int,input().split()))
l.sort()
if len(l) > 4:
B = l[:len(l)//2]
C = l[len(l)//2:]
print(B[-1]+B[-2]+C[-1]+C[-2])
else:
print(l[-1]+l[-2])


Python
Early bird Code
Telegram - t.me/codingsolution_IT