Buggy python submission (verdict: Runtime Error):
N = input()

    ab = input( )

    ab = ab.split()
    
    if 0 in ab:
        print(0)


    SUM = 1
    for i in range(int(N)):
        SUM = SUM * int(ab[i])
        if (int(SUM) < 10 ** 18):
            print(SUM)
        else:
        print(-1)

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):
def main():
    N = input()

    ab = input( )

    ab = ab.split()
    
    if 0 in ab:
        print(0)


    SUM = 1
    for i in range(int(N)):
        SUM = SUM * int(ab[i])
         if (int(SUM) < 10 ** 18):
        	print(SUM)
        else:
        print(-1)
        
main()

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):
def main():
    N = input()

    ab = input( )

    ab = ab.split()
    
    if 0 in ab:
        print(0)


    SUM = 1
    for i in range(int(N)):
        SUM = SUM * int(ab[i])
         if (int(SUM) < 10 ** 18):
        print(SUM)
        else:
        print(-1)
        
main()

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):
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 ():
    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):
ab = input( )

ab = ab.split()

SUM = 1
for i in range(int(ab[0])):
    SUM = SUM * int(ab[i+1])
    
if (int(SUM) < 10 ** 18):
    print(SUM)
else:
    print(-1)

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 = input()

A = []

for i in range(1,int(N)+1):
    a = input()
    A.append(a)

SUM = 1
for i in range(len(A)):
    SUM = SUM * int(A[i])
    
if (int(SUM) < 10 ** 18):
    print(SUM)
else:
    print(-1)

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 ()