백준 문제 풀이
백준 11399 파이썬 python ATM
hjp845
2019. 10. 26. 21:00
반응형
1
2
3
4
5
6
7
8
9
10
|
n = int(input())
arr = list(map(int, input().split()))
ans = 0
for i in range(n):
ans += arr[i] * (n - i)
print(ans)
|
http://colorscripter.com/info#e" target="_blank" style="text-decoration:none;color:white">cs |
그리디는 Greedy 탐욕이다. 시간이 제일 적게 걸리는 사람이 앞으로 올수록 이득이다.
반응형