/** * A+B for Input-Output Practice (VIII) * 和Problem1000是同一个题目,注意题目的输入输出格式. * 输出结果之间要有blank line,末尾不能有blank line. * Created by YangYuan on 2017/12/7. */ public class Problem1096 { public static void main(String[] args) { Scanner scanner = new Scanner(System.in); int n = scanner.nextInt(); for (int i = 0; i < n; i++) { int m = scanner.nextInt(); int sum = 0; for (int j = 0; j < m; j++) sum += scanner.nextInt(); System.out.println(sum); if (i != n - 1) System.out.println(); } } }