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