#include <stdio.h> int main(void) { int n, m; int i, j; long sum, tmp; scanf("%d", &n); for (i = 0; i < n; i++) { scanf("%d", &m); sum = 0; for (j = 0; j < m; j++) { scanf("%ld", &tmp); sum += tmp; } printf("%ld\n", sum); } }