백준 11399번 ATM 파이썬
                        
                            2022.03.07 18:25
                        
                    
                    
                        백준 11399번 ATM 파이썬 코드이다.
a = int(input())
b = map(int, input().split())
c = t = 0
for i in sorted(b):
    c += i
    t += c
print(t)