AcWing 653. 钞票
原题链接
简单
作者:
fengyutong
,
2024-11-08 00:19:56
,
所有人可见
,
阅读 1
调试的时候发现忘了换行,以后最后都加上\n
#include<cstdio>
int main()
{
int n;
scanf("%d",&n);
printf("%d\n",n);
printf("%d nota(s) de R$ 100,00\n",n/100);
n%=100;
printf("%d nota(s) de R$ 50,00\n",n/50);
n%=50;
printf("%d nota(s) de R$ 20,00\n",n/20);
n%=20;
printf("%d nota(s) de R$ 10,00\n",n/10);
n%=10;
printf("%d nota(s) de R$ 5,00\n",n/5);
n%=5;
printf("%d nota(s) de R$ 2,00\n",n/2);
n%=2;
printf("%d nota(s) de R$ 1,00\n",n);
return 0;
}