题目描述
blablabla
include[HTML_REMOVED]
int main()
{
int money,a,b,c,d,e,f,g;
scanf(“%d”,&money);
printf(“%d\n”,money);
if(money>=100)
a=money/100;
b=(money-a100)/50;
c=(money-100a-50b)/20;
d=(money-100a-50b-20c)/10;
e=(money-100a-50b-20c-10d)/5;
f=(money-100a-50b-20c-10d-e5)/2;
g=(money-100a-50b-20c-10d-e5-2*f)/1;
printf(“%d nota(s) de R$ 100,00\n”,a);
printf(“%d nota(s) de R$ 50,00\n”,b);
printf(“%d nota(s) de R$ 20,00\n”,c);
printf(“%d nota(s) de R$ 10,00\n”,d);
printf(“%d nota(s) de R$ 5,00\n”,e);
printf(“%d nota(s) de R$ 2,00\n”,f);
printf(“%d nota(s) de R$ 1,00\n”,g);
return 0;
}
样例
blablabla
算法1
(暴力枚举) $O(n^2)$
blablabla
时间复杂度
参考文献
C++ 代码
blablabla
算法2
(暴力枚举) $O(n^2)$
blablabla
时间复杂度
参考文献
C++ 代码
blablabla