题目描述
blablabla
样例
#include <iostream>
using namespace std;
int main(){
int N;
int denomination[7] = {100,50, 20, 10, 5, 2, 1};
int count[7] = {};
cin >> N;
printf("%d\n", N);
for (int i = 0; i < 7; i++){
count[i] = N/denomination[i];
N = N % denomination[i];
}
for (int j = 0; j < 7; j++){
printf("%d nota(s) de R$ %d,00\n", count[j], denomination[j]);
}
return 0;
}
算法1
(暴力枚举) $O(n^2)$
blablabla
时间复杂度
参考文献
C++ 代码
blablabla
算法2
(暴力枚举) $O(n^2)$
blablabla
时间复杂度
参考文献
C++ 代码
blablabla