Buggy python submission (verdict: Time Limit Exceeded):
MAX = 10**18
def main():
    N = map(int,input())
    A = list(map(int,input().split(' ')))
    ans = 1
    for a in A:
        if a == 0:
            print(0)
            exit(0)
        ans *= a

    if ans > MAX:
        print(-1)
    else:    
        print(ans)

if __name__ == "__main__":
    main()


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

    print(ans)

if __name__ == "__main__":
    main()

Buggy python submission (verdict: Runtime Error):
MAX = 10**18
def main():
    N = map(int,input())
    A = list(map(int,input().split(' ')))
    ans = 1
    for a in A:
        if a == 0:
            print(0)
            exit(1)
        ans *= a

    if ans > MAX:
        print(-1)
    else:    
        print(ans)

if __name__ == "__main__":
    main()


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

    print(ans)

if __name__ == "__main__":
    main()

Buggy python submission (verdict: Runtime Error):
MAX = 10**18
def main():
    N = map(int,input())
    A = list(map(int,input().split(' ')))
    ans = 1
    for a in A:
        if a == 0:
            print(0)
            exit(1)
        ans *= a

    if ans > MAX:
        print(-1)
    else:    
        print(ans)

if __name__ == "__main__":
    main()


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

    print(ans)

if __name__ == "__main__":
    main()

Buggy python submission (verdict: Runtime Error):
MAX = 10**18
def main():
    N = map(int,input())
    A = list(map(int,input().split(' ')))
    ans = 1
    for a in A:
        if a == 0:
            print(0)
            exit(1)
        ans *= a

    if ans > MAX:
        print(-1)
    else:    
        print(ans)

if __name__ == "__main__":
    main()


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

    print(ans)

if __name__ == "__main__":
    main()

Buggy python submission (verdict: Runtime Error):

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

if __name__ == "__main__":
    main()


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

    print(ans)

if __name__ == "__main__":
    main()

Buggy python submission (verdict: Runtime Error):

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

if __name__ == "__main__":
    main()


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

    print(ans)

if __name__ == "__main__":
    main()

Buggy python submission (verdict: Time Limit Exceeded):

def main():
    N = map(int,input())
    A = list(map(int,input().split(' ')))
    MAX = 10**18
    ans = 1
    for a in A:
        ans *= a
    if ans > MAX:
        print(-1)
    else:    
        print(ans)

if __name__ == "__main__":
    main()


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

    print(ans)

if __name__ == "__main__":
    main()