Buggy python submission (verdict: Runtime Error):
import functools
import operator

N = int(input())
v = ((map(int, input().split())))
answer = functools.reduce(operator.mul.v)
answer = answer if answer <= 10 ** 18 else -1
print(answer)

Fixed submission:
N = int(input())
v = list(map(int, input().split()))
limit = 10 ** 18

answer = 1
if 0 in v:
  answer = 0
else:
  for i in v:
    answer = answer * i
    if answer <= limit:
      continue
    else:
      answer = -1
      break
print(answer)

Buggy python submission (verdict: Runtime Error):
import functools
import operator

N = int(input())
v = ((map(int, input().split())))
answer = functools.reduce(mul.v)
answer = answer if answer <= 10 ** 18 else -1
print(answer)

Fixed submission:
N = int(input())
v = list(map(int, input().split()))
limit = 10 ** 18

answer = 1
if 0 in v:
  answer = 0
else:
  for i in v:
    answer = answer * i
    if answer <= limit:
      continue
    else:
      answer = -1
      break
print(answer)

Buggy python submission (verdict: Time Limit Exceeded):
import functools
import operator

N = int(input())
v = ((map(int, input().split())))
answer = functools.reduce(operator.mul,v)
answer = answer if answer <= 1000000000000000000 else -1
print(answer)

Fixed submission:
N = int(input())
v = list(map(int, input().split()))
limit = 10 ** 18

answer = 1
if 0 in v:
  answer = 0
else:
  for i in v:
    answer = answer * i
    if answer <= limit:
      continue
    else:
      answer = -1
      break
print(answer)

Buggy python submission (verdict: Runtime Error):
import functools
import operator

N = int(input())
v = ((map(int, input().split())))
answer = functools.reduce(mul.v)
answer = answer if answer <= 1000000000000000000 else -1
print(answer)

Fixed submission:
N = int(input())
v = list(map(int, input().split()))
limit = 10 ** 18

answer = 1
if 0 in v:
  answer = 0
else:
  for i in v:
    answer = answer * i
    if answer <= limit:
      continue
    else:
      answer = -1
      break
print(answer)

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

Fixed submission:
N = int(input())
v = list(map(int, input().split()))
limit = 10 ** 18

answer = 1
if 0 in v:
  answer = 0
else:
  for i in v:
    answer = answer * i
    if answer <= limit:
      continue
    else:
      answer = -1
      break
print(answer)

Buggy python submission (verdict: Time Limit Exceeded):
import functools
import operator

N = int(input())
v = list(map(int, input().split()))
answer = functools.reduce(operator.mul, v) if functools.reduce(operator.mul, v) <= 1000000000000000000 else -1
print(answer)

Fixed submission:
N = int(input())
v = list(map(int, input().split()))
limit = 10 ** 18

answer = 1
if 0 in v:
  answer = 0
else:
  for i in v:
    answer = answer * i
    if answer <= limit:
      continue
    else:
      answer = -1
      break
print(answer)

Buggy python submission (verdict: Time Limit Exceeded):
import functools
import operator

N = int(input())
v = list(map(int, input().split()))
answer = functools.reduce(operator.mul, v)
answer = answer if answer <= 1000000000000000000 else -1
print(answer)

Fixed submission:
N = int(input())
v = list(map(int, input().split()))
limit = 10 ** 18

answer = 1
if 0 in v:
  answer = 0
else:
  for i in v:
    answer = answer * i
    if answer <= limit:
      continue
    else:
      answer = -1
      break
print(answer)

Buggy python submission (verdict: Runtime Error):
N = int(input())
v = list(map(int, input().split()))
answer = reduce(lambda x,y: x*y, v)
answer = answer if answer <= 1000000000000000000 else -1
print(answer)

Fixed submission:
N = int(input())
v = list(map(int, input().split()))
limit = 10 ** 18

answer = 1
if 0 in v:
  answer = 0
else:
  for i in v:
    answer = answer * i
    if answer <= limit:
      continue
    else:
      answer = -1
      break
print(answer)

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

Fixed submission:
N = int(input())
v = list(map(int, input().split()))
limit = 10 ** 18

answer = 1
if 0 in v:
  answer = 0
else:
  for i in v:
    answer = answer * i
    if answer <= limit:
      continue
    else:
      answer = -1
      break
print(answer)

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

N = int(input())
v = np.arrray(list(map(int, input().split())))

answer = v.prod()

answer = answer if answer <= 10 ** 18 else -1
print(answer)

Fixed submission:
N = int(input())
v = list(map(int, input().split()))
limit = 10 ** 18

answer = 1
if 0 in v:
  answer = 0
else:
  for i in v:
    answer = answer * i
    if answer <= limit:
      continue
    else:
      answer = -1
      break
print(answer)

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

N = int(input())
v = np.array(list(map(int, input().split())))

answer = v.prod()

answer = answer if answer <= 10 ** 18 else -1
print(answer)

Fixed submission:
N = int(input())
v = list(map(int, input().split()))
limit = 10 ** 18

answer = 1
if 0 in v:
  answer = 0
else:
  for i in v:
    answer = answer * i
    if answer <= limit:
      continue
    else:
      answer = -1
      break
print(answer)

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

Fixed submission:
N = int(input())
v = list(map(int, input().split()))
limit = 10 ** 18

answer = 1
if 0 in v:
  answer = 0
else:
  for i in v:
    answer = answer * i
    if answer <= limit:
      continue
    else:
      answer = -1
      break
print(answer)

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

answer = 1
for i in range(N):
    answer = answer * v[i]

if answer <= 10 ** 18:
    print(answer)
else:
    print(-1)

Fixed submission:
N = int(input())
v = list(map(int, input().split()))
limit = 10 ** 18

answer = 1
if 0 in v:
  answer = 0
else:
  for i in v:
    answer = answer * i
    if answer <= limit:
      continue
    else:
      answer = -1
      break
print(answer)