题目描述
blablabla
样例
#include<iostream>
using namespace std;
int main(){
int n;
cin>>n;
int a,b,c,d,e,f,g,t;
a=n/100;
t=n%100;
b=t/50;
t=t%50;
c=t/20;
t=t%20;
d=t/10;
t=t%10;
e=t/5;
t=t%5;
f=t/2;
t=t%2;
g=t/1;
cout<<n<<"\n";
cout<<a<<" nota(s) de R$ 100,00"<<"\n";
cout<<b<<" nota(s) de R$ 50,00"<<"\n";
cout<<c<<" nota(s) de R$ 20,00"<<"\n";
cout<<d<<" nota(s) de R$ 10,00"<<"\n";
cout<<e<<" nota(s) de R$ 5,00"<<"\n";
cout<<f<<" nota(s) de R$ 2,00"<<"\n";
cout<<g<<" nota(s) de R$ 1,00"<<"\n";
return 0;
}
算法1
(暴力枚举) $O(n^2)$
blablabla
时间复杂度
参考文献
C++ 代码
blablabla
算法2
(暴力枚举) $O(n^2)$
blablabla
时间复杂度
参考文献
C++ 代码
blablabla