Harryxun/testdata huggingface dataset:
Buggy python submission (verdict: Runtime Error):
# import pandas as pd
#import numpy as np


N = int(input())
keihin = []
for i in range(N):
    keihin.append(input())
# 
# nn = np.array(keihin)
# 
# 
# print(np.unique(nn).size)








Fixed submission:
a = input().split()
S = int(a[0])
W = int(a[1])
if S <= W:
    print("unsafe")
else:
    print("safe")

Buggy python submission (verdict: Runtime Error):
# import pandas as pd
import numpy as np


N = int(input())
keihin = []
for i in range(N):
    keihin.append(input())

nn = np.array(keihin)


print(np.unique(nn).size)








Fixed submission:
a = input().split()
S = int(a[0])
W = int(a[1])
if S <= W:
    print("unsafe")
else:
    print("safe")
Buggy python submission (verdict: Runtime Error):
def getN():
    return int(input())
def getNM():
    return map(int, input().split())
def getList():
    return list(map(int, input().split()))

a,b=getNM()

print(int(a*b))

Fixed submission:
def getN():
    return int(input())
def getNM():
    return map(int, input().split())
def getList():
    return list(map(int, input().split()))

i=input()

a,b=i.split(' ')
from decimal import Decimal
print(int(Decimal(a) * Decimal(b)))
Buggy python submission (verdict: Runtime Error):
n,m=map(int, input().split())
a=list(map(int, input().split()))

a.sort(reverse=True)
b=sum(a)/4/m
print(a)
print(a[m])
if a[m-1]<b:
    print('No')
else:
    print('Yes')

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

a.sort(reverse=True)
b=sum(a)/4/m
if a[m-1]<b:
    print('No')
else:
    print('Yes')

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

a.sort(reverse=True)

if a[m]<sum(a)/4/m:
    print('No')
else:
    print('Yes')

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

a.sort(reverse=True)
b=sum(a)/4/m
if a[m-1]<b:
    print('No')
else:
    print('Yes')
Buggy python submission (verdict: Runtime Error):
s=list(map(str, input()))
s_=s.copy()
s.reverse()
a=s_[:int((len(s_)-1)/2)]
a_=a.copy()
a.reverse()
b=s_[int((len(s_)+3)/2)-1:]
b_=b.copy()
b.reverse()
if s_==s and a_==a and b_==b:
    print('Yes')
else:
    print('No')

Fixed submission:
s=list(map(str, input()))
s_=s.copy()
s.reverse()
a=s_[:int((len(s_)-1)/2)]
a_=a.copy()
a.reverse()
b=s_[int((len(s_)+3)/2)-1:]
b_=b.copy()
b.reverse()
if s_==s and a_==a and b_==b:
    print('Yes')
else:
    print('No')
Buggy python submission (verdict: Time Limit Exceeded):
import collections as cl
import numpy as np
n=int(input())
a=list(map(int,input().split()))

for k in range(n):
    b=a.copy()
    a.pop(k)
    a_=np.array(list(cl.Counter(a).values()))
    a=b
    c=np.sum(a_*(a_-1)/2)
    print(int(c))

Fixed submission:
import collections as cl
import numpy as np
n=int(input())
a=list(map(int,input().split()))
b=cl.Counter(a)
a_=np.array(list(b.values()))
c=np.sum(a_*(a_-1)/2)
for k in range(n):
    x=b[a[k]]
    if x==2:
        print(int(c-1))
    elif x==1:
        print(int(c))
    else:
        print(int(c-(x-1)))

Buggy python submission (verdict: Time Limit Exceeded):
n=int(input())
a=list(map(int,input().split()))
for k in range(n):
    c=0
    b=a.copy()
    a.pop(k)
    for i in list(set(a)):
        c+=(a.count(i)*(a.count(i)-1))/2
    print(int(c))
    a=b

