题目链接: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;
}


相关文章:

  • 2022-12-23
  • 2021-04-16
  • 2021-08-07
  • 2021-12-16
  • 2022-12-23
  • 2021-12-06
  • 2021-10-27
  • 2022-01-30
猜你喜欢
  • 2021-11-20
  • 2022-12-23
  • 2022-12-23
  • 2022-01-02
  • 2021-12-21
  • 2022-01-23
相关资源
相似解决方案