Buggy python submission (verdict: Runtime Error):
a,b=map(str,input().split())
b1=int(b*100)
a1=int(a)
ans=int(a1*b1/100)
print(int(ans))

Fixed submission:
n=int(input())
a=list(input().split())
ans=1
f=0
i=0
while(i<n):
    if f==0:
        ans=ans*int(a[i])
    if f==0 and ans>1000000000000000000:
        f=1
    if int(a[i])==0:
        print(0)
        exit()
    i+=1
if f==1:
    print(-1)
    exit()
print(ans)

Buggy python submission (verdict: Runtime Error):
n=int(input())
a=list(input().split())
ans=1
f=0
i=0
p=0
while(i<n):
    if f==0:
        if i==n-1:
            p=1
            ans=ans*int(a[i])
        else:
            ans=ans*int(a[i])*int(a[i+1])
    if f==0 and ans>1000000000000000000:
        f=1
    if int(a[i])==0:
        print(0)
        exit()
    if p==0:
        if int(a[i+1])==0:
            print(0)
            exit()
    i+=2
if f==1:
    print(-1)
    exit()
print(ans)

Fixed submission:
n=int(input())
a=list(input().split())
ans=1
f=0
i=0
while(i<n):
    if f==0:
        ans=ans*int(a[i])
    if f==0 and ans>1000000000000000000:
        f=1
    if int(a[i])==0:
        print(0)
        exit()
    i+=1
if f==1:
    print(-1)
    exit()
print(ans)

Buggy python submission (verdict: Time Limit Exceeded):
n=int(input())
a=list(input().split())
ans=1
f=0
i=0
while(i<n):
    if i==n-1:
        ans=ans*int(a[i])
    else:
        ans=ans*int(a[i])*int(a[i+1])
    if f==0 and ans>1000000000000000000:
        f=1
    if ans==0:
        print(0)
        exit()
    i+=2
if f==1:
    print(-1)
    exit()
print(ans)

Fixed submission:
n=int(input())
a=list(input().split())
ans=1
f=0
i=0
while(i<n):
    if f==0:
        ans=ans*int(a[i])
    if f==0 and ans>1000000000000000000:
        f=1
    if int(a[i])==0:
        print(0)
        exit()
    i+=1
if f==1:
    print(-1)
    exit()
print(ans)

Buggy python submission (verdict: Runtime Error):
n=int(input())
a=list(input().split())
ans=1
f=0
i=0
while(i<=n):
    if i==n-1:
        ans=ans*int(a[i])
    else:
        ans=ans*int(a[i])*int(a[i+1])
        i+=1
    if f==0 and ans>1000000000000000000:
        f=1
    if ans==0:
        print(0)
        exit()
    i+=2
if f==1:
    print(-1)
    exit()
print(ans)

Fixed submission:
n=int(input())
a=list(input().split())
ans=1
f=0
i=0
while(i<n):
    if f==0:
        ans=ans*int(a[i])
    if f==0 and ans>1000000000000000000:
        f=1
    if int(a[i])==0:
        print(0)
        exit()
    i+=1
if f==1:
    print(-1)
    exit()
print(ans)

Buggy python submission (verdict: Time Limit Exceeded):
n=int(input())
a=list(input().split())
ans=1
f=0
for i in a:
    ans=ans*int(i)
    if f==0 and ans>1000000000000000000:
        f=1
    if int(i)==0:
        f=0
        print(0)
        exit()
if f==1:
    print(-1)
    exit()
print(ans)

Fixed submission:
n=int(input())
a=list(input().split())
ans=1
f=0
i=0
while(i<n):
    if f==0:
        ans=ans*int(a[i])
    if f==0 and ans>1000000000000000000:
        f=1
    if int(a[i])==0:
        print(0)
        exit()
    i+=1
if f==1:
    print(-1)
    exit()
print(ans)

Buggy python submission (verdict: Runtime Error):
n=int(input())
a=list(input().split())
ans=1
for i in a:
    ans=ans*int(i)
    if f==0 and ans>1000000000000000000:
        f=1
    if int(i)==0:
        f=0
        print(0)
if f==1:
    print(-1)
    exit()
print(ans)

Fixed submission:
n=int(input())
a=list(input().split())
ans=1
f=0
i=0
while(i<n):
    if f==0:
        ans=ans*int(a[i])
    if f==0 and ans>1000000000000000000:
        f=1
    if int(a[i])==0:
        print(0)
        exit()
    i+=1
if f==1:
    print(-1)
    exit()
print(ans)

Buggy python submission (verdict: Time Limit Exceeded):
n=int(input())
a=list(input().split())
ans=1
for i in a:
    ans=ans*int(i)
if ans>1000000000000000000:
    print(-1)
    exit()
print(ans)

Fixed submission:
n=int(input())
a=list(input().split())
ans=1
f=0
i=0
while(i<n):
    if f==0:
        ans=ans*int(a[i])
    if f==0 and ans>1000000000000000000:
        f=1
    if int(a[i])==0:
        print(0)
        exit()
    i+=1
if f==1:
    print(-1)
    exit()
print(ans)