Buggy python submission (verdict: Time Limit Exceeded):
import sys

n = int(input())
list_input = list(map(int, sys.stdin.readline().strip().split()))

if 0 in list_input:
    print(0)
    exit()

a = 1
for i in list_input:
    a *= i


if a > pow(10, 18):
    print(-1)
else:
    print(a)


Fixed submission:
import sys

n = int(input())
list_input = list(map(int, sys.stdin.readline().strip().split()))

if 0 in list_input:
    print(0)
    exit()

a = 1
for i in list_input:
    a *= i
    if a > pow(10, 18):
        break


if a > pow(10, 18):
    print(-1)
else:
    print(a)

Buggy python submission (verdict: Time Limit Exceeded):
import sys

n = int(input())
list_input = list(map(int, sys.stdin.readline().strip().split()))

if 0 in list_input:
    print(0)
    exit()

a = 1
for i in list_input:
    a *= i


if a > pow(10, 18):
    print(-1)
else:
    print(a)


Fixed submission:
import sys

n = int(input())
list_input = list(map(int, sys.stdin.readline().strip().split()))

if 0 in list_input:
    print(0)
    exit()

a = 1
for i in list_input:
    a *= i
    if a > pow(10, 18):
        break


if a > pow(10, 18):
    print(-1)
else:
    print(a)

Buggy python submission (verdict: Runtime Error):
import sys
import numpy as np

n = int(input())
list_input = list(map(int, sys.stdin.readline().strip().split()))
array = np.array(list_input)

a = array.prod()

if a > pow(10, 18):
    print(-1)
else:
    print(a)

Fixed submission:
import sys

n = int(input())
list_input = list(map(int, sys.stdin.readline().strip().split()))

if 0 in list_input:
    print(0)
    exit()

a = 1
for i in list_input:
    a *= i
    if a > pow(10, 18):
        break


if a > pow(10, 18):
    print(-1)
else:
    print(a)

Buggy python submission (verdict: Time Limit Exceeded):
import sys

n = int(input())
list_input = list(map(int, sys.stdin.readline().strip().split()))

a = 1
for i in list_input:
    a *= i

if a > pow(10, 18):
    print(-1)
else:
    print(a)


Fixed submission:
import sys

n = int(input())
list_input = list(map(int, sys.stdin.readline().strip().split()))

if 0 in list_input:
    print(0)
    exit()

a = 1
for i in list_input:
    a *= i
    if a > pow(10, 18):
        break


if a > pow(10, 18):
    print(-1)
else:
    print(a)

Buggy python submission (verdict: Time Limit Exceeded):
n = int(input())
list_input = list(map(int, input().split()))

a = 1
for i in list_input:
    a *= i

if a > pow(10, 18):
    print(-1)
else:
    print(a)


Fixed submission:
import sys

n = int(input())
list_input = list(map(int, sys.stdin.readline().strip().split()))

if 0 in list_input:
    print(0)
    exit()

a = 1
for i in list_input:
    a *= i
    if a > pow(10, 18):
        break


if a > pow(10, 18):
    print(-1)
else:
    print(a)

Buggy python submission (verdict: Time Limit Exceeded):
import sys

n = int(input())
list_input = list(map(int, input().split()))

a = 1
for i in list_input:
    a = a * i

if a > pow(10, 18):
    print(-1)
else:
    print(a)


Fixed submission:
import sys

n = int(input())
list_input = list(map(int, sys.stdin.readline().strip().split()))

if 0 in list_input:
    print(0)
    exit()

a = 1
for i in list_input:
    a *= i
    if a > pow(10, 18):
        break


if a > pow(10, 18):
    print(-1)
else:
    print(a)