Buggy python submission (verdict: Runtime Error):
def main ():
N = int(input())
A = list(map(int,input(). split ()))
if 0 in A:
print(0)
return
prod = 1
for a in A:
prod *= a
if prod > 1000000000000000000:
print(-1)
return
print(prod)
main ()


Fixed submission:
n=int(input())
a=list(map(int, input().split( )))
if 0 in a:
  print(0)
  
else:
    c=1
    for i in a:
        c= c*i
        if c> 10**18:
            c=-1
            break
    print(c)

Buggy python submission (verdict: Runtime Error):
N = int(input())
A = list(map(int,input(). split ()))
if 0 in A:
print(0)
return
prod = 1
for a in A:
prod *= a
if prod > 1000000000000000000:
print(-1)
return
print(prod)


Fixed submission:
n=int(input())
a=list(map(int, input().split( )))
if 0 in a:
  print(0)
  
else:
    c=1
    for i in a:
        c= c*i
        if c> 10**18:
            c=-1
            break
    print(c)

Buggy python submission (verdict: Runtime Error):
n=int(input())
b=list(map(int,input(). split ()))
if 0 in b:
  print(0)
  return
c=1
for i in b:
  c=c*i
  if c>10**18:
    print(-1)
    return
print(c)

Fixed submission:
n=int(input())
a=list(map(int, input().split( )))
if 0 in a:
  print(0)
  
else:
    c=1
    for i in a:
        c= c*i
        if c> 10**18:
            c=-1
            break
    print(c)

Buggy python submission (verdict: Runtime Error):
n=input()
b=list(map(int,input(). split ()))
if 0 in b:
  print(0)
  return
c=1
for i in b:
  c=c*i
  if c>10**18:
    print(-1)
    return
print(c)

Fixed submission:
n=int(input())
a=list(map(int, input().split( )))
if 0 in a:
  print(0)
  
else:
    c=1
    for i in a:
        c= c*i
        if c> 10**18:
            c=-1
            break
    print(c)

Buggy python submission (verdict: Runtime Error):
n=input()
b=list(map(int,input(). split ()))
c=1
if 0 in b:
  print(0)
  return
c=1
for i in b:
  c=c*i
  if c>10**18:
    print(-1)
    return
print(c)

Fixed submission:
n=int(input())
a=list(map(int, input().split( )))
if 0 in a:
  print(0)
  
else:
    c=1
    for i in a:
        c= c*i
        if c> 10**18:
            c=-1
            break
    print(c)

Buggy python submission (verdict: Runtime Error):
n=input()
b=list(map(int,input(). split ()))
c=1
if 0 in b:
  print(0)
  return
c=1
for i in b:
  c=c*i
  if c>10**18:
      print(-1)
      return
print(c)

Fixed submission:
n=int(input())
a=list(map(int, input().split( )))
if 0 in a:
  print(0)
  
else:
    c=1
    for i in a:
        c= c*i
        if c> 10**18:
            c=-1
            break
    print(c)

Buggy python submission (verdict: Runtime Error):
n=input()
b=list(map(int,input(). split ()))
c=1
if 0 in b:
  print(0)
else:
  c=1
  for i in b:
    c=c*i
    if c>10**18:
      print(-1)
      return
print(c)

Fixed submission:
n=int(input())
a=list(map(int, input().split( )))
if 0 in a:
  print(0)
  
else:
    c=1
    for i in a:
        c= c*i
        if c> 10**18:
            c=-1
            break
    print(c)

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

Fixed submission:
n=int(input())
a=list(map(int, input().split( )))
if 0 in a:
  print(0)
  
else:
    c=1
    for i in a:
        c= c*i
        if c> 10**18:
            c=-1
            break
    print(c)

Buggy python submission (verdict: Runtime Error):
n=input()
b=list(map(int , input().slice()))
c=1
for i in b:
  c=c*i
if c>10**18:
  print(-1)  
else:
  print(c)

Fixed submission:
n=int(input())
a=list(map(int, input().split( )))
if 0 in a:
  print(0)
  
else:
    c=1
    for i in a:
        c= c*i
        if c> 10**18:
            c=-1
            break
    print(c)

Buggy python submission (verdict: Runtime Error):
n=input()
b=list(map(int , input().slice()))
c=1
for i in range(1,n):
  c=c*b[i]

if c>10**18:
  print(-1)  
else:
  print(c)

Fixed submission:
n=int(input())
a=list(map(int, input().split( )))
if 0 in a:
  print(0)
  
else:
    c=1
    for i in a:
        c= c*i
        if c> 10**18:
            c=-1
            break
    print(c)

Buggy python submission (verdict: Runtime Error):
n=input()
b=list(map(int , input().slice()))
c=1
for i in range(1,n):
  c=c*b[i]
  if c>10**18:
    print(-1)
  
print(c)

Fixed submission:
n=int(input())
a=list(map(int, input().split( )))
if 0 in a:
  print(0)
  
else:
    c=1
    for i in a:
        c= c*i
        if c> 10**18:
            c=-1
            break
    print(c)

Buggy python submission (verdict: Runtime Error):
n=input()
b=map(int , input().slice())
c=1
for i in range(1,n):
  c=c*b[i]
  
print(c)

Fixed submission:
n=int(input())
a=list(map(int, input().split( )))
if 0 in a:
  print(0)
  
else:
    c=1
    for i in a:
        c= c*i
        if c> 10**18:
            c=-1
            break
    print(c)