[백준 11399 파이썬] ATM

일단 해볼게·2022년 10월 19일
0

백준

목록 보기
29/132

https://www.acmicpc.net/problem/11399

# ATM

N = int(input())
P = list(map(int, input().split()))
result = 0
time = 0

P.sort() # P를 정렬

for i in P:
    time += i # Pn이 걸리는 시간
    result += time # Pn을 모두 더한 결과값

print(result)
profile
시도하고 More Do하는 백엔드 개발자입니다.

0개의 댓글