쏘ing
[Python] 백준 11047 동전 0 본문
https://www.acmicpc.net/problem/11047
풀이
N, K = map(int, input().split())
coin = []
for _ in range (N):
coin.append(int(input()))
index = N-1
count = 0
while K > 0:
if coin[index] > K:
index -= 1
else:
count += K // coin[index]
K %= coin[index]
print(count)
'알고리즘 > CLASS 3' 카테고리의 다른 글
[Python] 백준 1463 1로 만들기 (0) | 2022.02.21 |
---|---|
[Python] 백준 9095 1, 2, 3 더하기 (0) | 2022.02.21 |
[Python] 백준 11399 ATM (0) | 2022.02.21 |
[Python] 백준 11279 최대 힙 (0) | 2022.02.21 |
[Python] 백준 1764 듣보잡 (0) | 2022.02.21 |
Comments