[문제]
[나의 풀이]
import sys
input = sys.stdin.readline
n = int(input())
arr = sorted(list(map(int, input().split())))
answer = 0
for index, i in enumerate(arr):
answer += sum(arr[:index+1])
print(answer)
'알고리즘 > 알고리즘 문제' 카테고리의 다른 글
[python] 백준 > BFS > 토마토(7576) (0) | 2021.03.22 |
---|---|
[python] 백준 > 그래프 > 바이러스(2606) (0) | 2021.03.19 |
[python] 백준 > 이분 탐색 > 공유기 설치(2110) (0) | 2021.03.12 |
[python] 백준 > 그래프 > 인구 이동(16234) (0) | 2021.03.10 |
[python] 백준 > 그리디 > 주유소(13305) (0) | 2021.03.10 |