Harryxun/testdata huggingface dataset:
Buggy python submission (verdict: Time Limit Exceeded):
STRI = input()
DICT = STRI.split()
A=int(DICT[0])
B=int(DICT[1])
K=int(DICT[2])
cA=A
cB=B

for TIMES in range(K):
    if cA > 0:
        cA=cA-1
    elif cB > 0:
        cB=cB-1

print(str(cA) + " " + str(cB))

Fixed submission:
STRI = input()
DICT = STRI.split()
A=int(DICT[0])
B=int(DICT[1])
K=int(DICT[2])

cA = A
cB = B

if A+B <= K:
    cA = 0
    cB = 0
else:
    if A >= K:
        if A == K:
            cA = 0
        elif A > K:
            cA = A - K
    else:
        cA = 0
        if A+B <= K:
            cA = 0
            cB = 0
        else:
            cB = B - (K - A)

print(cA,cB)

Buggy python submission (verdict: Time Limit Exceeded):
STRI = input()
DICT = STRI.split()
A=int(DICT[0])
B=int(DICT[1])
K=int(DICT[2])
cA=A
cB=B
stop = False

for TIMES in range(K):
    if cA > 0:
        cA=cA-1
    elif cB > 0:
        cB=cB-1
    else:
        stop = True

print(str(cA) + " " + str(cB))

Fixed submission:
STRI = input()
DICT = STRI.split()
A=int(DICT[0])
B=int(DICT[1])
K=int(DICT[2])

cA = A
cB = B

if A+B <= K:
    cA = 0
    cB = 0
else:
    if A >= K:
        if A == K:
            cA = 0
        elif A > K:
            cA = A - K
    else:
        cA = 0
        if A+B <= K:
            cA = 0
            cB = 0
        else:
            cB = B - (K - A)

print(cA,cB)
Buggy python submission (verdict: Runtime Error):
usrInput = input()
taxRate = 0.08
finding = 1
whileIs = True
foundIs = False

while whileIs == True:
    if math.floor(finding * (taxRate + 1)) == int(usrInput):
        unTaxed = finding
        whileIs = False
        foundIs = True
    else:
       if 49300 <= finding:
           whileIs = False
           foundIs = False
        finding = finding + 1

if foundIs:
    print(str(unTaxed))
else:
    print(":(")

Fixed submission:
usrInput = input()
import math
taxRate = 0.08
finding = 1
whileIs = True
foundIs = False

while whileIs == True:
    if math.floor(finding * (taxRate + 1)) == int(usrInput):
        unTaxed = finding
        whileIs = False
        foundIs = True
    else:
       if 49300 <= finding:
        whileIs = False
        foundIs = False
    finding = finding + 1

if foundIs:
    print(str(unTaxed))
else:
    print(":(")
Buggy python submission (verdict: Runtime Error):
usrInput = input()

if usrInput == "SUN":
    DayPlace = 0
elif usrInput == "MON":
    DayPlace = 1
elif usrInput == "TUE":
    DayPlcae = 2
elif usrInput == "WED":
    DayPlace = 3
elif usrInput == "THU":
    DayPlace = 4
elif usrInput == "FRI":
    DayPlace = 5
elif usrInput == "SAT":
    DayPlace = 6

finalOutput = 7 - DayPlace
print(finalOutput)

Fixed submission:
usrInput = input()

if usrInput == "SUN":
    DayPlace = 0
elif usrInput == "MON":
    DayPlace = 1
elif usrInput == "TUE":
    DayPlace = 2
elif usrInput == "WED":
    DayPlace = 3
elif usrInput == "THU":
    DayPlace = 4
elif usrInput == "FRI":
    DayPlace = 5
elif usrInput == "SAT":
    DayPlace = 6

finalOutput = 7 - DayPlace
print(finalOutput)
Buggy python submission (verdict: Runtime Error):
usrInput = input()
print(int(usrinput) ** 2)

Fixed submission:
usrInput = input()
print(int(usrInput) ** 2)
Buggy python submission (verdict: Runtime Error):
usrInput = []
for n in range(6):
  usrInput.append(int(input()))
 
