Continuing the discussion from WWALK - Editorial:
I am getting output in jupyter notebook but in code chef it is showing wrong answer.
for i in range(int(input())):
a = int(input())
b,c = list(map(int,input().split())),list(map(int,input().split()))
d = 0
for j in range(1,a+1):
if b[j-1] == c[j-1]:
d = d+(b[j-1])
print(d)