https://www.acmicpc.net/problem/11399
BOJ 11399 - ATM
작성언어: Python3
n = int(input())
time = list(map(int, input().split()))
totalTime = 0
cumulativeTime = 0
time.sort()
for t in time:
cumulativeTime += t
totalTime += cumulativeTime
print(totalTime)
pc 환경에서 코드를 보는 것을 권장합니다.
'알고리즘 문제 풀기 > BOJ' 카테고리의 다른 글
BOJ 5585 - 거스름돈 (0) | 2020.03.16 |
---|---|
BOJ 1541 - 잃어버린 괄호 (0) | 2019.12.27 |
BOJ 1931 - 회의실배정 (0) | 2019.12.25 |
BOJ 11047 - 동전 0 (0) | 2019.12.24 |
BOJ 1011 - Fly me to the Alpha Centauri (0) | 2019.12.23 |