for l in range(5):
  for m in range(5):
    if abs(int(usrInput[l])-int(usrInput[m])) > usrInput[5]:
      flag = True
 
if flag:
  print(":(")
else:
  print("Yay!")

Fixed submission:
usrInput = []
flag = False
for n in range(6):
    usrInput.append(int(input()))

for l in range(5):
    for m in range(5):
        if abs(int(usrInput[l]) - int(usrInput[m])) > usrInput[5]:
            flag = True

if flag:
    print(":(")
else:
    print("Yay!")

Buggy python submission (verdict: Runtime Error):
usrInput = {}
for n in range(6):
  append.usrInput = input()

for l in range(5):
  for m in range(5):
    if abs(int(usrInput[l])-int(usrInput[m])) > usrInput[6]:
      flag = True

if flag:
  print(":(")
else:
  print("Yay!")

Fixed submission:
usrInput = []
flag = False
for n in range(6):
    usrInput.append(int(input()))

for l in range(5):
    for m in range(5):
        if abs(int(usrInput[l]) - int(usrInput[m])) > usrInput[5]:
            flag = True

if flag:
    print(":(")
else:
    print("Yay!")
Buggy python submission (verdict: Runtime Error):
a, b = input().split()
print(a*b)

Fixed submission:
a, b = input().split()
a = int(a) 
b= int(b)
print(a*b)
Buggy python submission (verdict: Runtime Error):
listed = input().split()
mul = 1
maxi = 10**18
for num in listed:
  mul*=num
  if num == 0:
    print(mul)
  if num > maxi**18:
    print(mul)
print(mul)

Fixed submission:
N = input()
listed = input().split()
mul = 1
for num in listed:
  num = int(num)
  if num == 0:
    mul = 0
    break
  if mul != -1:
    mul *= num
    if mul > 10**18:
      mul = -1
print(mul)

Buggy python submission (verdict: Runtime Error):
A, B = input().split()
A = int(A)
B = int(B)
print(A*B)

Fixed submission:
N = input()
listed = input().split()
mul = 1
for num in listed:
  num = int(num)
  if num == 0:
    mul = 0
    break
  if mul != -1:
    mul *= num
    if mul > 10**18:
      mul = -1
print(mul)

Buggy python submission (verdict: Time Limit Exceeded):
from sys import stdin, stdout  
  
# suppose a function called main() and 
# all the operations are performed 
def main(): 
  
    # input via readline method 
    n = stdin.readline() 
  
    # array input similar method 
    arr = [int(x) for x in stdin.readline().split()] 
  
    #initialize variable 
    summation = 1
      
    # calculate sum 
    for x in arr: 
        summation *= x 
  
    # could use inbuilt summation = sum(arr) 
    if summation>1e18:
        print("-1");
    else:
        print(summation);


    # print answer via write 
    # write method writes only 
    # string operations 
    # so we need to convert any 
    # data into string for input 
    
  
# call the main method 
if __name__ == "__main__": 
    main()     

Fixed submission:
from sys import stdin, stdout  
  
# suppose a function called main() and 
# all the operations are performed 
def main(): 
  
    # input via readline method 
    n = stdin.readline() 
  
    # array input similar method 
    arr = [int(x) for x in stdin.readline().split()] 
  
    #initialize variable 
    summation = 1
    for x in arr:
        if x==0:
            summation=0
            break
    # calculate sum 
    for x in arr: 
        summation *= x
        if summation>1e18:
            summation=-1
            break
  
    # could use inbuilt summation = sum(arr) 
    if summation>1e18:
        print("-1");
    else:
        print(summation);


    # print answer via write 
    # write method writes only 
    # string operations 
    # so we need to convert any 
    # data into string for input 
    
  
# call the main method 
if __name__ == "__main__": 
    main()