Fixed submission:
import collections as cl
import numpy as np
n=int(input())
a=list(map(int,input().split()))
b=cl.Counter(a)
a_=np.array(list(b.values()))
c=np.sum(a_*(a_-1)/2)
for k in range(n):
    x=b[a[k]]
    if x==2:
        print(int(c-1))
    elif x==1:
        print(int(c))
    else:
        print(int(c-(x-1)))

Buggy python submission (verdict: Time Limit Exceeded):
n=int(input())
a=list(map(int,input().split()))
for k in range(n):
    c=0
    b=a.copy()
    a.pop(k)
    for i in range(len(a)):
        for j in range(i+1,len(a)):
            if a[i]==a[j]:
                c+=1
    print(int(c))
    a=b

Fixed submission:
import collections as cl
import numpy as np
n=int(input())
a=list(map(int,input().split()))
b=cl.Counter(a)
a_=np.array(list(b.values()))
c=np.sum(a_*(a_-1)/2)
for k in range(n):
    x=b[a[k]]
    if x==2:
        print(int(c-1))
    elif x==1:
        print(int(c))
    else:
        print(int(c-(x-1)))

Buggy python submission (verdict: Time Limit Exceeded):
n=int(input())
a=list(map(int,input().split()))
for k in range(n):
    c=0
    b=a.copy()
    a.pop(k)
    for i in range(len(a)):
        for j in range(len(a)):
            if a[i]==a[j] and i!=j:
                c+=1
    print(int(c/2))
    a=b

Fixed submission:
import collections as cl
import numpy as np
n=int(input())
a=list(map(int,input().split()))
b=cl.Counter(a)
a_=np.array(list(b.values()))
c=np.sum(a_*(a_-1)/2)
for k in range(n):
    x=b[a[k]]
    if x==2:
        print(int(c-1))
    elif x==1:
        print(int(c))
    else:
        print(int(c-(x-1)))
Buggy python submission (verdict: Runtime Error):
a=map(int,input().split())
b=int(a[0]/(a[1]+a[2]))
c=a[0]-b*(a[1]+a[2])
if c>a[1]:
  print(b*a[1]+a[1])
else:
  print(b*a[1]+c)

Fixed submission:
a=list(map(int,input().split()))
b=int(a[0]/(a[1]+a[2]))
c=a[0]-b*(a[1]+a[2])
if c>a[1]:
    print(b*a[1]+a[1])
else:
    print(b*a[1]+c)
Buggy python submission (verdict: Runtime Error):
a = [list(map(int, input().split())) for i in range(3)]
output =[[0,0,0],[0,0,0],[0,0,0]]
n = int(input())
check=False
for k in range(n):
    b=int(input())
    for i in range(3):
        for j in range(3):
            if a[i][j]==b:
                output[i][j]=1
for i in range(3):
    if output[i][0]*output[i][1]*output[i][2]==1:
        check=True
    elif output[0][i]*output[1][i]*output[2][i]==1:
        check=True
if output[0][0]*output[1][1]*output[2][2]==1:
    check=True
elif output[2][0]*output[1][1]*output[0][2]==1:
    check=True
if check==True:
    print('Yes')
else:
    print('No')

Fixed submission:
a=int(input())
if a%2==0:
  print(int(a/2))
else:
  print(int(a/2)+1)
Buggy python submission (verdict: Runtime Error):
a = [list(map(int, input().split())) for i in range(3)]
output =[[0,0,0],[0,0,0],[0,0,0]]
n = int(input())
check==False
for k in range(n):
    b=int(input())
    for i in range(3):
        for j in range(3):
            if a[i][j]==b:
                output[i][j]=1
for i in range(3):
    if output[i][0]*output[i][1]*output[i][2]==1:
        check=True
    elif output[0][i]*output[1][i]*output[2][i]==1:
        check=True
if output[0][0]*output[1][1]*output[2][2]==1:
    check=True
elif output[2][0]*output[1][1]*output[0][2]==1:
    check=True
