Input() and sys.stdin.readline() gives NZEC error while submission

I have tried all the solutions mentioned in the forum like submitting the code in NON-IDLE way, using sys library (sys.stdin.readline()) and also avoiding t as a variable. But it still gives NZEC error. My code is correct as it gives the correct answer for the custom input. Please help.

Code for reference: Problem code :MYSARA

cook your dish here

def possibilities(a1,a2):
a_b1=’{0:032b}’.format(a1)
a_b2=’{0:032b}’.format(a2)
ans=1.
for i in range(32):
if a_b1[i]==‘1’ and a_b2[i]==‘1’:
ans*=2.
elif a_b1[i]==‘0’ and a_b2[i]==‘1’:
ans=0.
break
return ans
for _ in range(int(input())):
n=int(input())
l=list(map(int,input().split()))
ans=1.
for i in range(1,len(l)):
ans*=possibilities(l[i],l[i-1])
if ans==0.:
break
print(int(ans % (pow(10,9)+7)))