标签:
http://acm.hdu.edu.cn/showproblem.php?pid=2021
water~~~
1 #include<iostream> 2 #include<stdio.h> 3 #include<math.h> 4 #include<string.h> 5 #include<stdlib.h> 6 #include<limits.h> 7 using namespace std; 8 9 int main() 10 { 11 int n; 12 while(~scanf("%d",&n)&&n) 13 { 14 int sum=0; 15 int t; 16 for(int i=0;i<n;i++) 17 { 18 scanf("%d",&t); 19 sum+=t/100; 20 t=t%100; 21 sum+=t/50; 22 t=t%50; 23 sum+=t/10; 24 t=t%10; 25 sum+=t/5; 26 t=t%5; 27 sum+=t/2; 28 t=t%2; 29 sum+=t/1; 30 t=t%1; 31 } 32 printf("%d\n",sum); 33 } 34 return 0; 35 }
标签:
原文地址:http://www.cnblogs.com/xuesen1995/p/4555394.html