#include<iostream>
using namespace std;
int main()
{
int n;
while (cin >> n)
{
if (n == 0)
break;
int x, sum=0 ;
int n1, n2, n3, n4, n5,n6;
while (n--&&cin >> x)
{
n1 = x / 100;
n2 = (x - n1*100) / 50;
n3 = (x - n1 * 100 - n2 * 50) / 10;
n4 = (x - n1 * 100 - n2 * 50 - n3 * 10) / 5;
n5 = (x - n1 * 100 - n2 * 50 - n3 * 10 - n4 * 5)/2;
n6 = (x - n1 * 100 - n2 * 50 - n3 * 10 - n4 * 5 - n5 * 2)/1;
sum = sum + n1 + n2 + n3 + n4 + n5+n6;
}
cout << sum << endl;
}
return 0;
}
2021 发工资咯:)
最新推荐文章于 2024-02-28 12:04:39 发布