if check==True:
    print('Yes')
else:
    print('No')

Fixed submission:
a = [list(map(int, input().split())) for i in range(3)]
output =[[0,0,0],[0,0,0],[0,0,0]]
n = int(input())
check=False
for k in range(n):
    b=int(input())
    for i in range(3):
        for j in range(3):
            if a[i][j]==b:
                output[i][j]=1
for i in range(3):
    if output[i][0]*output[i][1]*output[i][2]==1:
        check=True
    elif output[0][i]*output[1][i]*output[2][i]==1:
        check=True
if output[0][0]*output[1][1]*output[2][2]==1:
    check=True
elif output[2][0]*output[1][1]*output[0][2]==1:
    check=True
if check==True:
    print('Yes')
else:
    print('No')

Buggy python submission (verdict: Runtime Error):
a = [list(map(int, input().split())) for i in range(3)]
output =[[0,0,0],[0,0,0],[0,0,0]]
n = int(input())
for k in range(n):
    b=int(input())
    for i in range(3):
        for j in range(3):
            if a[i][j]==b:
                output[i][j]=1
for i in range(3):
    if output[i][0]*output[i][1]*output[i][2]==1:
        check=True
    elif output[0][i]*output[1][i]*output[2][i]==1:
        check=True
if output[0][0]*output[1][1]*output[2][2]==1:
    check=True
elif output[2][0]*output[1][1]*output[0][2]==1:
    check=True
if check==True:
    print('Yes')
else:
    print('No')

Fixed submission:
a = [list(map(int, input().split())) for i in range(3)]
output =[[0,0,0],[0,0,0],[0,0,0]]
n = int(input())
check=False
for k in range(n):
    b=int(input())
    for i in range(3):
        for j in range(3):
            if a[i][j]==b:
                output[i][j]=1
for i in range(3):
    if output[i][0]*output[i][1]*output[i][2]==1:
        check=True
    elif output[0][i]*output[1][i]*output[2][i]==1:
        check=True
if output[0][0]*output[1][1]*output[2][2]==1:
    check=True
elif output[2][0]*output[1][1]*output[0][2]==1:
    check=True
if check==True:
    print('Yes')
else:
    print('No')
Buggy python submission (verdict: Runtime Error):
n = list(map(int,input().split()))
strlist=[input() for i in range(n[1])]
for i in range(10**(n[0]-1),10**n[0]):
    for j in range(n[1]):
        if len(str(i))<int(strlist[j][0]) or str(i)[int(strlist[j][0])-1]!=strlist[j][2]:
            z=1
            break
    if z==1:
        continue
    elif j+1==n[1]:
        print(i)
        break
    else:
        continue
if i==10**n[0]-1:
    print('-1')

Fixed submission:
n,m=map(int,input().split())
l=[-1]*n
check=False

for i in range(m):
    s,c=map(int,input().split())
    if n!=1 and s==1 and c==0:
        break
    if l[s-1]==-1 or l[s-1]==c:
        l[s-1]=c
    else:
        break
    if i==m-1:
        check=True
if n!=1 and l[0]==-1:
    l[0]=1

if m!=0 and check:
    for num in l:
        if num==-1:
            print(0,end='')
        else:
            print(num,end='')
elif n==1 and m==0:
    print(0)
elif m==0:
    print(10**(n-1))
else:
    print('-1')
Buggy python submission (verdict: Runtime Error):
h=int(input())
w=int(input())
n=int(input())
s=[[h*w for i in range(h)] for j in range(w)]
li=[]
for i in range(w):
  for j in range(h):
    s[i][j]=w*i+h*j-i*j
    if s[i][j]>=n:
      li.append(i+j)
print(min(li))

Fixed submission:
h=int(input())
w=int(input())
n=int(input())

m=max(h,w)
if n%m==0:
  print(int(n/m))
else:
  print(int(n/m+1))

