#include<stdio.h>
int count(int n)
{
int sum=0;
int a[6]={1,2,5,10,50,100};
for(int i=5;i>=0;i--)
{
sum+=n/a[i];
n%=a[i];
}
return sum;
}
int main()
{
int n,num;//总人数,总张数
int b[100];
while(scanf("%d",&n)!=EOF&&n!=0)
{
num=0;
for(int i=1;i<=n;i++)
scanf("%d",&b[i]);
for(int i=1;i<=n;i++)
{
num+=count(b[i]);
}
printf("%d\n",num);
}
return 0;
}
杭电2021
![](https://img-home.csdnimg.cn/images/20240711042549.png)