找零钱!
来源:互联网 发布:比较好的二手车软件 编辑:程序博客网 时间:2024/06/11 22:34
Description
现在有1,2,5,10,20,50,100面值的人名币若干。你的任务就是用最少的张数来找钱。如需要找23元,我们用一张20,一张2元,一张1元即可。所以3张就是最少的张数。
Sample Input
2236
Sample Output
32
#include <iostream>
using namespace std;
int a[]={100,50,20,10,5,2,1};
int f(int n)
{
}
int main()
{
}
0 0