HDU 2021 发工资咯:)(水题)
题目链接:HDU 2021 发工资咯:)
#include<iostream>
#include<cstdio>
#include<algorithm>
#include<string>
#include<cstring>
using namespace std;
typedef long long ll;
const int maxn = 10010;
const int INF = 0x3f3f3f3f;
int a[maxn];
int cal(int x)
{
int res = 0;
}
int main()
{
int n;
while(scanf("%d",&n)!=EOF&&n)
{
int tmp,ans = 0;
for(int i=0;i<n;i++)
{
scanf("%d",&tmp);
ans += tmp/100;
tmp %= 100;
ans += tmp/50;
tmp %= 50;
ans += tmp/10;
tmp %= 10;
ans += tmp/5;
tmp %= 5;
ans += tmp/2;
tmp %= 2;
ans += tmp;
}
printf("%d\n",ans);
}
return 0;
}