← Back to List

15008번: Falling Apart ↗

Solutions

Python 3
105 B | 105 chars
N = int(input())
L = sorted(list(map(int,input().split())),reverse=True)
print(sum(L[0::2]),sum(L[1::2]))