Programming/Python & Data Structures
[Baekjoon/Python3] 11399번 ATM
HooNeee
2020. 12. 7. 00:27
[Baekjoon/Python3] 11399번 ATM
11399번: ATM
첫째 줄에 사람의 수 N(1 ≤ N ≤ 1,000)이 주어진다. 둘째 줄에는 각 사람이 돈을 인출하는데 걸리는 시간 Pi가 주어진다. (1 ≤ Pi ≤ 1,000)
www.acmicpc.net
n = int(input())
time = list(map(int, input().split()))
t = 0
res = 0
for i in range(n):
t += min(time)
res += t
time.remove(min(time))
print(res)