import sys
input = sys.stdin.readline
n = int(input())
time = list(map(int,input().split()))
result = 0
time.sort()
for i in range(n):
for j in range(i+1):
result += time[j]
print(result)
'문제풀이 > 백준(Boj) 문제풀이' 카테고리의 다른 글
[백준][그리디 알고리즘] 13305. 주유소 (파이썬/Python) (0) | 2021.09.23 |
---|---|
[백준][그리디 알고리즘] 1541. 잃어버린 괄호 (파이썬/Python) (0) | 2021.09.20 |
[백준][그리디 알고리즘] 1931. 회의실 배정 (파이썬/Python) (0) | 2021.09.20 |
[백준][그리디 알고리즘] 11047. 동전 0 (파이썬/Python) (0) | 2021.09.18 |
[백준][동적 계획법1] 10844. 쉬운 계단 수 (파이썬/Python) (0) | 2021.09.18 |