#include<stdio.h>
int count=0, y=0;
int zhengshu(int a)
{
int k=0;
if(a>=100)
{k=a/100; y=a%100;count=count+k;}
else if(a<100 && a>=50)
{k=a/50; y=a%50;count=count+k;}
else if(a<50 && a>=20 )
{k=a/20;y=a%20;count=count+k;}
else if(a<20 && a>=10)
{k=a/10;y=a%10;count=count+k;}
else if(a<10 && a>=5)
{k=a/5;y=a%5;count=count+k;}
else if(a<5 && a>=2)
{k=a/2; y=a%2;count=count+k;}
else if(a<2)
{k=a; y=0; count=count+k;}
if(y>=1) zhengshu(y);
return count;
}
void main()
{
int num,tt;
puts("输入金额:");
scanf("%d",&num);
tt=zhengshu(num);
printf("最少需要%d张。\n",tt);
}