Buggy python submission (verdict: Runtime Error):
h=int(input())
w=int(input())
n=int(input())
s=[[n for i in range(h)] for j in range(w)]
li=[]
for i in range(w):
  for j in range(h):
    s[i][j]=w*i+h*j-i*j
    if s[i][j]>=n:
      li.append(i+j)
print(min(li))

Fixed submission:
h=int(input())
w=int(input())
n=int(input())

m=max(h,w)
if n%m==0:
  print(int(n/m))
else:
  print(int(n/m+1))
Buggy python submission (verdict: Time Limit Exceeded):
N = int(input())
AList = input().split()
result = 1

for element in AList:
    result = result * int(element)
   
if result > 1e+18:
    print(-1)
else:
    print(result)

Fixed submission:
import sys

N = int(input())
AList = input().split()

result = 1

if "0" in AList:
    print(0)
    sys.exit()
    
for element in AList:
    result = result * int(element)

    if result > 1e+18:
        print(-1)
        sys.exit()

print(result)

Buggy python submission (verdict: Runtime Error):
import decimal

N = int(input())

AList = [decimal.Decimal(element) for element in input().split(" ")]

result = 1

for element in AList:
    result += result * element

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

Fixed submission:
import sys

N = int(input())
AList = input().split()

result = 1

if "0" in AList:
    print(0)
    sys.exit()
    
for element in AList:
    result = result * int(element)

    if result > 1e+18:
        print(-1)
        sys.exit()

print(result)

Buggy python submission (verdict: Runtime Error):
import decimal

N = int(input())
AList = [decimal.Decimal(element) for element in input().split(" ")]
result = 1

for element in AList:
    result *= element

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

Fixed submission:
import sys

N = int(input())
AList = input().split()

result = 1

if "0" in AList:
    print(0)
    sys.exit()
    
for element in AList:
    result = result * int(element)

    if result > 1e+18:
        print(-1)
        sys.exit()

print(result)

Buggy python submission (verdict: Runtime Error):
import decimal

N = int(input())
AList = [decimal.Decimal(element) for element in input().split(" ")]
result = 1

for element in AList:
    result *= element

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

Fixed submission:
import sys

N = int(input())
AList = input().split()

result = 1

if "0" in AList:
    print(0)
    sys.exit()
    
for element in AList:
    result = result * int(element)

    if result > 1e+18:
        print(-1)
        sys.exit()

print(result)
Buggy python submission (verdict: Runtime Error):
import math

A, B = input().split(" ")
A = int(A)
B = int(B)

print(math.floor(A * B))

Fixed submission:
import math
import decimal

A, B = input().split(" ")
A = decimal.Decimal(A)
B = decimal.Decimal(B)

print(math.floor(A * B))

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

values = np.array(input().split(" "), dtype=np.int64)
result = np.prod(values)

print(math.floor(result))

Fixed submission:
import math
import decimal

A, B = input().split(" ")
A = decimal.Decimal(A)
B = decimal.Decimal(B)

print(math.floor(A * B))
Buggy python submission (verdict: Time Limit Exceeded):
import math
from functools import reduce

K = int(input())

def gcd(a, b, c):
    return reduce(math.gcd, [a, b, c])

S = 0

tempDict = {}

for a in range(1, K + 1):
    for b in range(1, K + 1):
        for c in range(1, K + 1):
            tempTuple = tuple([a, b, c])
            
            if  tempTuple in tempDict:
                S += tempDict[tempTuple]
            else:
                temp = gcd(a, b, c)
                tempDict[tempTuple] = temp
                S += temp

print(S)

Fixed submission:
import math
import itertools

from functools import reduce

K = int(input())

def gcd(tempList):
    return reduce(math.gcd, tempList)

S = 0
tempDict = {}

