标签:des io 数据 for 问题 div 工作 amp
#include<stdio.h>
int main()
{
int n,i,a[100],b[100],c,d,e,f,g,h,x;
while(scanf("%d",&n)!=EOF&&n!=0)
{
x=0;
for(i=0;i<n;i++)
{
scanf("%d",&a[i]);
c=a[i]/100;
d=(a[i]-100*c)/50;
e=(a[i]-100*c-50*d)/10;
f=(a[i]-100*c-50*d-10*e)/5;
g=(a[i]-100*c-50*d-10*e-5*f)/2;
h=a[i]-100*c-50*d-10*e-5*f-2*g;
b[i]=c+d+e+f+g+h;
x=x+b[i];
}
printf("%d\n",x);
}
return 0;
}
标签:des io 数据 for 问题 div 工作 amp
原文地址:http://www.cnblogs.com/gongpulin/p/3887244.html