题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=2021
#include <iostream>
#define rep(i, k, n) for (int i = k; i < (n); i++)
using namespace std;
int n, x;
int money[6] = {100, 50, 10, 5, 2, 1};
int main()
{
while (cin >> n && n)
{
int ans = 0;
while (n--)
{
cin >> x;
rep(i, 0, 6)
{
ans += x / money[i];
x %= money[i];
}
}
cout << ans << endl;
}
return 0;
}