Buggy python submission (verdict: Time Limit Exceeded):
inp = input()
inp = input()
 
def mp(nums):
  n = 1
  for num in nums:
    n *=num
  return n
 
limit = 10**18
num = mp([int(x) for x in inp.split(" ")])
 
if num > limit:
  print(-1)
else:
  print(num)

Fixed submission:
inp = input()
inp = input()
 
def mp(nums):
  if 0 in nums:
    print(0)
    return
  n = 1
  limit = 10**18
  for num in nums:
    n *=num
    if n > limit:
      print(-1)
      return
  print(n)
 
mp([int(x) for x in inp.split(" ")])

Buggy python submission (verdict: Time Limit Exceeded):
inp = input()
inp = input()
 
def mp(nums):
  n = 1
  for num in nums:
    n *=num
  return n
 
limit= mp([10]*18)
num = mp([int(x) for x in inp.split(" ")])
 
if num > limit:
  print(-1)
else:
  print(num)

Fixed submission:
inp = input()
inp = input()
 
def mp(nums):
  if 0 in nums:
    print(0)
    return
  n = 1
  limit = 10**18
  for num in nums:
    n *=num
    if n > limit:
      print(-1)
      return
  print(n)
 
mp([int(x) for x in inp.split(" ")])

Buggy python submission (verdict: Runtime Error):
inp = input()
inp = input()
 
def mp(nums):
  n = 1
  limit= 10 ** 10
  for num in nums:
    n *=num
  	if num > limit:
  	  print(-1)
  	  return
  print(num)
  return
 
mp([int(x) for x in inp.split(" ")])

Fixed submission:
inp = input()
inp = input()
 
def mp(nums):
  if 0 in nums:
    print(0)
    return
  n = 1
  limit = 10**18
  for num in nums:
    n *=num
    if n > limit:
      print(-1)
      return
  print(n)
 
mp([int(x) for x in inp.split(" ")])

Buggy python submission (verdict: Runtime Error):
inp = input()
inp = input()
 
def mp(nums):
  n = 1
  limit= 10 ** 10
  for num in nums:
    n *=num
  	if num > limit:
  		print(-1)
  		return
  print(num)
  return
 
mp([int(x) for x in inp.split(" ")])
 

Fixed submission:
inp = input()
inp = input()
 
def mp(nums):
  if 0 in nums:
    print(0)
    return
  n = 1
  limit = 10**18
  for num in nums:
    n *=num
    if n > limit:
      print(-1)
      return
  print(n)
 
mp([int(x) for x in inp.split(" ")])

Buggy python submission (verdict: Runtime Error):
inp = input()
inp = input()
 
def mp(nums):
  n = 1
  for num in nums:
    n *=num
  	if num > limit:
  		print(-1)
  		return
  print(num)
  return
 
limit= 10 ** 10
num = mp([int(x) for x in inp.split(" ")])
 


Fixed submission:
inp = input()
inp = input()
 
def mp(nums):
  if 0 in nums:
    print(0)
    return
  n = 1
  limit = 10**18
  for num in nums:
    n *=num
    if n > limit:
      print(-1)
      return
  print(n)
 
mp([int(x) for x in inp.split(" ")])

Buggy python submission (verdict: Time Limit Exceeded):
inp = input()
inp = input()

def mp(nums):
  n = 1
  for num in nums:
    n *=num
  return n
 
limit= mp([10]*18)
num = mp([int(x) for x in inp.split(" ")])

if num > limit:
  print(-1)
else:
  print(num)

Fixed submission:
inp = input()
inp = input()
 
def mp(nums):
  if 0 in nums:
    print(0)
    return
  n = 1
  limit = 10**18
  for num in nums:
    n *=num
    if n > limit:
      print(-1)
      return
  print(n)
 
mp([int(x) for x in inp.split(" ")])

Buggy python submission (verdict: Runtime Error):
inp=input()
nums = [int(x) for x in inp.split(" ")]

def mp(nums):
  n = 1
  for num in nums:
    n *=num
  return n

limit= mp([10]*18)
num = mp(nums)

if n>limit:
  print(-1)
else:
  print(num)

Fixed submission:
inp = input()
inp = input()
 
def mp(nums):
  if 0 in nums:
    print(0)
    return
  n = 1
  limit = 10**18
  for num in nums:
    n *=num
    if n > limit:
      print(-1)
      return
  print(n)
 
mp([int(x) for x in inp.split(" ")])