4 1 2 3 4 5 1 2 3 4 5 0
10 15
#include <stdio.h> int main() { int n, number, sum; while(scanf("%d", &n), n) { sum = 0; while (n--) { scanf("%d", &number); sum += number; } printf("%d\n", sum); } return 0; }执行时间:
原文地址:http://blog.csdn.net/xumesang/article/details/45010183