Buggy python submission (verdict: Runtime Error):
N = int(input())
a = list(map(int, input().split()))
b = 1
if 0 in a:
  b = 0
else:
  for i in range(N):
    b = b * a[i]
    if b > 10 ** 18:
      b = 'out'

if b == 'out':
  print(-1)
else:
  print(b)


Fixed submission:
import sys
n = input()
list_num =list(map(int,input().split()))
output = 1
if 0 in list_num:
    print(0)
    sys.exit()
for i in list_num:
    output = output * i
    if output > 10 ** 18:
        print(-1)
        sys.exit()
print(output)

Buggy python submission (verdict: Runtime Error):
N = int(input())
a = list(map(int, input().split()))
b = 1
if 0 in a:
  b = 0
else:
  for i in range(N):
    b *= a[i]
    if b > 10 ** 18:
      b = 'out'

if b == 'out':
  print(-1)
else:
  print(b)

Fixed submission:
import sys
n = input()
list_num =list(map(int,input().split()))
output = 1
if 0 in list_num:
    print(0)
    sys.exit()
for i in list_num:
    output = output * i
    if output > 10 ** 18:
        print(-1)
        sys.exit()
print(output)

Buggy python submission (verdict: Time Limit Exceeded):
N = int(input())
a = list(map(int, input().split()))
b = 1
for i in range(N):
  b *= a[i]
  if 0 in a:
    b = 0
    break
  elif b > 10 ** 18:
    b = 'out'
    break
if b == 'out':
  print(-1)
else:
  print(b)


Fixed submission:
import sys
n = input()
list_num =list(map(int,input().split()))
output = 1
if 0 in list_num:
    print(0)
    sys.exit()
for i in list_num:
    output = output * i
    if output > 10 ** 18:
        print(-1)
        sys.exit()
print(output)

Buggy python submission (verdict: Runtime Error):
from numba import njit
N = int(input())
a = list(map(int, input().split()))
@njit()
def main():
  b = 1
  for i in range(N):
    b *= a[i]
    if 0 in a:
      b = 0
      break
    elif b > 10 ** 18:
      b = 'out'
      break
  if b == 'out':
    print(-1)
  else:
    print(b)
main()

Fixed submission:
import sys
n = input()
list_num =list(map(int,input().split()))
output = 1
if 0 in list_num:
    print(0)
    sys.exit()
for i in list_num:
    output = output * i
    if output > 10 ** 18:
        print(-1)
        sys.exit()
print(output)

Buggy python submission (verdict: Time Limit Exceeded):
N = int(input())
a = list(map(int, input().split()))
b = 1
for i in range(N):
  b *= a[i]
  if 0 in a:
    b = 0
    break
  elif b > 10 ** 18:
    b = 'out'
    break
if b == 'out':
  print(-1)
else:
  print(b)


Fixed submission:
import sys
n = input()
list_num =list(map(int,input().split()))
output = 1
if 0 in list_num:
    print(0)
    sys.exit()
for i in list_num:
    output = output * i
    if output > 10 ** 18:
        print(-1)
        sys.exit()
print(output)

Buggy python submission (verdict: Time Limit Exceeded):
N = int(input())
a = list(map(int, input().split()))
b = 1
for i in range(N):
  b *= a[i]
if b > 10 ** 18:
  print(-1)
else:
  print(b)

Fixed submission:
import sys
n = input()
list_num =list(map(int,input().split()))
output = 1
if 0 in list_num:
    print(0)
    sys.exit()
for i in list_num:
    output = output * i
    if output > 10 ** 18:
        print(-1)
        sys.exit()
print(output)

Buggy python submission (verdict: Time Limit Exceeded):
N = int(input())
a = list(map(int, input().split()))
b = 1
for i in range(N):
  b *= a[i]
if b > 10 ** 18:
  print(-1)
else:
  print(b)


Fixed submission:
import sys
n = input()
list_num =list(map(int,input().split()))
output = 1
if 0 in list_num:
    print(0)
    sys.exit()
for i in list_num:
    output = output * i
    if output > 10 ** 18:
        print(-1)
        sys.exit()
print(output)