#include <stdio.h>
int main()
{
int n;
int q100,q50,q20,q10,q5,q2,q1;
scanf("%d",&n);
if(n <10000){
q100 = n/100;
q50 = n%100/50;
q20 = n%100%50/20;
q10 = n%100%50%20/10;
q5 = n%100%50%20%10/5;
q2 = n%100%50%20%10%5/2;
q1 = n%100%50%20%10%5%2;
printf("100元: %2d张\n 50元: %d张\n 20元: %d张\n 10元: %d张\n 5元: %d张\n 2元: %d张\n 1元: %d张\n",q100,q50,q20,q10,q5,q2,q1);
}
return 0;
}
pta 7-2 发奖金
![](https://img-home.csdnimg.cn/images/20240711042549.png)