What is wrong with my code? All public test cases are passed but when i submit it, it shows wrong answer.
# cook your dish here
for _ in range(int(input())):
n=int(input())
l=list(map(int,input().split()))
tot=sum(l)
if abs(tot)%2==0:
print(tot//2)
else:
print(-1)