for combination in itertools.combinations_with_replacement(range(1, K + 1), 3):
    if not combination[0] in tempDict:
        tempDict[combination[0]] = {}
    
    if not combination[1] in tempDict[combination[0]]:
        tempDict[combination[0]][combination[1]] = {}

    if not combination[2] in tempDict[combination[0]][combination[1]]:
        tempDict[combination[0]][combination[1]][combination[2]] = 0
        
    tempDict[combination[0]][combination[1]][combination[2]] = gcd(combination)


for n in itertools.product(range(1, K + 1), repeat=3):
    n = list(n)
    n.sort()
    
    S += tempDict[n[0]][n[1]][n[2]]

print(S)
Buggy python submission (verdict: Runtime Error):
import sys

def main(argv):
    result = 0
    ball = int(argv[0])
    people = int(argv[1])

    if people <= 1:
        return 0

    if ball > people:
        result = ball - people
        result += 1
        
    else:
        return 0

    result -= 1

    return result


if __name__ == '__main__':
    print(main(sys.argv[1:]))

Fixed submission:
import sys

def main():
    inputData = input().strip().split(" ")
    result = 0
    ball = int(inputData[0])
    people = int(inputData[1])

    if people <= 1:
        return 0

    if ball > people:
        result = ball - people
        result += 1

    else:
        return 0

    result -= 1

    return result


if __name__ == '__main__':
    print(main())
Buggy python submission (verdict: Runtime Error):
N = input()

#A,B = map(int,input().split())

#A = [int(input()) for i in range(N)]

"""
    A = []
    for _ in range(N):
        A.append(list(map(int,input().split())))
"""

if N.isupper():
    print(A)
else:
    print(B)

Fixed submission:
N = input()

if N.isupper():
    print("A")
else:
    print("a")
Buggy python submission (verdict: Runtime Error):
n,m = map(int,input().split())
if n == m;
    print(Yes)
else:
    print(No)

Fixed submission:
n,m = map(int,input().split())
if n == m:
    print("Yes")
else:
    print("No")
Buggy python submission (verdict: Time Limit Exceeded):
N = int(input())
count = 1
P = list(map(int,input().split()))
for n in range(1,N):
    if min(P[0:n]) >= P[n]:
        count += 1
print(count)

Fixed submission:
N = int(input())
count = 1
P = list(map(int,input().split()))
last_min = P[0]
for n in range(1,N):
    if last_min >= P[n]:
        count += 1
    last_min = min(last_min,P[n])
print(count)

Buggy python submission (verdict: Time Limit Exceeded):
N = int(input())
count = 0
P = list(map(int,input().split()))
for i in range(N):
    ok = True
    for j in range(i):
        if P[i] <= P[j]:
            None
        else:
            ok = False
            break
    if ok == True:
        count += 1
print(count)

Fixed submission:
N = int(input())
count = 1
P = list(map(int,input().split()))
last_min = P[0]
for n in range(1,N):
    if last_min >= P[n]:
        count += 1
    last_min = min(last_min,P[n])
print(count)

Buggy python submission (verdict: Time Limit Exceeded):
N = int(input())
count = 0
P = list(map(int,input().split()))
list = [True]*N
for i in range(N):
    for j in range(i):
        if P[i] <= P[j]:
            None
        else:
            list[i] = False
            break
print(list.count(True))

Fixed submission:
N = int(input())
count = 1
P = list(map(int,input().split()))
last_min = P[0]
for n in range(1,N):
    if last_min >= P[n]:
        count += 1
    last_min = min(last_min,P[n])
print(count)

Buggy python submission (verdict: Time Limit Exceeded):
N = int(input())
count = 0
P = list(map(int,input().split()))
list = [True]*N
for j in range(N):
    for i in range(j+1,N):
        if P[i] <= P[j]:
            None
        else:
            list[i] = False
print(list.count(True))

Fixed submission:
N = int(input())
count = 1
P = list(map(int,input().split()))
last_min = P[0]
for n in range(1,N):
    if last_min >= P[n]:
        count += 1
    last_min = min(last_min,P[n])
