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

def main ():
  count = int(input())
  c = list(map(int,input().split()))

  if 0 in c:
    print(0)
    return

  a = reduce(mul, c)

  if a > 1000000000000000000:
    print(-1)
    return
  else:
    print(a)

main()

Fixed submission:
def main ():
  count = int(input())
  c = list(map(int,input().split()))

  if 0 in c:
    print(0)
    return

  result = 1
  for a in c:
    result *= a
    if result > 1000000000000000000:
      print(-1)
      return

  print(result)

main()

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

def main ():
  count = int(input())
  c = list(map(int,input().split()))
  print(c)

  if 0 in list:
    print(0)

  a = reduce(mul, list)

  if a > 1000000000000000000:
    print('-1')
  else:
    print(a)

main()

Fixed submission:
def main ():
  count = int(input())
  c = list(map(int,input().split()))

  if 0 in c:
    print(0)
    return

  result = 1
  for a in c:
    result *= a
    if result > 1000000000000000000:
      print(-1)
      return

  print(result)

main()

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

def main ():
  count = int(input())
  c = list(map(int,input().split()))
  print(c)

  if 0 in list:
    print(0)

  a = reduce(mul, list)

  if a > 1000000000000000000:
    print(-1)
  else:
    print(a)

main()

Fixed submission:
def main ():
  count = int(input())
  c = list(map(int,input().split()))

  if 0 in c:
    print(0)
    return

  result = 1
  for a in c:
    result *= a
    if result > 1000000000000000000:
      print(-1)
      return

  print(result)

main()

Buggy python submission (verdict: Time Limit Exceeded):
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:
def main ():
  count = int(input())
  c = list(map(int,input().split()))

  if 0 in c:
    print(0)
    return

  result = 1
  for a in c:
    result *= a
    if result > 1000000000000000000:
      print(-1)
      return

  print(result)

main()

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

count = int(input())
list = [int(x) for x in input().split()]

a = reduce(mul, list)

if a > 1000000000000000000:
    print('-1')
else:
    print(a)

Fixed submission:
def main ():
  count = int(input())
  c = list(map(int,input().split()))

  if 0 in c:
    print(0)
    return

  result = 1
  for a in c:
    result *= a
    if result > 1000000000000000000:
      print(-1)
      return

  print(result)

main()

Buggy python submission (verdict: Time Limit Exceeded):
count = int(input())
list = [int(x) for x in input().split()]
b = 1
for a in list:
    b *= a

threshold = int(1000000000000000000)

if b > threshold:
    print('-1')
else:
    print(b)

Fixed submission:
def main ():
  count = int(input())
  c = list(map(int,input().split()))

  if 0 in c:
    print(0)
    return

  result = 1
  for a in c:
    result *= a
    if result > 1000000000000000000:
      print(-1)
      return

  print(result)

main()

Buggy python submission (verdict: Time Limit Exceeded):
count = int(input())
list = [int(x) for x in input().split()]
b = 1
for a in list:
    b *= a

threshold = int(10 ** 18)

if b > threshold:
    print('-1')
else:
    print(b)

Fixed submission:
def main ():
  count = int(input())
  c = list(map(int,input().split()))

  if 0 in c:
    print(0)
    return

  result = 1
  for a in c:
    result *= a
    if result > 1000000000000000000:
      print(-1)
      return

  print(result)

main()