11399: ATM
Greedy ๋ ๋ฒ์งธ ๋ฌธ์ ~! ๊ฐ๋จํ ๋ฌธ์ ์๋ค.
Greedy
N = int(input()) arr = list(map(int, input().split())) sums = 0 for i in sorted(arr): sums += i * N N -= 1 print(sums)