#include <iostream>
#include <cstdio>
using namespace std;
const int maxn = 110;
int person[maxn];
int n;
int num = 0;
int work(int x) {
int tmp = 0;
while(x >= 100) {
x -= 100;
tmp ++;
}
while(x >= 50) {
x -= 50;
tmp ++;
}
while(x >= 10) {
x -= 10;
tmp ++;
}
while(x >= 5) {
x -= 5;
tmp ++;
}
while(x >= 2) {
x -= 2;
tmp ++;
}
while(x >= 1) {
x -= 1;
tmp++;
}
return tmp;
}
int main(){
while(scanf("%d", &n) != EOF) {
if(0 == n) { break; }
for(int i = 1; i <= n; i++) {
scanf("%d", &person[i]);
int tmp = work(person[i]);
num += tmp;
}
cout << num << endl;
num = 0;
}
return 0;
}
hdu2021(发工资咯:)
最新推荐文章于 2022-01-10 16:10:19 发布