t=int(input()) for i in range(t): n=int(input()) print(sum(list(map(int,input().split()))))