T = int(input()) for t in range(T): N = int(input()) A = list(map(int,input().split())) print(sum(A))