Buggy python submission (verdict: Runtime Error):
N=int(input())
A=list(map(int,input().split()))
ans = 1
if 0 in A:
	print(0)
	return
for a in A:
   	ans *= a
   	if ans > 1000000000000000000:
      	print(-1)
      	return
print(ans)


Fixed submission:
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 ()

Buggy python submission (verdict: Runtime Error):
N=int(input())
A=list(map(int,input().split()))
ans = 1
if 0 in A:
	print(0)
	return
else:
	for a in A:
    	ans *= a
    	if ans > 1000000000000000000:
      	print(-1)
      	return
	print(ans)


Fixed submission:
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 ()

Buggy python submission (verdict: Runtime Error):
N=int(input())
A=list(map(int,input().split()))
ans = 1
if 0 in A:
  print(0)
  return
else:
  for a in A:
    ans *= a
    if ans > 1000000000000000000:
      print(-1)
      return
  print(ans)


Fixed submission:
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 ()

Buggy python submission (verdict: Runtime Error):
N=int(input())
A=list(map(int,input().split()))
ans = 1
if 0 in A:
  print(0)
  return
else:
  for a in A:
    ans *= a
    if ans > 10**18:
      print(-1)
      return
  print(ans)


Fixed submission:
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 ()

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


Fixed submission:
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 ()

Buggy python submission (verdict: Runtime Error):
N=int(input())
A=map(int,input().split())
ans = 1
if 0 in A:
  print(0)
  exit()
else:
  for i in range(N):
    ans *= A[i]
    if ans > 10**18:
      print(-1)
      exit()
  print(ans)


Fixed submission:
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 ()

Buggy python submission (verdict: Runtime Error):
N=int(input())
A=map(int,input().split())
ans = 1
if 0 in A:
  print(0)
  exit()
for i in range(N):
  ans *= A[i]
  if ans > 10**18:
    print(-1)
    exit()
else:
  print(ans)

Fixed submission:
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 ()