#include<stdio.h>
int main(){
int i,n,m,a[100],b,c,d,e,f,g;
while(scanf("%d",&n)!=EOF){
if(n==0) break;
else{
m=0;
for(i=0;i<n;i++){
scanf("%d",&a[i]);
b=a[i]/100;
c=(a[i]-b*100)/50;
d=(a[i]-b*100-c*50)/10;
e=(a[i]-b*100-c*50-d*10)/5;
f=(a[i]-b*100-c*50-d*10-e*5)/2;
g=(a[i]-b*100-c*50-d*10-e*5-2*f)/1;
m+=b+c+d+e+f+g;
}
printf("%d\n",m);
}
}
return 0;
}
hdoj_2021
最新推荐文章于 2021-05-01 16:57:35 发布