Buggy python submission (verdict: Runtime Error):
n = int(input())
a = [i for i in map(int, input().split())]

if a.count(0) != 0:
    print(0)
else:
    result = 1
    for i in range(n):
        result *= a[i]
        if result > (10**18):
            print(-1)
            break
        else:
            continue

print(result)

Fixed submission:
n = int(input())
a = [i for i in map(int, input().split())]
 
if a.count(0) != 0:
  print(0)
else:
  result = 1
  for i in range(n):
    result *= a[i]
    if result > (10**18):
      print(-1)
      break
    else:
      continue
  else:
    print(result)

Buggy python submission (verdict: Runtime Error):
N = int(input())
A =[i for i in map(int, input().split())]

if a.count(0) != 0:
    print(0)
else:
    result = 1
    for i in range(N):
        result *= A[i]
        if result > (10**18):
            print(-1)
            break
        else:
            continue
    else:
        print(result)

Fixed submission:
n = int(input())
a = [i for i in map(int, input().split())]
 
if a.count(0) != 0:
  print(0)
else:
  result = 1
  for i in range(n):
    result *= a[i]
    if result > (10**18):
      print(-1)
      break
    else:
      continue
  else:
    print(result)

Buggy python submission (verdict: Runtime Error):
N = int(input())
A =[i for i in map(int, input().split())]

if a.count(0) != 0:
    print(0)
else:
    result = 1
    for i in range(N):
        result *= A[i]
        if result > (10**18):
            print(-1)
            break
        else:
            continue
print(result)

Fixed submission:
n = int(input())
a = [i for i in map(int, input().split())]
 
if a.count(0) != 0:
  print(0)
else:
  result = 1
  for i in range(n):
    result *= a[i]
    if result > (10**18):
      print(-1)
      break
    else:
      continue
  else:
    print(result)

Buggy python submission (verdict: Runtime Error):
N = int(input())
A =[i for i in map(int, input().split())]

result = 1
for i in range(n):
    result *= a[i]
    if result > (10**18):
        print(-1)
        break
    else:
        continue
print(result)

Fixed submission:
n = int(input())
a = [i for i in map(int, input().split())]
 
if a.count(0) != 0:
  print(0)
else:
  result = 1
  for i in range(n):
    result *= a[i]
    if result > (10**18):
      print(-1)
      break
    else:
      continue
  else:
    print(result)

Buggy python submission (verdict: Runtime Error):
N =int(input())
A = map(int, input().split())
 
for a in A:
    ans *= a
    if ans > 10**18:
        print(-1)
        exit()
print(ans)

Fixed submission:
n = int(input())
a = [i for i in map(int, input().split())]
 
if a.count(0) != 0:
  print(0)
else:
  result = 1
  for i in range(n):
    result *= a[i]
    if result > (10**18):
      print(-1)
      break
    else:
      continue
  else:
    print(result)

Buggy python submission (verdict: Runtime Error):
N =input()
A = map(int, input().split())
 
for a in A:
    ans *= a
    if ans > 10**18:
        print(-1)
        exit()
print(ans)

Fixed submission:
n = int(input())
a = [i for i in map(int, input().split())]
 
if a.count(0) != 0:
  print(0)
else:
  result = 1
  for i in range(n):
    result *= a[i]
    if result > (10**18):
      print(-1)
      break
    else:
      continue
  else:
    print(result)

Buggy python submission (verdict: Runtime Error):
N =input()
A = (map(int, input().split()))

for a in A:
    ans *= a
    if ans > 10**18:
        print(-1)
        exit()
print(ans)
  

Fixed submission:
n = int(input())
a = [i for i in map(int, input().split())]
 
if a.count(0) != 0:
  print(0)
else:
  result = 1
  for i in range(n):
    result *= a[i]
    if result > (10**18):
      print(-1)
      break
    else:
      continue
  else:
    print(result)