杭电acm2021

#include <stdio.h>

int main() {
	
	int n, sum, a, b, c, d, e, f, i, temp ,ans;
	while(scanf("%d", &n) != EOF) {
		if(n==0)	break;
		sum = 0;
		for(i=0; i<n; i++) {
			scanf("%d", &temp);
			sum += temp / 100;
			temp %= 100;
			sum += temp / 50;
			temp %= 50;
			sum += temp / 10;
			temp %= 10;
			sum += temp / 5;
			temp %= 5;
			sum += temp / 2;
			temp %= 2;
			sum += temp;
		}
		
		printf("%d\n", sum);
	}
	
	return 0;
}

posted @ 2015-03-12 14:35  StevenLuke  阅读(164)  评论(0编辑  收藏  举报