This commit is contained in:
krahets
2023-07-19 01:45:14 +08:00
parent 03cbf5b972
commit c68f18e480
8 changed files with 10 additions and 10 deletions

View File

@ -188,7 +188,7 @@ $$
!!! question
给定 $n$ 种硬币,第 $i$ 个硬币的面值为 $coins[i - 1]$ 目标金额 $amt$ **每种硬币可以重复选取**,问能够凑出目标金额的最少硬币个数。如果无法凑出目标金额则返回 $-1$ 。
给定 $n$ 种硬币,第 $i$ 个硬币的面值为 $coins[i - 1]$ ,目标金额 $amt$ **每种硬币可以重复选取**,问能够凑出目标金额的最少硬币个数。如果无法凑出目标金额则返回 $-1$ 。
如下图所示,凑出 $11$ 元最少需要 $3$ 枚硬币,方案为 $1 + 2 + 5 = 11$ 。