Harryxun/testdata huggingface dataset:
Buggy python submission (verdict: Runtime Error):
K = input()


def Sn(N1):
    Sn = 0
    N = str(N1)
    for i in range(len(N)):
        Sn = Sn + int(N[i])

    return Sn

R = []
for i in range(1,3000):
    X = 0
    for j in range(i,1000):
        if(i/Sn(i) <= j/Sn(j)):
            X = X + 1

        if (X ==  1000 - i ):
            R.append(i)


for i in range(0,int(K)):
    print(R[i])

Fixed submission:
S = input()
R = 0
for i in range (4):
    if(S[i] == '+'):
        R = R + 1
    if(S[i] == '-'):
        R = R -1
print(R)
Buggy python submission (verdict: Runtime Error):
N = int(input())
flag = 0

for i in range(1, 10):
    if (N % i) == 0 and (N // i) < 10:
        print('Yes')
        break

else:
    print('No')


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

if A > 9 or B > 9:
    print('-1')
else:
    print(A*B)
Buggy python submission (verdict: Time Limit Exceeded):
N, K, Q = map(int, input().split())
A = [K] * N
B = []

for i in range(Q):
    B.append(int(input()))

for i in range(N):
    A[i] -= Q - B.count(i+1)
    if A[i] > 0:
        print('Yes')
    else:
        print('No')


Fixed submission:
N, K, Q = map(int, input().split())
A = [0] * N
B = []

for i in range(Q):
    a = int(input())
    A[a-1] += 1

for s in range(N):
    if A[s] > Q - K:
        print('Yes')
    else:
        print('No')
Buggy python submission (verdict: Runtime Error):
N = int(input())
H = list(map(int, input().split()))
ans = []
a = 0

if N == 1:
    print('0')
    exit()

for i in range(N-2):
    if H[t] >= H[t+1]:
        a += 1
    else:
        a = 0
    ans.append(a)

print(max(ans))


Fixed submission:
N = int(input())
H = list(map(int, input().split()))
ans = []
a = 0

if N == 1:
    print('0')
    exit()

for i in range(N-1):
    if H[i] >= H[i+1]:
        a += 1
    else:
        a = 0
    ans.append(a)

print(max(ans))

Buggy python submission (verdict: Runtime Error):
N = int(input())
H = list(map(int, input().split()))
ans = []
a = 0

for i in range(N-2):
    if H[t] >= H[t+1]:
        a += 1
    else:
        a = 0
    ans.append(a)
    
print(max(ans))


Fixed submission:
N = int(input())
H = list(map(int, input().split()))
ans = []
a = 0

if N == 1:
    print('0')
    exit()

for i in range(N-1):
    if H[i] >= H[i+1]:
        a += 1
    else:
        a = 0
    ans.append(a)

print(max(ans))

Buggy python submission (verdict: Time Limit Exceeded):
N = int(input())
H = list(map(int, input().split()))
ans = 0

for s in range(N-2):
    count = 0
    for t in range(s, N-1):
        if H[t] >= H[t+1]:
            count += 1
        else:
            break

    if ans < count:
        ans = count

    if N - s < ans:
        break

print(ans)

Fixed submission:
N = int(input())
H = list(map(int, input().split()))
ans = []
a = 0

if N == 1:
    print('0')
    exit()

for i in range(N-1):
    if H[i] >= H[i+1]:
        a += 1
    else:
        a = 0
    ans.append(a)

print(max(ans))
Buggy python submission (verdict: Runtime Error):
s = list(input())
s_ = list('abcdefghijklmnopqrstuvwxyz')

s = list(set(s))
s.sort()

for i in range(len(s)):
    if s[i] != s_[i]:
        print(s_[i])
        exit()
    elif i == len(s) - 1:
        print(s_[i+1])
        exit()
print('None')

Fixed submission:
s = list(input())
s_ = list('abcdefghijklmnopqrstuvwxyz')

s = list(set(s))
s.sort()

for i in range(len(s)):
    if s[i] != s_[i]:
        print(s_[i])
        exit()
if len(s) < 26: print(s_[len(s)])
else: print('None')

Buggy python submission (verdict: Runtime Error):
s = list(input())
s_ = list('abcdefghijklmnopqrstuvwxyz')

s = list(set(s))
s.sort()

for i in range(26):
    if s[i] != s_[i]:
        print(s_[i])
        exit()
print('None')

Fixed submission:
s = list(input())
s_ = list('abcdefghijklmnopqrstuvwxyz')

s = list(set(s))
s.sort()

for i in range(len(s)):
    if s[i] != s_[i]:
        print(s_[i])
        exit()
if len(s) < 26: print(s_[len(s)])
else: print('None')
Buggy python submission (verdict: Time Limit Exceeded):
a, b, x = map(int, input().split())
count = 0

for i in range(a,b+1):
    if i % x == 0:
        count += 1

print(count)


Fixed submission:
a, b, x = map(int, input().split())

print(b//x - (a-1)//x)
Buggy python submission (verdict: Time Limit Exceeded):
N,K,Q=list(map(int,input().split()))
a=[K for _ in range(N)]
b=[0 for _ in range(Q)]
for i in range(Q):
    b[i]=int(input())

for i in range(Q):
    for j in range(N):
        if (b[i]-1)!=j:
            a[j]-=1

for i in range(N):
    if a[i]<=0:
        print("No")
    else:
        print("Yes")


Fixed submission:
n, k, q = map(int, input().split())
L = [k for i in range(n)]
a = [int(input()) for i in range(q)]

for i in a:
    L[i-1] = L[i-1] + 1

for i in range(len(L)):
    if q  < L[i]:
        print("Yes")
    else:
        print("No")

Buggy python submission (verdict: Runtime Error):
n,k,q=map(int,input().split())
L=[k for i in range(N)]
a=[int(input()) for i in range(q)]

for i in a:
    L[i-1]=L[i-1]+1

for i in range(len(L)):
    if q<L[i]:
        print("YES")
    else:
        print("NO")

Fixed submission:
n, k, q = map(int, input().split())
L = [k for i in range(n)]
a = [int(input()) for i in range(q)]

for i in a:
    L[i-1] = L[i-1] + 1

for i in range(len(L)):
    if q  < L[i]:
        print("Yes")
    else:
        print("No")
Buggy python submission (verdict: Runtime Error):
n = int(input())
h = list(map(int, input().split()))
h[0] -= 1
flag = True
for i in range(n - 1):
    # print(i)
    if h[i] > h[i + 1]:
        flag = False
        break
    elif h[i] <= h[i + 1] - 1:
        h[i + 1] -= 1

if flag:
    print("Yes")
else:
    print("No")


Fixed submission:

A,B,C=list(map(int,input().split()))


C=C-(A-B)
if(C<0):
    print(0)
else:
    print(C)

Buggy python submission (verdict: Runtime Error):
n = int(input())
h = list(map(int, input().split()))
h[0] -= 1
flag = True
for i in range(n - 1):
    # print(i)
    if h[i] > h[i + 1]:
        flag = False
        break
    elif h[i] <= h[i + 1] - 1:
        h[i + 1] -= 1

if flag:
    print("Yes")
else:
    print("No")


Fixed submission:

A,B,C=list(map(int,input().split()))


C=C-(A-B)
if(C<0):
    print(0)
else:
    print(C)
Buggy python submission (verdict: Runtime Error):
N = int(input())
ans = "No"

for i in range(1, 10):
    if N % i == 0:
        t =  N / i
        if 1 <= t <= 9:
            ans = "Yes"
            break

print(ans)

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

if A <= 9 and B <= 9:
    ans = A * B
else:
    ans = -1

print(ans)
Buggy python submission (verdict: Runtime Error):
N = int(input())
ans = "No"

for i in range(1, 10):
    if N % i == 0:
        t =  N // A
        if 1 <= A <= 9:
            ans = "Yes"

print(ans)

Fixed submission:
N = int(input())
ans = "No"

for i in range(1, 10):
    if N % i == 0:
        t =  N / i
        if 1 <= t <= 9:
            ans = "Yes"
            break

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

l.sort()
distance = []
sum = 0

if m == 1:
    print("0")
    exit()

if m == 2:
    print(l[len(l)-1] - l[0])
    exit()

for i in range(len(l) - 1):
    distance.append(l[i+1] - l[i])

distance.sort(reverse=True)

for i in range(n-1):
    sum += distance[i]

print(l[len(l)-1] - l[0] - sum)


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

l.sort()
d = l[len(l)-1] - l[0]
distance = []
sum = 0

for j in range(len(l)-1):
    distance.append( l[j+1] - l[j] )

distance.sort(reverse=True)

if n >= m:
    print("0")
else:
    for i in range(n-1):
        sum += distance[i]
    print(d-sum)

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

l.sort()
distance = []
sum = 0

if m == 1:
    print("0")
    exit()

for i in range(len(l) - 1):
    distance.append(l[i+1] - l[i])

distance.sort(reverse=True)

for i in range(n-1):
    sum += distance[i]

print(l[len(l)-1] - l[0] - sum)


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

l.sort()
d = l[len(l)-1] - l[0]
distance = []
sum = 0

for j in range(len(l)-1):
    distance.append( l[j+1] - l[j] )

distance.sort(reverse=True)

if n >= m:
    print("0")
else:
    for i in range(n-1):
        sum += distance[i]
    print(d-sum)
Buggy python submission (verdict: Runtime Error):
s = int(input())
a = list(map(int, input().split()))

incFlg = True   #登る場合はTure,　降る場合はFalse
before_height = 0
sum = 0

for i in range(len(a)-1):
    #降る場合
    if a[i] > a[i+1]:
        #その前が登り
        if incFlg:
            sum += a[i] - before_height
            incFlg = False
        #その前が下り
        else:
            # before_height = a[i]
    #登る場合
    else:
        if not incFlg:
            before_height = a[i]
        incFlg = True

if incFlg:
    sum += a[len(a)-1] - before_height

print(sum)


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

incFlg = True   #登る場合はTure,　降る場合はFalse
before_height = 0
sum = 0

for i in range(len(a)-1):
    #降る場合
    if a[i] > a[i+1]:
        #その前が登り
        if incFlg:
            sum += a[i] - before_height
            incFlg = False
        #その前が下り
        else:
            before_height = a[i]
    #登る場合
    else:
        if not incFlg:
            before_height = a[i]
        incFlg = True

if incFlg:
    sum += a[len(a)-1] - before_height

print(sum)
Buggy python submission (verdict: Runtime Error):
n, m, x, y = map(int, input().split())

xl = list(map(int, input().split()))
yl = list(map(int, input().split()))

if max(xl + x) < min(yl + y):
    print("No War")
else:
    print("War")

Fixed submission:
n, m, x, y = map(int, input().split())

xl = list(map(int, input().split()))
yl = list(map(int, input().split()))

if max(xl + [x]) < min(yl + [y]):
    print("No War")
else:
    print("War")

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

xl = list(map(int, input().split()))
yl = list(map(int, input().split()))

xmax = sorted(x, key=None ,reverse=True)[0]
ymin = sorted(y)[0]

if max(x + xl) < min(y + yl):
    print("No War")
else:
    print("War")

Fixed submission:
n, m, x, y = map(int, input().split())

xl = list(map(int, input().split()))
yl = list(map(int, input().split()))

if max(xl + [x]) < min(yl + [y]):
    print("No War")
else:
    print("War")

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

xl = list(map(int, input().split()))
yl = list(map(int, input().split()))

xmax = sorted(x, key=None ,reverse=True)[0]
ymin = sorted(y)[0]

if max(x, xl) < min(y, yl):
    print("No War")
else:
    print("War")

Fixed submission:
n, m, x, y = map(int, input().split())

xl = list(map(int, input().split()))
yl = list(map(int, input().split()))

if max(xl + [x]) < min(yl + [y]):
    print("No War")
else:
    print("War")
Buggy python submission (verdict: Runtime Error):
n, x = map(int, input().split())
l = list(map(int, input().split()))

def gcd(x, y):
    while (y != 0):
        x, y = y, x%y

    return x

diff = []

for j in l:
    diff.append(abs(j - x))

ans = diff[0]

for d in range(d[1:]):
    ans = gcd(ans, d)

print(ans)



Fixed submission:
def gcd(a, b):
    while a:
        a, b = b % a, a
    return b
 
 
def main():
    n, y = map(int, input().split())
    xs = list(map(int, input().split()))
    res = abs(y - xs[0])
    for x in xs[1:]:
        res = gcd(res, abs(y - x))
    print(res)
 
 
if __name__ == '__main__':
    main()
Buggy python submission (verdict: Runtime Error):
s = input()
print('Heisei' if S <= '2019/04/30' else 'TBD')

Fixed submission:
s = input()
print('Heisei' if s <= '2019/04/30' else 'TBD')
Buggy python submission (verdict: Runtime Error):
A,B = (int(i) for i in input().split())  
if (len(A)>1) or (len(B)>1):
  print("-1")
else:
  print(A*B)

Fixed submission:
A,B = (int(i) for i in input().split())  
if (A>9) or (B>9):
    print("-1")
else:
    print(A*B)

Buggy python submission (verdict: Runtime Error):
A,B = (int(i) for i in input().split())  
if len(A)>1 | len(B)>1:
  print("-1")
else:
  print(A*B)

Fixed submission:
A,B = (int(i) for i in input().split())  
if (A>9) or (B>9):
    print("-1")
else:
    print(A*B)

Buggy python submission (verdict: Runtime Error):
A,B = (int(i) for i in input().split())  
if len(A)>1 or len(B)>1:
  print("-1")
else:
  print(A*B)

Fixed submission:
A,B = (int(i) for i in input().split())  
if (A>9) or (B>9):
    print("-1")
else:
    print(A*B)

Buggy python submission (verdict: Runtime Error):
A,B = input().split()
if (len(A)>1 or len(B)>1):
  print(-1) 
else:
  print(A*B)

Fixed submission:
A,B = (int(i) for i in input().split())  
if (A>9) or (B>9):
    print("-1")
else:
    print(A*B)
Buggy python submission (verdict: Runtime Error):
N=int(input())
for i in range(9):
  if N%i==0:
    tmp = N/i
    if tmp<10:
      print("Yes")
print("No")

Fixed submission:
N=int(input())
for i in range(1,10):
    if N%i==0:
        tmp = N/i
        if tmp<10:
                print("Yes")
                break
else:
    print("No")
Buggy python submission (verdict: Runtime Error):
N=int(input())
count=0
for i in range(1,N):
  if len(i)%2!=0:
    count+=1
print(count)

Fixed submission:
N=int(input())
count=0
for i in range(1,N+1):
  if len(str(i))%2!=0:
    count+=1
print(count)

Buggy python submission (verdict: Runtime Error):
N=input()
count=0
for i in range(1,N):
  if len(i)%2!=0:
    count+=1
print(count)

Fixed submission:
N=int(input())
count=0
for i in range(1,N+1):
  if len(str(i))%2!=0:
    count+=1
print(count)
Buggy python submission (verdict: Runtime Error):
N,X=(int(i) for i in input().split())
L=[int(i) for i in input().split()]
for i in range(1,N+1):
  if sum(L[:i])>X:
    print(i)
    break

Fixed submission:
X,A=(int(i) for i in input().split())
if X<A:
    print(0)
else:
    print(10)

Buggy python submission (verdict: Runtime Error):
N,X=(int(i) for i in input().split())
L=[int(i) for i in input().split()]
for i in range(1,N+1):
    if sum(L[:i])>X:
        print(i)
        break

Fixed submission:
X,A=(int(i) for i in input().split())
if X<A:
    print(0)
else:
    print(10)
Buggy python submission (verdict: Runtime Error):
import numpy as np
L,A,B,M=(int(i) for i in input().split())
array=np.arange(A,A+B*L-1,B)
result=""
for i in range(L):
    result+=str(array[i])
print(int(result)%M)

Fixed submission:
A=[int(i) for i in input().split()]
print(sum(A)-max(A))
Buggy python submission (verdict: Runtime Error):
A,P=int(i) for i in input().split()
print((3*A+P)/2)

Fixed submission:
A,P=(int(i) for i in input().split())
print(int((3*A+P)/2))
Buggy python submission (verdict: Runtime Error):
N,K=(int(i) for i in input().split())
S=input()
print(S[:K]+S[K+1].lower()+S[K+1:])

Fixed submission:
N,K=(int(i) for i in input().split())
S=input()
print(S[:K-1]+S[K-1].lower()+S[K:])

Buggy python submission (verdict: Runtime Error):
N.K=(int(i) for i in input().split())
S=input()
print(S[:K]+lower(S[K+1])+S[K+1:])

Fixed submission:
N,K=(int(i) for i in input().split())
S=input()
print(S[:K-1]+S[K-1].lower()+S[K:])
Buggy python submission (verdict: Runtime Error):
A,B,C=(int(i) for i in input().split())
2.if B<=C<=A or A<=C<=B:
3.  print("Yes")
4.else:
5.  print("No")


Fixed submission:
A,B,C=(int(i) for i in input().split())
if B<=C<=A or A<=C<=B:
  print("Yes")
else:
  print("No")

Buggy python submission (verdict: Runtime Error):
A,B,C=(int(i) for i in input().split())
2.if A<=C and C<=B:
3.  print("Yes")
4.else:
5.  print("No")


Fixed submission:
A,B,C=(int(i) for i in input().split())
if B<=C<=A or A<=C<=B:
  print("Yes")
else:
  print("No")
Buggy python submission (verdict: Runtime Error):
S=input()
result1=0
result2=0
if S[0]=='1':
    for i in range(len(S)):
        if i%2==0:
            if S[i]=='0':
                result1+=1
            if S[i]=='1':
                result2+=1
        else:
            if S[i]=='1':
                result1+=1
            if S[i]=='0':
                result2+=1
    print(min(result1,result2))
else:
     for i in range(len(S)):
        if i%2==0:
            if S[i]=='0':
                result1+=1
            if S[i]=='1':
                result2+=1
        else:
            if S[i]=='1':
                result1+=1
            if S[i]=='0':
                result2+=1
    print(min(result1,result2))

Fixed submission:
S=input()
result1=0
result2=0
if S[0]=='1':
    for i in range(len(S)):
        if i%2==0:
            if S[i]=='0':
                result1+=1
            if S[i]=='1':
                result2+=1
        else:
            if S[i]=='1':
                result1+=1
            if S[i]=='0':
                result2+=1
    print(min(result1,result2))
else:
    for i in range(len(S)):
        if i%2==0:
            if S[i]=='0':
                result1+=1
            if S[i]=='1':
                result2+=1
        else:
            if S[i]=='1':
                result1+=1
            if S[i]=='0':
                result2+=1
    print(min(result1,result2))
Buggy python submission (verdict: Runtime Error):
A=[int(input()) for i in range(6)]
def Five(A):
	for i in range(len(A)-2):
  		if A[i+1]-A[i] > A[-1]:
    		return print(":(")
	return print("Yay!")
Five(A)

Fixed submission:
A=[int(input()) for i in range(6)]
def Five(A):
    if A[-2]-A[0] > A[-1]:
        return print(":(")
    return print("Yay!")
Five(A)

Buggy python submission (verdict: Runtime Error):
A=[int(i) for i in input()]
def Five(A):
	for i in range(len(A)-2):
  		if A[i+1]-A[i] > A[-1]:
    		return print(":(")
	return print("Yay!")
Five(A)

Fixed submission:
A=[int(input()) for i in range(6)]
def Five(A):
    if A[-2]-A[0] > A[-1]:
        return print(":(")
    return print("Yay!")
Five(A)
Buggy python submission (verdict: Runtime Error):
import numpy as np
A=[int(input()) for i in range(5)]
B=[]
for i in range(5):
    if int(str(A[i])[-1])!=0 and len(str(A[i]))>2:
        B.append(int(str(A[i])[:-3]+str(A[i]+1)+'0'))
    elif int(str(A[i])[-1])!=0 and len(str(A[i]))==2:
        B.append(int(str(int(str(A[i])[0])+1)+'0'))
    elif int(str(A[i])[-1])!=0 and len(str(A[i]))==1:
        B.append(10)
    else:
        B.append(int(A[i]))
a=np.array(A)
b=np.array(B)
np.array(B)-np.array(A)
tmp=np.sort(b-a)
return sum(tmp)+sum(a)-tmp[-1]

Fixed submission:
import numpy as np
A=[int(input()) for i in range(5)]
B=[]
for i in range(5):
    if int(str(A[i])[-1])!=0 and len(str(A[i]))>2:
        B.append(int(str(A[i])[:-2]+str(int(str(A[i])[-2])+1)+'0'))
    elif int(str(A[i])[-1])!=0 and len(str(A[i]))==2:
        B.append(int(str(int(str(A[i])[0])+1)+'0'))
    elif int(str(A[i])[-1])!=0 and len(str(A[i]))==1:
        B.append(10)
    else:
        B.append(int(A[i]))
a=np.array(A)
b=np.array(B)
np.array(B)-np.array(A)
tmp=np.sort(b-a)
print(sum(tmp)+sum(a)-tmp[-1])
Buggy python submission (verdict: Runtime Error):
b=input()
if b=='A':
    print('T')
elif b=='T'
    print('A')
elif b=='C'
    print('G')
else:
    print('C')

Fixed submission:
b=input()
if b=='A':
    print('T')
elif b=='T':
    print('A')
elif b=='C':
    print('G')
else:
    print('C')
Buggy python submission (verdict: Runtime Error):
S=input()
count=0
result=[]
for i in S:
  if i=='A' or i=='T' or i=='G' or i=='C':
    count+=1
  else:
    result.append(count)
    count=0
print(max(result))

Fixed submission:
S=input()
count=0
result=0
for i in S:
    if i in 'AGTC':
        count+=1
        result=max(result,count)
    else:
        count=0
print(result)

Buggy python submission (verdict: Runtime Error):
S=input()
count=0
result=[]
for i in S:
    if i=='A' or i=='T' or i=='G' or i=='C':
        count+=1
    else:
        result.append(count)
        count=0
print(max(result))

Fixed submission:
S=input()
count=0
result=0
for i in S:
    if i in 'AGTC':
        count+=1
        result=max(result,count)
    else:
        count=0
print(result)
Buggy python submission (verdict: Runtime Error):
"""B - K-th Common Divisor"""
A,B,K=(int(i) for i in input().split())
result=[]
for i in range(1,min(A,B)+1):
    if A%i==0 and B%i==0:
        result.append(i)
result.reverse()
print(result[K-1])

Fixed submission:
A,B,C=(int(i) for i in input().split())
if A*C<=B:
  print(C)
else:
  print(int(B/A))

Buggy python submission (verdict: Runtime Error):
A,B,C=(int(i) for i in input().split())
if A*C<=B:
  print(C)
else:
  print(int(B/A)

Fixed submission:
A,B,C=(int(i) for i in input().split())
if A*C<=B:
  print(C)
else:
  print(int(B/A))
Buggy python submission (verdict: Runtime Error):
"""B - K-th Common Divisor"""
A,B,K=(int(i) for i in input().split())
result=[]
for i in range(1,min(A,B)):
    if A%i==0 and B%i==0:
        result.append(i)
result.reverse()
print(result[K-1])

Fixed submission:
"""B - K-th Common Divisor"""
A,B,K=(int(i) for i in input().split())
result=[]
for i in range(1,101):
    if A%i==0 and B%i==0:
        result.append(i)
result.reverse()
print(result[K-1])

Buggy python submission (verdict: Runtime Error):
"""B - K-th Common Divisor"""
A,B,K=(int(i) for i in input().split())
result=[]
for i in range(1,min(A,B)):
    if A%i==0 and B%i==0:
        result.append(i)
print(result[K-1])

Fixed submission:
"""B - K-th Common Divisor"""
A,B,K=(int(i) for i in input().split())
result=[]
for i in range(1,101):
    if A%i==0 and B%i==0:
        result.append(i)
result.reverse()
print(result[K-1])

Buggy python submission (verdict: Runtime Error):
"""B - K-th Common Divisor"""
A,B,K=(int(i) for i in input().split())
result=[]
for i in range(1,max(A,B)):
  if A%i==0 and B%i==0:
    result.append(i)
print(result[K-1])

Fixed submission:
"""B - K-th Common Divisor"""
A,B,K=(int(i) for i in input().split())
result=[]
for i in range(1,101):
    if A%i==0 and B%i==0:
        result.append(i)
result.reverse()
print(result[K-1])

Buggy python submission (verdict: Runtime Error):
"""B - K-th Common Divisor"""
A,B,K=(int(i) for i in input().split())
result=[]
for i in range(1,max(A,B)):
    if A%i==0 and B%i==0:
        result.append(i)
print(result[K-1])

Fixed submission:
"""B - K-th Common Divisor"""
A,B,K=(int(i) for i in input().split())
result=[]
for i in range(1,101):
    if A%i==0 and B%i==0:
        result.append(i)
result.reverse()
print(result[K-1])
Buggy python submission (verdict: Runtime Error):
A,B=(int(i) for i in input().split())
2.if B%A==0:
3.  print(A+B)
4.else:
5.  print(B-A)


Fixed submission:
A,B=(int(i) for i in input().split())
if B%A==0:
  print(A+B)
else:
  print(B-A)

Buggy python submission (verdict: Runtime Error):
A,B=(int(i) for i in input().split(""))
if B%A==0:
  print(A+B)
else:
  print(B-A)

Fixed submission:
A,B=(int(i) for i in input().split())
if B%A==0:
  print(A+B)
else:
  print(B-A)

Buggy python submission (verdict: Runtime Error):
A,B=int(i) for i in input().split()
if B%A==0:
  print(A+B)
else:
  print(B-A)

Fixed submission:
A,B=(int(i) for i in input().split())
if B%A==0:
  print(A+B)
else:
  print(B-A)
Buggy python submission (verdict: Runtime Error):
N = int(input())
h = [0] + [int(i) for i in input().split()]
result = 0
for i in range(1, len(h)):
  if h[i] > h[i-1]:
    result += h[i] - h[i-1]
print(result)

Fixed submission:
A,B,C=(int(i) for i in input().split())
print(int(A*B/2))
Buggy python submission (verdict: Runtime Error):
A=input()
B=input()
C=input()
if A+B>C or B>C:
  print(B+C)
else:
  print(2*B+C-A-B)


Fixed submission:
A,B,C=map(int,input().split())
if A+B>=C:
  print(B+C)
else:
  print(2*B+A+1)
Buggy python submission (verdict: Runtime Error):
import numpy as np
N=int(input())
T,A=(int(i) for i in input().split())
H=[int(i) for i in input().split()]
T=np.array([T for i in range(N)])
print(abs(A-(T-H*0.006)).argmin())

Fixed submission:
X,Y=(int(i) for i in input().split())
print(int(X+Y/2))
Buggy python submission (verdict: Runtime Error):
import numpy as np
N=int(input())
T,A=(int(i) for i in input().split())
H=[int(i) for i in input().split()]
H=np.array([1000,2000])
T=np.array([T for i in range(N)])
print(abs(A-(T-H*0.006)).argmin())

Fixed submission:
import numpy as np
N=int(input())
T,A=(int(i) for i in input().split())
H=np.array([int(i) for i in input().split()])
T=np.array([T for i in range(N)])
print(abs(A-(T-H*0.006)).argmin()+1)