Algorithm/Baekjoon
[백준] 11399 : ATM - Python
Dev.sohee
2020. 3. 11. 23:33
https://www.acmicpc.net/problem/11399
11399번: ATM
첫째 줄에 사람의 수 N(1 ≤ N ≤ 1,000)이 주어진다. 둘째 줄에는 각 사람이 돈을 인출하는데 걸리는 시간 Pi가 주어진다. (1 ≤ Pi ≤ 1,000)
www.acmicpc.net
N = int(input())
people = sorted(list(map(int, input().split())))
result = time = 0
for i in range(0, N):
time += people[i]
result += time
print(result)