for _ in [0] * int(input()): n = int(input()) print(sum(map(int, input().split())))