#740. 硬币问题
硬币问题
问题描述
今有面值为 1、5、11 元的硬币各无限枚。想要凑出 n 元,问需要的最少硬币数量。
输入
仅一行,一个正整数 n。
Output
仅一行,一个正整数,表示需要的硬币个数。
Samples
15
3
12
2
Limitation
对于 100% 的数据,2≤n≤
今有面值为 1、5、11 元的硬币各无限枚。想要凑出 n 元,问需要的最少硬币数量。
仅一行,一个正整数 n。
仅一行,一个正整数,表示需要的硬币个数。
15
3
12
2
对于 100% 的数据,2≤n≤106
By signing up a Hydro universal account, you can submit code and join discussions in all online judging services provided by us.