发工资咯:)
#include<iostream>
using namespace std;
#include<cmath>
int main()
{
int n,i,sum = 0;
while(cin>>n)
{
if(n == 0)
break;
int *a = new int[n];
for(i = 0 ; i < n ; i++)
cin>>a[i];
for(i = 0 ; i < n ; i++)
{
sum += a[i] / 100;
sum += a[i] % 100 / 50;
sum += a[i] % 100 % 50 / 10;
sum += a[i] % 100 % 50 % 10 / 5;
sum += a[i] % 100 % 50 % 10 % 5 / 2;
sum += a[i] % 100 % 50 % 10 % 5 % 2 / 1;
}
cout<< sum <<endl;
sum = 0;
delete []a;
}
return 0;
}