def find(l) :
ts = sum(l)
ls= 0
flag=0
for i in range(len(l)):
ts -= l[i]
if ls == ts:
flag=1
break
ls += l[i]
if flag==1:
return i+1,ls
else:
return 0,0
t=int(input())
for i in range(t):
n=int(input())
l=list(map(int,input().split()))
print(*find(l))
ts = sum(l)
ls= 0
flag=0
for i in range(len(l)):
ts -= l[i]
if ls == ts:
flag=1
break
ls += l[i]
if flag==1:
return i+1,ls
else:
return 0,0
t=int(input())
for i in range(t):
n=int(input())
l=list(map(int,input().split()))
print(*find(l))
No comments:
Post a Comment