Buggy python submission (verdict: Time Limit Exceeded):
N = int(input())
A = list(map(int, input().split()))
ans =1;
iszero = False

if 0 in A:
  iszero = True

for i in range(N):
  if(iszero):
    ans = 0
    break
    
  ans *= A[i]
  
  if ans>10**18:
    ans = -1

print(ans)


Fixed submission:
N = int(input())
A = list(map(int, input().split()))
ans =1;
iszero = False

if 0 in A:
  iszero = True
for i in range(N):
  if(iszero):
    ans = 0
    break
  ans *= A[i] 
  if ans>10**18:
    ans = -1
    break

print(ans)

Buggy python submission (verdict: Time Limit Exceeded):
N = int(input())
A = list(map(int, input().split()))
ans =1;
iszero = False

if 0 in A:
  iszero = True

for i in range(N):
  if(iszero):
    ans = 0
    break
    
  ans *= A[i]
  
  if(ans>10**18):
    ans = -1

print(ans)


Fixed submission:
N = int(input())
A = list(map(int, input().split()))
ans =1;
iszero = False

if 0 in A:
  iszero = True
for i in range(N):
  if(iszero):
    ans = 0
    break
  ans *= A[i] 
  if ans>10**18:
    ans = -1
    break

print(ans)

Buggy python submission (verdict: Runtime Error):
N = int(input())
A = list(map(int, input().split()))
ans =1;
iszero = False

if 0 in A:
  iszero = True

for i in range(N):
  if(iszero):
    ans = 0
    break
    
  ans *= A[i]
  
  if(ans>10**18):
    ans = -1

print(ans

Fixed submission:
N = int(input())
A = list(map(int, input().split()))
ans =1;
iszero = False

if 0 in A:
  iszero = True
for i in range(N):
  if(iszero):
    ans = 0
    break
  ans *= A[i] 
  if ans>10**18:
    ans = -1
    break

print(ans)

Buggy python submission (verdict: Runtime Error):
N = int(input())
A = list(map(int, input().split()))
ans =1;
iszero = False

for 0 in range A:
  if(A[i]==0):
    iszero = True

for i in range(N):
  if(iszero):
    ans = 0
    break
    
  ans *= A[i]
  
  if(ans>10**18):
    ans = -1

print(ans)

Fixed submission:
N = int(input())
A = list(map(int, input().split()))
ans =1;
iszero = False

if 0 in A:
  iszero = True
for i in range(N):
  if(iszero):
    ans = 0
    break
  ans *= A[i] 
  if ans>10**18:
    ans = -1
    break

print(ans)

Buggy python submission (verdict: Runtime Error):
N = int(input())
A = list(map(int, input().split()))
ans =1;
iszero = False

for 0 in range A:
  if(A[i]==0):
    iszero = True

for i in range(N):
  if(iszero):
    ans = 0
    break
    
  ans *= A[i]
  
  if(ans>10**18):
    ans = -1

print(ans

Fixed submission:
N = int(input())
A = list(map(int, input().split()))
ans =1;
iszero = False

if 0 in A:
  iszero = True
for i in range(N):
  if(iszero):
    ans = 0
    break
  ans *= A[i] 
  if ans>10**18:
    ans = -1
    break

print(ans)

Buggy python submission (verdict: Time Limit Exceeded):
N = int(input())
A = list(map(int, input().split()))
ans =1;
iszero = False

for i in range(N):
  if(A[i]==0):
    iszero = True

for i in range(N):
  if(iszero):
    ans = 0
    break
    
  ans *= A[i]
  
  if(ans>10**18):
    ans = -1

print(ans)

Fixed submission:
N = int(input())
A = list(map(int, input().split()))
ans =1;
iszero = False

if 0 in A:
  iszero = True
for i in range(N):
  if(iszero):
    ans = 0
    break
  ans *= A[i] 
  if ans>10**18:
    ans = -1
    break

print(ans)