Buggy python submission (verdict: Time Limit Exceeded):
def main(N):
    A = list(map(int, input().split()))
    st_A = set(A)
    if 0 in st_A:
        print(0)
    else:
        x = 1
        for a in A:
            x *= a
        if x > 10 ** 18:
            print(-1)
        else:
            print(x)





if __name__ == '__main__':
    N = int(input())
    main(N)

Fixed submission:
def main(N):
    A = list(map(int, input().split()))
    st_A = set(A)
    if 0 in st_A:
        print(0)
    else:
        x = 1
        for a in A:
            x *= a
            if x > 10 ** 18:
                print(-1)
                exit()
        else:
            print(x)





if __name__ == '__main__':
    N = int(input())
    main(N)

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





if __name__ == '__main__':
    N = int(input())
    main(N)

Fixed submission:
def main(N):
    A = list(map(int, input().split()))
    st_A = set(A)
    if 0 in st_A:
        print(0)
    else:
        x = 1
        for a in A:
            x *= a
            if x > 10 ** 18:
                print(-1)
                exit()
        else:
            print(x)





if __name__ == '__main__':
    N = int(input())
    main(N)

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




if __name__ == '__main__':
    N = int(input())
    main(N)


Fixed submission:
def main(N):
    A = list(map(int, input().split()))
    st_A = set(A)
    if 0 in st_A:
        print(0)
    else:
        x = 1
        for a in A:
            x *= a
            if x > 10 ** 18:
                print(-1)
                exit()
        else:
            print(x)





if __name__ == '__main__':
    N = int(input())
    main(N)

Buggy python submission (verdict: Runtime Error):
from math import log10

def main(N):
    A = list(map(int, input().split()))
    st_A = set(A)
    if 0 in st_A:
        print(0)
    else:
        x = 1
        for a in A:
            x *= a
        	if x > 10**18:
            	print(-1)
                exit()
        else:
            print(x)




if __name__ == '__main__':
    N = int(input())
    main(N)


Fixed submission:
def main(N):
    A = list(map(int, input().split()))
    st_A = set(A)
    if 0 in st_A:
        print(0)
    else:
        x = 1
        for a in A:
            x *= a
            if x > 10 ** 18:
                print(-1)
                exit()
        else:
            print(x)





if __name__ == '__main__':
    N = int(input())
    main(N)

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

def main(N):
    ans = np.prod(np.array(list(map(int, input().split()))))
    if log10(ans) >= 18 and ans != 10 ** 18:
        print(-1)
    else:
        print(ans)





if __name__ == '__main__':
    N = int(input())
    main(N)

Fixed submission:
def main(N):
    A = list(map(int, input().split()))
    st_A = set(A)
    if 0 in st_A:
        print(0)
    else:
        x = 1
        for a in A:
            x *= a
            if x > 10 ** 18:
                print(-1)
                exit()
        else:
            print(x)





if __name__ == '__main__':
    N = int(input())
    main(N)

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

def main(N):
    ans = np.prod(np.array(list(map(int, input().split()))))
    if log10(ans) >= 18:
        print(-1)
    else:
        print(ans)





if __name__ == '__main__':
    N = int(input())
    main(N)

Fixed submission:
def main(N):
    A = list(map(int, input().split()))
    st_A = set(A)
    if 0 in st_A:
        print(0)
    else:
        x = 1
        for a in A:
            x *= a
            if x > 10 ** 18:
                print(-1)
                exit()
        else:
            print(x)





if __name__ == '__main__':
    N = int(input())
    main(N)

Buggy python submission (verdict: Time Limit Exceeded):
from math import log10

def main(N):
    A = list(map(int, input().split()))
    st_A = set(A)
    if 0 in st_A:
        print(0)
    else:
        x = 1
        for a in A:
            x *= a
        if x > 10**18:
            print(-1)
        else:
            print(x)




if __name__ == '__main__':
    N = int(input())
    main(N)

Fixed submission:
def main(N):
    A = list(map(int, input().split()))
    st_A = set(A)
    if 0 in st_A:
        print(0)
    else:
        x = 1
        for a in A:
            x *= a
            if x > 10 ** 18:
                print(-1)
                exit()
        else:
            print(x)





if __name__ == '__main__':
    N = int(input())
    main(N)