Buggy python submission (verdict: Runtime Error):
A,B=map(float,input(),split())
C=B*1000
print(A*C//1000)

Fixed submission:
from decimal import Decimal
A,B=input().split()
print(int(Decimal(A)*Decimal(B)))
Buggy python submission (verdict: Runtime Error):
N=list(int(input()))
if N[-1]==0 or N[-1]==1 or N[-1]==6 or N[-1]==8:
  print("pon")
elif N[-1]==3:
  print("bon")
else:
  print("hon")

Fixed submission:
N=list(map(int,input()))

if N[-1]==0 or N[-1]==1 or N[-1]==6 or N[-1]==8:
  print("pon")
elif N[-1]==3:
  print("bon")
else:
  print("hon")
Buggy python submission (verdict: Runtime Error):
A,B,C,A,B,C,K=map(int,input().split())
if K<=A:
  print(K)
elif A<K<=A+B:
  print(A)
elif A+B<K<=A+B+C:
  print(2*A+B-K)
  

Fixed submission:
A,B,C,K=map(int,input().split())
if K<=A:
  print(K)
elif A<K<=A+B:
  print(A)
elif A+B<K<=A+B+C:
  print(2*A+B-K)
Buggy python submission (verdict: Runtime Error):
A,B,C,D=map(int,input().split())
Tattack=ceil(A/D)
Aattack=ceil(C/B)
if Tattack>=Aattack:
  print("Yes")
else:
  print("No")

Fixed submission:
import math
A,B,C,D=map(int,input().split())
Tattack=math.ceil(A/D)
Aattack=math.ceil(C/B)
if Tattack>=Aattack:
  print("Yes")
else:
  print("No")
Buggy python submission (verdict: Runtime Error):
N,m = input().split()
M = int(m)
L1 = list(map(int,input().split()))
ans=-1
if sum(L1)<=N:
    ans = N - sum(L1)
print(ans)

Fixed submission:
n,m = input().split()
N = int(n)
L1 = list(map(int,input().split()))
ans=-1
if sum(L1)<=N:
    ans = N-sum(L1)
print(ans)

Buggy python submission (verdict: Runtime Error):
N,m = input().split()
M = int(m)
L1 = list(map(int,input().split()))
ans=-1
if sum(L1)<=N:
    ans = N - sum(L1)
print(ans)

Fixed submission:
n,m = input().split()
N = int(n)
L1 = list(map(int,input().split()))
ans=-1
if sum(L1)<=N:
    ans = N-sum(L1)
print(ans)
Buggy python submission (verdict: Runtime Error):
A = list(map(int,input().split()))
print(A[2]+" "+A[0]+" "+A[1])

Fixed submission:
A = list(map(int,input().split()))
print(str(A[2])+" "+str(A[0])+" "+str(A[1]))

Buggy python submission (verdict: Runtime Error):
a,b,c = list(map(int,input().split()))
print(c+" "+a+" "+b)

Fixed submission:
A = list(map(int,input().split()))
print(str(A[2])+" "+str(A[0])+" "+str(A[1]))
Buggy python submission (verdict: Runtime Error):
S=input()
l=len(S)
S1=S[1:(l+1)/2]
S2=S[(l+3)/2::]
if S==S[::] and S1==S1[::-1] and S2==S2[::-1]:
  print("Yes")
else:
  print("No")

Fixed submission:
S=input()
l=len(S)
S1=S[:int((l-1)/2)]
S2=S[int((l+1)/2)::]
if S==S[::-1] and S1==S1[::-1] and S2==S2[::-1]:
  print("Yes")
else:
  print("No")
Buggy python submission (verdict: Runtime Error):
A,B=map(int,input().split())
Aset=set([int(i) for i in range(1,1010) if int(i*0.08)==A])
Bset=set([int(i) for i in range(1,1010) if int(i*0.1)==B])
if Aset&Bset!={}:
    print(min(Aset&Bset))
else:
    print(-1)

Fixed submission:
A,B=map(int,input().split())
Aset=set([int(i) for i in range(1,1010) if int(i*0.08)==A])
Bset=set([int(i) for i in range(1,1010) if int(i*0.1)==B])
if Aset&Bset :
    print(min(Aset&Bset))
else:
    print(-1)

Buggy python submission (verdict: Runtime Error):
A,B=map(int,input().split())
Aset=set([int(i) for i in range(1,1263) if int(i*0.08)==A])
Bset=set([int(i) for i in range(1,1010) if int(i*0.1)==B])
print(min(Aset&Bset))




Fixed submission:
A,B=map(int,input().split())
Aset=set([int(i) for i in range(1,1010) if int(i*0.08)==A])
Bset=set([int(i) for i in range(1,1010) if int(i*0.1)==B])
if Aset&Bset :
    print(min(Aset&Bset))
else:
    print(-1)
Buggy python submission (verdict: Runtime Error):
L = list(input())
w = int(input())
i = 0
while i<=len(L):
  print(L[i],end="")
  i+=w

Fixed submission:
L = list(input())
w = int(input())
i = 0
while i<len(L):
  print(L[i],end="")
  i+=w

Buggy python submission (verdict: Runtime Error):
L = list(input())
w = int(input())
i = 0
while i<=len(L):
  print(L[i],end="")
  i+=3

Fixed submission:
L = list(input())
w = int(input())
i = 0
while i<len(L):
  print(L[i],end="")
  i+=w
Buggy python submission (verdict: Runtime Error):
N=int(input())
A=list(map(int,input().split()))
ans=1
if min(A)==0:
    ans=0
else:
    for a in A:
        ans=ans*a
    if ans > 10**18:
        ans = -1
print(ans)

Fixed submission:
A,B=map(int,input().split())
print(A*B)
Buggy python submission (verdict: Time Limit Exceeded):
N=int(input())
A=list(map(int,input().split()))
ans=1
if min(A)==0:
    ans=0
else:
    for a in A:
        ans=ans*a
    if ans > 10**18:
        ans = -1
print(ans)

Fixed submission:
N=int(input())
A=list(map(int,input().split()))
ans=1
if min(A)==0:
    ans=0
else:
    for a in A:
        ans=ans*a
        if ans > 10**18:
            ans = -1
            break
print(ans)

Buggy python submission (verdict: Time Limit Exceeded):
import functools
import operator
N=int(input())
A=list(map(int,input().split()))
prod = functools.partial(functools.reduce, operator.mul)
ans=prod(A)
if ans > 10**18:
    ans = -1
print(ans)

Fixed submission:
N=int(input())
A=list(map(int,input().split()))
ans=1
if min(A)==0:
    ans=0
else:
    for a in A:
        ans=ans*a
        if ans > 10**18:
            ans = -1
            break
print(ans)

Buggy python submission (verdict: Time Limit Exceeded):
N=int(input())
A=list(map(int,input().split()))
ans=1
for a in A:
    ans=ans*a
if ans > 10**18:
    ans = -1
print(ans)

Fixed submission:
N=int(input())
A=list(map(int,input().split()))
ans=1
if min(A)==0:
    ans=0
else:
    for a in A:
        ans=ans*a
        if ans > 10**18:
            ans = -1
            break
print(ans)

Buggy python submission (verdict: Time Limit Exceeded):
N=int(input())
A=list(map(int,input().split()))
ans=1
for a in A:
    ans=ans*a
if ans > 10**18:
    ans = -1
print(ans)

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

if len(S) <= K:
    print(S)
else :
    print(S[0:K]+"...")

Fixed submission:
K=int(input())
S=input()

if len(S) <= K:
    print(S)
else :
    print(S[0:K]+"...")
Buggy python submission (verdict: Time Limit Exceeded):
N,K=map(int,input().split())
S=N
if K//2 !=0:
    while S>K//2:
        S=abs(S-K)
    print(S)
else:
    print(0)

Fixed submission:
N,K=map(int,input().split())
S=N
if N%K==0:
    print(0)
else:
    print(min(N%K,abs(N%K-K)))

Buggy python submission (verdict: Time Limit Exceeded):
N,K=map(int,input().split())
S=N
f=[]
while S>K:
    S=abs(S-K)

f.append(abs(S))
f.append(abs(S-K))
f.append(abs(S-2*K))

    
    
    
print(min(f))


Fixed submission:
N,K=map(int,input().split())
S=N
if N%K==0:
    print(0)
else:
    print(min(N%K,abs(N%K-K)))
Buggy python submission (verdict: Time Limit Exceeded):
import numpy as np
N = int(input())
A = list(map(int, input().split()))
se = 1
c = True
for n in range(N):
  se *= A[n]
  if A[n] == 0:
    se = 0
    break
if se >  10**18:
  print("-1")
  c = False
if c:
  print(se)

Fixed submission:
import numpy as np
N = int(input())
A = list(map(int, input().split()))
se = 1
c = True
for n in range(N):
  se *= A[n]
  if se >  10**18:
    c = False
    break
for n in range(N):
  if A[n] == 0:
    se = 0
    c = True
if c:
  print(se)
else:
  print("-1")

Buggy python submission (verdict: Time Limit Exceeded):
import numpy as np
N = int(input())
A = list(map(int, input().split()))
se = 1
for n in range(N):
  if A[n] == 0:
    se = 0
    break
  se *= A[n]
if se >  10**18:
  print("-1")
else:
  print(se)

Fixed submission:
import numpy as np
N = int(input())
A = list(map(int, input().split()))
se = 1
c = True
for n in range(N):
  se *= A[n]
  if se >  10**18:
    c = False
    break
for n in range(N):
  if A[n] == 0:
    se = 0
    c = True
if c:
  print(se)
else:
  print("-1")

Buggy python submission (verdict: Time Limit Exceeded):
import numpy as np
N = int(input())
A = list(map(int, input().split()))
se = 1
for n in range(N):
  se *= A[n]
if se >  10**18:
  print("-1")
else:
  print(se)

Fixed submission:
import numpy as np
N = int(input())
A = list(map(int, input().split()))
se = 1
c = True
for n in range(N):
  se *= A[n]
  if se >  10**18:
    c = False
    break
for n in range(N):
  if A[n] == 0:
    se = 0
    c = True
if c:
  print(se)
else:
  print("-1")
Buggy python submission (verdict: Runtime Error):
import math
A, B = map(double, input().split())
B *= 1000
mul = A * B
mul2 = math.floor(mul//1000)
print(mul2)

Fixed submission:
import math
from decimal import Decimal

A, B = map(Decimal, input().split())
mul = A * B
mul2 = math.floor(mul)
print(mul2)
Buggy python submission (verdict: Runtime Error):
N = int(input())
H = list(map(int, input().split()))
flag = True
reach = False

for n in range(N - 1):
  if H[n] > H[n + 1]:
    if H[n] - 1== H[n + 1] and H[n + 1] + 1 <= H[n + 2] and reach == False:
      reach = True
    else:
      flag = False
if flag:
  print("Yes")
else:
  print("No")

Fixed submission:
N = int(input())
H = list(map(int, input().split()))
flag = True
maxim = 0

for n in range(N):
  if maxim < H[n]:
    maxim = H[n]
  if H[n] < maxim -1:
      flag = False
if flag:
  print("Yes")
else:
  print("No")
Buggy python submission (verdict: Time Limit Exceeded):
N = int(input())
d_array = list(map(int, input().split()))
#小さい順に並べ替え
for k in range(len(d_array)):
  for l in range(k):
    if d_array[l] > d_array[k]:
      d_array[k],  d_array[l] = d_array[l], d_array[k]

#真ん中の要素の差を取るとそれが答え
ans = d_array[N // 2] - d_array[N // 2 - 1]
print(ans)

Fixed submission:
N = int(input())
d_array = list(map(int, input().split()))
#小さい順に並べ替え
list.sort(d_array)
#真ん中の要素の差を取るとそれが答え
ans = d_array[N // 2] - d_array[N // 2 - 1]
print(ans)
Buggy python submission (verdict: Runtime Error):
def gcd(a,b):
  if b == 0:
    return a
  else:
    return gcd(b, a%b)

A, B, C, D = map(int, input().split())
count = 0
BCcount = B // C
BDcount = B // D
ACcount = (A - 1) // C
ADcount = (A - 1) // D
l = C * D // gcd(C, D)
BCDcount = B // l
ACDcount = (A - 1) // l
Bcount = Decimal(B - (BCcount + BDcount - BCDcount))
Acount = Decimal((A - 1) - (ACcount + ADcount - ACDcount))
print(Decimal(Bcount - Acount))

Fixed submission:
from decimal import Decimal
def gcd(a,b):
  if b == 0:
    return a
  else:
    return gcd(b, a%b)

A, B, C, D = map(int, input().split())
count = 0
BCcount = B // C
BDcount = B // D
ACcount = (A - 1) // C
ADcount = (A - 1) // D
l = C * D // gcd(C, D)
BCDcount = B // l
ACDcount = (A - 1) // l
Bcount = Decimal(B - (BCcount + BDcount - BCDcount))
Acount = Decimal((A - 1) - (ACcount + ADcount - ACDcount))
print(Decimal(Bcount - Acount))

Buggy python submission (verdict: Runtime Error):
import math
A, B, C, D = map(int, input().split())
count = 0
BCcount = math.floor(B / C)
BDcount = math.floor(B / D)
ACcount = math.floor((A - 1) / C)
ADcount = math.floor((A - 1) / D)
l = C * D / gcd(C, D)
BCDcount = math.floor(B / l)
ACDcount = math.floor((A - 1) / l)
Bcount = B - (BCcount + BDcount - BCDcount) 
Acount = (A - 1) - (ACcount + ADcount - ACDcount)
print(Bcount - Acount)

Fixed submission:
from decimal import Decimal
def gcd(a,b):
  if b == 0:
    return a
  else:
    return gcd(b, a%b)

A, B, C, D = map(int, input().split())
count = 0
BCcount = B // C
BDcount = B // D
ACcount = (A - 1) // C
ADcount = (A - 1) // D
l = C * D // gcd(C, D)
BCDcount = B // l
ACDcount = (A - 1) // l
Bcount = Decimal(B - (BCcount + BDcount - BCDcount))
Acount = Decimal((A - 1) - (ACcount + ADcount - ACDcount))
print(Decimal(Bcount - Acount))
Buggy python submission (verdict: Runtime Error):
import sys
n = int(sys.stdin.readline())
a = list(map(int, sys.stdin.readline().split()))
x = 1
for i in range(n):
  x *= a[i] 
if x > 1000000000000000000:
  x = -1
print(x)

Fixed submission:
i = list(map(int, input().split()))
print(i[0]*i[1])

Buggy python submission (verdict: Runtime Error):
n = int(input())
a = list(map(int, input().split()))
x = 1
for i in range(n):
  x *= a[i] 
if x > 1000000000000000001:
  x = -1
print(x)


Fixed submission:
i = list(map(int, input().split()))
print(i[0]*i[1])

Buggy python submission (verdict: Runtime Error):
a = list(map(int, input().split()))
print(i[0]*i[1])

Fixed submission:
i = list(map(int, input().split()))
print(i[0]*i[1])
Buggy python submission (verdict: Runtime Error):
inputs = map(int, list(input()))
A, B, T = inputs

print(T // A * B)

Fixed submission:
inputs = list(map(int, input().split()))
A, B, T = inputs

print(T // A * B)
Buggy python submission (verdict: Runtime Error):
n = input()
if n % 4 ==0 or n % 7 ==0:
    print('Yes')
    exit()
for i in range(n // 4 + 1):
    for j in range (n // + 1):
        if 4 * i + 7 * j== n:
            print('Yes')
            exit()
print('No')

Fixed submission:
n = int(input())
if n % 4 ==0 or n % 7 ==0:
    print('Yes')
    exit()
for i in range(n // 4 + 1):
    for j in range (n // + 1):
        if 4 * i + 7 * j == n:
            print('Yes')
            exit()
print('No')

Buggy python submission (verdict: Runtime Error):
n = input()
if n % 4 ==0 or n % 7 ==0:
    print('Yes')
    exit()
for i in range(n // 4 + 1):
    for j in range (n // + 1):
        if 4 * i + 7 * == n:
            print('Yes')
            exit()
print('No')

Fixed submission:
n = int(input())
if n % 4 ==0 or n % 7 ==0:
    print('Yes')
    exit()
for i in range(n // 4 + 1):
    for j in range (n // + 1):
        if 4 * i + 7 * j == n:
            print('Yes')
            exit()
print('No')
Buggy python submission (verdict: Runtime Error):
m,a,b = map(int,input().split())
ans = 0
for  i in range(1,n+1):
    if a <= sum(map(int,str(i))) <= b:
        ans += i
print(ans)

Fixed submission:
m,a,b = map(int,input().split())
ans = 0
for  i in range(1,m+1):
    if a <= sum(map(int,str(i))) <= b:
        ans += i
print(ans)
Buggy python submission (verdict: Runtime Error):
a= input()

list1 = [ a for items in list1 list1[items]=input() ]



Fixed submission:
# a= int(input())
# list1 =[]

n = int(input())
a = list(map(int,input().split()))
# print(a)
# a.sort(reverse=True)
# print(a)
if 0 in a :
    ans  = 0
    print(ans)
else :
    ans = 1
    for i in range(n):
        ans *= a[i]
        if ans > 10**18 :
            print(-1)
            break
if ans <= 10**18 and ans != 0 :
    print(ans)
Buggy python submission (verdict: Runtime Error):

n=input()
nums=list(map(int,input().split()))

ans = 1
over = 10**18

for num in nums:
    ans = ans * num
    if ans > over:
        print(-1)
        exit()

print(ans)


Fixed submission:
A,B=map(int,input().split())
print(A*B)

Buggy python submission (verdict: Runtime Error):
n=input()
nums=list(map(int,input().split()))

ans = 1
over = 10**18

for num in nums:
    if ans > over:
        print(-1)
        exit()
    ans = ans * num

print(ans)


Fixed submission:
A,B=map(int,input().split())
print(A*B)
Buggy python submission (verdict: Time Limit Exceeded):
n=input()
nums=list(map(int,input().split()))

ans = 1
for num in nums:
    ans = ans * num

if ans > 10**18:
    print(-1)
else:
    print(ans)


Fixed submission:
n=input()
nums=list(map(int,input().split()))

if 0 in nums:
    print(0)
    exit()


ans = 1
over = 10**18

for num in nums:
    ans = ans * num

    if ans > over:
        print(-1)
        exit()

print(ans)
Buggy python submission (verdict: Runtime Error):
A,B=input().split()
print(math.floor(int(A)*float(B)))


Fixed submission:

import math
from decimal import *

A,B=input().split()
print(math.floor(Decimal(A)*Decimal(B)))

Buggy python submission (verdict: Runtime Error):
A,B=input().split()
print(math.floor(int(A)*float(B)))


Fixed submission:

import math
from decimal import *

A,B=input().split()
print(math.floor(Decimal(A)*Decimal(B)))

Buggy python submission (verdict: Runtime Error):
A,B=input().split()
A = int(A)

if isinstance(B,int):
    B = int(B)
else:
    B = float(B)
print(math.floor(A*B))



Fixed submission:

import math
from decimal import *

A,B=input().split()
print(math.floor(Decimal(A)*Decimal(B)))
Buggy python submission (verdict: Runtime Error):
S = input()
S.replace()

ans = []

for i in range(1,len(s)):
    ans.append("x")

print("".join(ans))

Fixed submission:
S = input()
ans = []

for i in range(len(S)):
    ans.append("x")

print("".join(ans))

Buggy python submission (verdict: Runtime Error):
S = input()
S.replace()

ans = []

for i in range(len(s)):
    ans.append("x")

print("".join(ans))

Fixed submission:
S = input()
ans = []

for i in range(len(S)):
    ans.append("x")

print("".join(ans))