Buggy python submission (verdict: Time Limit Exceeded):
n = int(input())
ls = list(map(int, input().split()))
res = 1
if 0 in ls:
    res = 0
for x in ls:
    res *= x
    if res > 10**18:
        res = -1
print(res)

Fixed submission:
n = int(input())
ls = list(map(int, input().split()))
res = 1
if 0 in ls:
    print(0)
    quit()
for x in ls:
    res *= x
    if res > 10**18:
        print(-1)
        quit()
print(res)

Buggy python submission (verdict: Runtime Error):
a, b = map(float, input().split())
print(int(a * b))
n = int(input())
ls = list(map(int, input().split()))
res = 1
if 0 in ls:
    res = 0
for x in ls:
    res *= x
    if res > 10**18:
        res = -1
print(res)

Fixed submission:
n = int(input())
ls = list(map(int, input().split()))
res = 1
if 0 in ls:
    print(0)
    quit()
for x in ls:
    res *= x
    if res > 10**18:
        print(-1)
        quit()
print(res)

Buggy python submission (verdict: Runtime Error):
a, b = map(float, input().split())
print(int(a * b))
n = int(input())
ls = list(map(int, input().split()))
res = 1
if 0 in ls:
    res = 0
for x in ls:
    res *= x
    if res > 10**18:
        res = -1
print(res)

Fixed submission:
n = int(input())
ls = list(map(int, input().split()))
res = 1
if 0 in ls:
    print(0)
    quit()
for x in ls:
    res *= x
    if res > 10**18:
        print(-1)
        quit()
print(res)

Buggy python submission (verdict: Runtime Error):
A,B  = map(float, input().split())
print(int(A * B))
N = int(input())
lst = list(map(int, input().split()))
res = 1
if 0 in lst:
    res = 0
for x in lst:
    res *= x
    if res > 10**18:
        res = -1
print(res)

Fixed submission:
n = int(input())
ls = list(map(int, input().split()))
res = 1
if 0 in ls:
    print(0)
    quit()
for x in ls:
    res *= x
    if res > 10**18:
        print(-1)
        quit()
print(res)

Buggy python submission (verdict: Runtime Error):
N = int(input())
lst = list(map(int,input().split())
output = 1
if 0 in lst :
	print(0)
    quit()
for x in lst :
	output = output * x           
    if output > 10**8 :
    	print(-1)
        quit()
print(output)

Fixed submission:
n = int(input())
ls = list(map(int, input().split()))
res = 1
if 0 in ls:
    print(0)
    quit()
for x in ls:
    res *= x
    if res > 10**18:
        print(-1)
        quit()
print(res)

Buggy python submission (verdict: Runtime Error):
N = int(input())
lst = list(map(int, input().split()))
lst = sorted(A,reverse=True)
output = 1
if 0 in lst:
    print(0)
    quit()
else:
    for i in range(N):
        output = output*A[i]
        if output>= 10**18:
            print(-1)
            quit()
print(output)

Fixed submission:
n = int(input())
ls = list(map(int, input().split()))
res = 1
if 0 in ls:
    print(0)
    quit()
for x in ls:
    res *= x
    if res > 10**18:
        print(-1)
        quit()
print(res)

Buggy python submission (verdict: Runtime Error):
n = int(input())
lst = list(map(int, input().split()))
output = 1
if 0 in lst:
    print(0)
    quit()
for x in lst:
    output = output * x
    if res > 10**18:
        print(-1)
        quit()
print(output)


Fixed submission:
n = int(input())
ls = list(map(int, input().split()))
res = 1
if 0 in ls:
    print(0)
    quit()
for x in ls:
    res *= x
    if res > 10**18:
        print(-1)
        quit()
print(res)

Buggy python submission (verdict: Runtime Error):
N = int(input())
lst = list(map(int, input().split()))
output = 1
if 0 in lst:
    print(0)
    quit()
for i in ls:
    output *= i
    if output > 10**18:
        print(-1)
        quit()
print(output)

Fixed submission:
n = int(input())
ls = list(map(int, input().split()))
res = 1
if 0 in ls:
    print(0)
    quit()
for x in ls:
    res *= x
    if res > 10**18:
        print(-1)
        quit()
print(res)

Buggy python submission (verdict: Time Limit Exceeded):
N = int(input())
lst = list(map(int,input().split()))
if N == len(lst) :
    output = 1
    for m in lst :
        output *= m
    if output <= 1000000000000000000 :
        print(output)
    else :
        print(-1)
else :
    exit()

Fixed submission:
n = int(input())
ls = list(map(int, input().split()))
res = 1
if 0 in ls:
    print(0)
    quit()
for x in ls:
    res *= x
    if res > 10**18:
        print(-1)
        quit()
print(res)

Buggy python submission (verdict: Time Limit Exceeded):
N = int(input())
lst = list(map(int,input().split()))
if N == len(lst) :
    output = 1
    for m in lst :
        output *= m
    if output <= 1000000000000000000 :
        print(output)
    else :
        print(-1)

Fixed submission:
n = int(input())
ls = list(map(int, input().split()))
res = 1
if 0 in ls:
    print(0)
    quit()
for x in ls:
    res *= x
    if res > 10**18:
        print(-1)
        quit()
print(res)

Buggy python submission (verdict: Time Limit Exceeded):
N = int(input())
lst = list(map(int,input().split()))
output = 1
for m in lst :
    output *= m
if output <= 1000000000000000000 :
    print(output)
else :
    print(-1)

Fixed submission:
n = int(input())
ls = list(map(int, input().split()))
res = 1
if 0 in ls:
    print(0)
    quit()
for x in ls:
    res *= x
    if res > 10**18:
        print(-1)
        quit()
print(res)