-
11047, Silver 2백준 2021. 8. 19. 14:58
문제
- $n(1 \leq n \leq 10)$ 종류의 동전$c_{1},\ c_{2},\ \cdot \cdot \cdot,\ c_{n}(c_{i}\mid c_{i+1})$이 주어진다
- 이 동전들로 $k$원을 내기 위한 최소 개수를 구하라(돈을 못 내는 경우는 존재하지 않는다)
$O(n)$
Greedy
단위가 큰 동전을 우선으로 가능한 많은 돈을 낸다Claim
'백준' 카테고리의 다른 글
16768, Gold 4 (0) 2021.09.21 1654, Silver 3 (0) 2021.09.15 18242, silver 5 (0) 2021.08.18 16237, bronze 1 (0) 2021.08.16 11000 (0) 2021.08.03