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