mirror of
https://github.com/krahets/hello-algo.git
synced 2025-11-02 12:58:42 +08:00
Finetune
This commit is contained in:
@ -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$ 。
|
||||
|
||||
|
||||
Reference in New Issue
Block a user