标签:就是 std other 多少 ott 输入数据 span 准备 tput
Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)
Total Submission(s): 86355 Accepted Submission(s): 45846
1 #include<iostream> 2 //典型找零问题 3 using namespace std; 4 int main() 5 { 6 int n; 7 while (scanf("%d", &n), n) 8 { 9 int sum = 0; 10 int num; 11 while (n--) 12 { 13 cin >> num; 14 int summ = 0; 15 while (num) 16 { 17 summ = num / 100; 18 num %= 100; 19 20 summ += num / 50; 21 num %= 50; 22 23 summ += num / 10; 24 num %= 10; 25 26 summ += num / 5; 27 num %= 5; 28 29 summ += num / 2; 30 num %= 2; 31 32 summ += num / 1; 33 num %= 1; 34 35 } 36 sum += summ; 37 } 38 cout << sum << endl; 39 } 40 system("pause"); 41 return 0; 42 }
标签:就是 std other 多少 ott 输入数据 span 准备 tput
原文地址:https://www.cnblogs.com/lightice/p/10261299.html