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