print(count)
Buggy python submission (verdict: Runtime Error):
N,A,B = map(int,input().split())
temp = 0
if (B-A)%2 == 0:
    print(int((B-A)/2))
else:
    min = min([B-1,N-A])
    if A-1 < N-B and (B-A-1)% 2 == 0:
        temp = A + (B-A-1)/2
        if temp < min:
            print(temp)
    elif (b-a-1)%2 == 0:
        a = N - A + 1
        b = N - B + 1
        temp = a + (b-a-1)/2
        if temp < min:
            print(temp)
    else:
        print(temp)

Fixed submission:
N,A,B = map(int,input().split())
temp = 0
if (B-A)%2 == 0:
    print(int((B-A)//2))
else:
    a = N - A + 1
    b = N - B + 1
    print(min([B-1,N-A,A + (B-A-1)//2,a + (b-a-1)//2]))
Buggy python submission (verdict: Runtime Error):
x = str(input())
if count(x,"5")==2 and count(x,"7")==1:
  print("YES")
else:
  print("NO")

Fixed submission:
x = str(input())
if x.count("5")==2 and x.count("7")==1:
  print("YES")
else:
  print("NO")
Buggy python submission (verdict: Runtime Error):
from sys import stdin

A = list(map(int,stdin.readline().split()))
B = list(map(int,stdin.readline().split()))
C = [x for x in range(1,101)]
C = set(C)
B = set(B)
C = C.difference(B)
C = list(C)
X=A[0]
N=A[1]
record=max(C)
number=0

for t in C:
    diff=abs(t-X)
    if diff<record:
        record=diff
        number=t
    elif diff==record:
        number=min(number,t)

print(number)

Fixed submission:
from sys import stdin

A = list(map(int,stdin.readline().split()))
B = list(map(int,stdin.readline().split()))
C = [x for x in range(-10,110)]
C = set(C)
B = set(B)
C = C.difference(B)
C = list(C)
X=A[0]
N=A[1]
record=200
number=1000
K=0

if N==0:
    print(X)
    K=1

for t in C:
    diff=abs(t-X)
    if diff<record:
        record=diff
        number=t
    elif diff==record:
        number=min(number,t)

if K==0:
   print(number)
Buggy python submission (verdict: Time Limit Exceeded):
from sys import stdin

a = int(stdin.readline())
A=stdin.readline().split()

product=1
K=0

for k in range(0,a):
    if int(A[k])==0:
        product=0
        K=1
        break
if K==0:
   for b in range(0,a) :
       product=product*int(A[b])
   if product > 10 ** 18:
       product = -1



print(product)

Fixed submission:
from sys import stdin

a = int(stdin.readline())
A=stdin.readline().split()

product=1
K=0

for k in range(0,a):
    if int(A[k])==0:
        product=0
        K=1
        break
        
if K==0:
   for b in range(0,a) :
       product=product*int(A[b])
       if product > 10 ** 18:
          product = -1
          break



print(product)

Buggy python submission (verdict: Time Limit Exceeded):
from sys import stdin

a = int(stdin.readline())
A=stdin.readline().split()

product=1
for b in range(0,a):
    product=product*int(A[b])
    if product==0:
        break

if product>10**18:
    product=-1



print(product)

Fixed submission:
from sys import stdin

a = int(stdin.readline())
A=stdin.readline().split()

product=1
K=0

for k in range(0,a):
    if int(A[k])==0:
        product=0
        K=1
        break
        
if K==0:
   for b in range(0,a) :
       product=product*int(A[b])
       if product > 10 ** 18:
          product = -1
          break



print(product)
Buggy python submission (verdict: Runtime Error):
from sys import stdin
import math
a=int(stdin.readline())
A=stdin.readline().split()
sum=0
for k in range(0,a+1):
    sum+=int(A[k])

sum-=int(A[a])
ver=1
lay=1
K=0

for l in range(0,a):
    if lay-int(A[l])<=0:
        print(-1)
        K=1
        break
    if (lay-int(A[l]))*2-sum+int(A[l])<=int(A[a]):
        lay=(lay-int(A[l]))*2
        ver+=lay
        sum-=int(A[l])
        T=l
    else:
        lay-=int(A[l])
        sum-=int(A[l])
        x=lay-sum-int(A[a])
        if x==0:
           ver+=lay
        else:
           lay=sum+int(A[a])
           ver+=lay
        T=l
        break

if K==0:
    for u in range(T+1,a):
        lay -= int(A[u])
        sum -= int(A[u])
        ver+=lay

if K==0:
    print(ver)

Fixed submission:
from sys import stdin

a=int(stdin.readline())
A=stdin.readline().split()
sum=0
for k in range(0,a+1):
    sum+=int(A[k])

sum-=int(A[a])
ver=1
lay=1
K=0
T=0

if a==0:
    if A[0]!='1':
        print(-1)
        K=1
    else:
        print(1)
        K=1

for l in range(0,a):
    if lay-int(A[l])<=0:
        print(-1)
        K=1
        break
    if (lay-int(A[l]))*2<int(A[a]) and l==(a-1):
        print(-1)
        K=1
        break
    if (lay-int(A[l]))*2-sum+int(A[l])<=int(A[a]):
        lay=(lay-int(A[l]))*2
        ver+=lay
        sum-=int(A[l])
        T=l
    else:
        lay-=int(A[l])
        sum-=int(A[l])
        x=lay-sum-int(A[a])
        if x==0:
           ver+=lay
        elif x>0:
            print(-1)
            K=1
        else:
           lay=sum+int(A[a])
           ver+=lay
        T=l
        break

if K==0:
    for u in range(T+1,a):
        lay -= int(A[u])
        sum -= int(A[u])
        ver+=lay

if K==0:
    print(ver)
Buggy python submission (verdict: Time Limit Exceeded):
A,B,N= map(int, input().split())
ans = 0
for i in range(N+1):
    d = (int((A*i)/B) - A *int(i/B))
    if ans < d:
        ans = d
print(ans)

Fixed submission:
import math
A,B,N= map(int, input().split())
ans = 0
if N>=B:
    i = B-1
else:
    i = N
d = (math.floor((A*i)/B) - A *math.floor(i/B))
print(d)
Buggy python submission (verdict: Time Limit Exceeded):
import math

K  = int(input())
ans = 0
for a in range(K+1):
    for b in range(K+1):
        for c in range(K+1):
            if a*b*c !=0:
                s = math.gcd(math.gcd(a,b),c)
                ans = ans +s

print(ans)

Fixed submission:
import math

K  = int(input())
ans = 0
for a in range(K+1):
    for b in range(a,K+1):
        for c in range(b,K+1):
            if a==b and b ==c:
                dabu = 1
            elif a!=b and b!=c and c!=a:
                dabu = 6
            else:
                dabu = 3
            if a*b*c !=0:
                s = math.gcd(math.gcd(a,b),c) * dabu
                ans = ans +s
print(ans)
Buggy python submission (verdict: Runtime Error):
a,b = list(map(int,input().split()))

A = list(range(int((a / 0.08)),int((a+1)/0.08))-1)
B = list(range(int((b / 0.1)),int((b+1)/0.1))-1)
price = set(A) & set(B)
if len(price) == 0:
    ans = -1
else:
    ans = min(price)
print(ans)

Fixed submission:
import math
a,b = list(map(int,input().split()))

A = list(range(math.ceil((a / 0.08)),int((a+1)/0.08)))
B = list(range(int((b / 0.1)),int((b+1)/0.1)-1))
price = set(A) & set(B)
if len(price) == 0:
    ans = -1
else:
    ans = min(price)
print(ans)