Harryxun/testdata huggingface dataset:
Buggy python submission (verdict: Time Limit Exceeded):
from math import ceil
N, A, B = map(int, raw_input().split())
h = [0] * N
for i in range(N):
  h[i], = map(int, raw_input().split())
h.sort()

l = 0
r = int(ceil(1.0*h[-1]/B))
while True:
  m = (l+r)//2
  if m==l:
    break
  c = 0
  for i in range(N):
    ai = int(ceil(1.0*max(0,h[i]-B*m)/(A-B)))
    c += ai
  if c>m:
    l = m
  else:
    r = m
print r

Fixed submission:
from math import ceil
N, A, B = map(int, raw_input().split())
h = [0] * N
for i in range(N):
  h[i], = map(int, raw_input().split())
h.sort()

l = 0
r = int(ceil(1.0*h[-1]/B))
while True:
  m = (l+r)//2
  if m==l:
    break
  c = 0
  for i in range(N):
    ai = int(ceil(1.0*max(0,h[i]-B*m)/(A-B)))
    c += ai
  if c>m:
    l = m
  else:
    r = m
print r
Buggy python submission (verdict: Runtime Error):
A, B = map(int, raw_input().split())
print "GREATER" if A>B else ("LESS" if A<B else "EQUAL")

Fixed submission:
A = int(raw_input())
B = int(raw_input())
print "GREATER" if A>B else ("LESS" if A<B else "EQUAL")
Buggy python submission (verdict: Time Limit Exceeded):
n = int(input())
a = []
for i in range(n):
    a.append(int(input()))
if a[0] != 0:
    print("-1")
else:
    x = [0] * len(a)
    b = 9999
    c = 0
    for i in range(len(a) - 1, 0, -1):
        if a[i] == x[i]:
            continue
        if i - a[i] < 0:
            break 
        for j in range(1, a[i]+1):
            x[i - a[i] + j] = j
            c += 1
    if a == x:
        print(c)
    else:
        print("-1")

Fixed submission:
n = int(input())
a = []
for i in range(n):
    a.append(int(input()))
if a[0] != 0:
    print("-1")
else:
    x = [0] * len(a)
    d = [0] * len(a)
    dd = [0] * len(a)

    c = 0
    s = 10**6
    #0 1 1 0 1 2 2 2 3
    wala = False
    for i in range(len(a) - 1, 0, -1):
        #print("-")
        if i <= s and a[i] == 0:
            #print("X")
            continue
        if i - a[i] < 0 or i - a[i] > s:
            #print("Y")
            wala = True
            break
        if s + a[i] == i:
            continue
        s = min(s, i - a[i])
        c += a[i]
    if wala:
        print("-1")
    else:
        print(c)
Buggy python submission (verdict: Time Limit Exceeded):
n,k = map(int,input().split())
if(k==1):
  print(0)
else:
  t = n//k
  for i in range(t):
    n = abs(n-k)
  if(n < abs(k-n)):
    print(n)
  else:
    print(abs(k-n))

Fixed submission:
N, K = map(int,input().split())
t = N%K
if (K - t) >= t:
    print(t)
else:
    print(K - t)

Buggy python submission (verdict: Time Limit Exceeded):
n,k = map(int,input().split())
if(k==1):
  print(0)
else:
  while(len(str(n))>1):
    n = n/2
  t = n//k
  for i in range(t):
    n = abs(n-k)
  if(n < abs(k-n)):
    print(n)
  else:
    print(abs(k-n))

Fixed submission:
N, K = map(int,input().split())
t = N%K
if (K - t) >= t:
    print(t)
else:
    print(K - t)

Buggy python submission (verdict: Runtime Error):
n,k = map(int,input().split())
if(k==1):
  print(0)
else:
  while(len(n)>1):
    n = n//k
  t = n//k
  for i in range(t):
    n = abs(n-k)
  if(n < abs(k-n)):
    print(n)
  else:
    print(abs(k-n))

Fixed submission:
N, K = map(int,input().split())
t = N%K
if (K - t) >= t:
    print(t)
else:
    print(K - t)

Buggy python submission (verdict: Time Limit Exceeded):
n,k = map(int,input().split())
if(k==1):
  print(0)
else:
  t = n//k
  for i in range(t):
    n = abs(n-k)
  if(n < abs(k-n)):
    print(n)
  else:
    print(abs(k-n))

Fixed submission:
N, K = map(int,input().split())
t = N%K
if (K - t) >= t:
    print(t)
else:
    print(K - t)
Buggy python submission (verdict: Runtime Error):
k = int(input())
que = []
for i in range(1,10):
  que.append(i)
ct = 0
while(len(que) < k):
  ct += 1
  value = que[0]
  que.remove(value)
  for i in [-1,0,1]:
    if 0 <= (value%10) + i and (value%10) + i <= 9:
      tmp = 10*value + (value%10) + i
      q.append(tmp)  
print(que[k-1-ct])

Fixed submission:
k = int(input())
que = []
for i in range(1,10):
  que.append(i)
ct = 0
while(len(que) < k):
  ct += 1
  value = que[0]
  que.remove(value)
  for i in [-1,0,1]:
    if 0 <= (value%10) + i and (value%10) + i <= 9:
      tmp = 10*value + (value%10) + i
      que.append(tmp)  
print(que[k-1-ct])

Buggy python submission (verdict: Runtime Error):
k = int(input())
que = []
for i in range(10):
  que.append(i)
while(len(que) < k-1):
  x = que[0]
  que.remove(x)
  if (x%10 != 0):
    que.append((10*x) + (x%10) - 1)
    que.append((10*x) + (x%10))
  if (x%10 != 9):
    que.append((10*x) + (x%10) + 1)
print(que[k-1])

Fixed submission:
k = int(input())
que = []
for i in range(1,10):
  que.append(i)
ct = 0
while(len(que) < k):
  ct += 1
  value = que[0]
  que.remove(value)
  for i in [-1,0,1]:
    if 0 <= (value%10) + i and (value%10) + i <= 9:
      tmp = 10*value + (value%10) + i
      que.append(tmp)  
print(que[k-1-ct])
Buggy python submission (verdict: Time Limit Exceeded):
def gcd(a,b):
  while b!=0:
    a,b=b,a%b
  return a
  
def gcd3(a,b,c):
    return gcd(gcd(a,b),c)
    
k= int(input())    
total = 0
for i in range(1,k+1):
    for ii in range(1,k+1):
        for iii in range(1,k+1):
            total += gcd3(i,ii,iii)

print(total)   

Fixed submission:
def gcd(a,b):
  while b!=0:
    a,b=b,a%b
  return a
  
def gcd3(a,b,c):
    return gcd(gcd(a,b),c)
    
k= int(input())    
total = 0
for i in range(1,k+1):
    for ii in range(1,k+1):
        for iii in range(1,k+1):
            total += gcd3(i,ii,iii)
 
print(total)
Buggy python submission (verdict: Runtime Error):
def Fib(n):
    s, t = 0, 1
    if n == 1:
        return s
    elif n == 2:
        return t
    else:
        for i in range(n-2):
            s, t = t, s + t
        return t
def FIB(q):
    return Fib(q+1)

n,m = map(int,input().split())
A =[]
add = 1
ex = 0
y = 0
for _ in range(m):
    a = int(input())
    A.append(a)
for i in range(1,n+1):
    if A.count(i) == 1 and A.count(i+1) == 1 :
        ex += 1
    else:
        ex += 0
if ex >= 1:
    print(0)
else:
    if A[0] == 1:
        if m ==1:
            add *= FIB(n - 1)
        else:
            for j in range(0,m-1):
                y = A[j+1]-A[j] -1
                add *= FIB(y)
            add *= FIB(n-A[m-1])
    else:
        if m == 1:
            z =0
            for l in range(1,A[0]):
                z += FIB(l)
            add *= z*(FIB(n - A[0]))
        else:
            c = 0
            for u in range(1,A[0]):
                c += FIB(u)
                add *=c
            for k in range(0,m-1):
                y = A[k+1]-A[k] -1
                add *= FIB(y)
            add *= FIB(n - A[m-1])

    print(add % 1000000007)


Fixed submission:
x,y,z = (int(x) for x in input().split())

a = x + y
b = y + z
c = z + x

print(min([a, b, c]))

Buggy python submission (verdict: Runtime Error):
xyz = input().split()
x,y,z = int(xyz=[0]), int(xyz[1]),int(xyz[2])

a = x + y
b = y + z
c = z + x
print(min([a, b, c]))

Fixed submission:
x,y,z = (int(x) for x in input().split())

a = x + y
b = y + z
c = z + x

print(min([a, b, c]))

Buggy python submission (verdict: Runtime Error):
xyz = input().split()
x,y,z = int(xyz=[0]), int(xyz[1]),int(xyz[2])
print(x)

a = x + y
b = y + z
c = z + x
ptint(min([x,y,z])

Fixed submission:
x,y,z = (int(x) for x in input().split())

a = x + y
b = y + z
c = z + x

print(min([a, b, c]))

Buggy python submission (verdict: Runtime Error):
xyz = input().split()
x,y,z = int(xyz=[0]), int(xyz[1]),int(xyz[2])

a = x + y
b = y + z
c = z + x
ptint(min([a,b,c])

Fixed submission:
x,y,z = (int(x) for x in input().split())

a = x + y
b = y + z
c = z + x

print(min([a, b, c]))

Buggy python submission (verdict: Runtime Error):
P,Q,R = map(int,input().split())
a= P+Q
b = Q+R
c = R+P
ptint(min([a,b,c])

Fixed submission:
x,y,z = (int(x) for x in input().split())

a = x + y
b = y + z
c = z + x

print(min([a, b, c]))
Buggy python submission (verdict: Runtime Error):
n, m = map(int, input().split())
a = list(map(float, input().split()))
A = sum(a) / (4 * M)
N = sum(x >= A for x in a)
print('Yes' if N >= m else 'No')

Fixed submission:
n, m = map(int, input().split())
a = list(map(float, input().split()))
A = sum(a) / (4 * m)
N = sum(x >= A for x in a)
print('Yes' if N >= m else 'No')

Buggy python submission (verdict: Runtime Error):
n, M = map(int, input().split())
a = list(map(float, input().split()))
A = sum(a) / (4 * M)
N = sum(x >= A for x in a)
print('Yes' if N >= m else 'No')

Fixed submission:
n, m = map(int, input().split())
a = list(map(float, input().split()))
A = sum(a) / (4 * m)
N = sum(x >= A for x in a)
print('Yes' if N >= m else 'No')

Buggy python submission (verdict: Runtime Error):
n, M = map(int, input().split())
a = list(map(int, input().split()))
A = sum(A) / (4 * M)
N = sum(x >= A for x in A)
print('Yes' if n >= M else 'No')

Fixed submission:
n, m = map(int, input().split())
a = list(map(float, input().split()))
A = sum(a) / (4 * m)
N = sum(x >= A for x in a)
print('Yes' if N >= m else 'No')
Buggy python submission (verdict: Runtime Error):
N, K = map(int, input().split())

def calc(x, y):
  if y == 1:
    print(0)
    return
  z = abs(x-y)
  if z > abs(z-y):
    calc(z, y)
  else:
    print(z)
  
calc(N, K)

Fixed submission:
N, K = map(int, input().split())

if N > K:
  N = N % K

ans = min(N, abs(N-K))
print(ans)
Buggy python submission (verdict: Time Limit Exceeded):
from collections import Counter

N = int(input())

S = [input() for i in range(N)]
X = Counter(S).most_common()

lst = [k for k, v in X if v == Counter(S).most_common()[0][1]]
print('\n'.join(sorted(lst)))

Fixed submission:
from collections import Counter

N = int(input())

S = [input() for i in range(N)]
C = Counter(S)
max_vote = max(C.values())
ans = []

for k, v in C.items():
    if v == max_vote:
        ans.append(k)
ans = sorted(ans)
print('\n'.join(ans))
Buggy python submission (verdict: Runtime Error):
if 7 in N:
  print("Yes")
else:
  print("No")

Fixed submission:
x = input()
if "7" in x:
  print('Yes')
else:
  print('No')
Buggy python submission (verdict: Time Limit Exceeded):
from functools import reduce
from math import gcd

log = {}
K = int(input())
sum_gcd = 0
for a in range(1, K+1):
    for b in range(1, K+1):
        for c in range(1, K+1):
            key = str(sorted([a, b, c]))
            if key in log:
                sum_gcd += log[key]
            else:
                result = gcd(gcd(a, b), c)
                sum_gcd += result
                log[key] = result
print(sum_gcd)


Fixed submission:
from math import gcd

log = {}
K = int(input())
sum_gcd = 0
for a in range(1, K+1):
    for b in range(1, K+1):
        for c in range(1, K+1):
            sum_gcd += gcd(gcd(a, b), c)
print(sum_gcd)

Buggy python submission (verdict: Time Limit Exceeded):
from functools import reduce
from math import gcd

def gcd_m(*args):
    return reduce(gcd, args)

log = {}
K = int(input())
sum_gcd = 0
for a in range(1, K+1):
    for b in range(1, K+1):
        for c in range(1, K+1):
            key = str(sorted([a, b, c]))
            if key in log:
                sum_gcd += log[key]
            else:
                result = gcd_m(a, b, c)
                sum_gcd += result
                log[key] = result
print(sum_gcd)


Fixed submission:
from math import gcd

log = {}
K = int(input())
sum_gcd = 0
for a in range(1, K+1):
    for b in range(1, K+1):
        for c in range(1, K+1):
            sum_gcd += gcd(gcd(a, b), c)
print(sum_gcd)

Buggy python submission (verdict: Time Limit Exceeded):
def gcd(a, b):
    if a < b:
        a, b = b, a
    while a%b != 0:
        a, b = b, a%b
    return b

def gcd_m(*args):
    a, b = args[0], args[1]
    for i in range(2, len(args)):
        a, b = gcd(a, b), args[i]

    return gcd(a, b)

log = {}
K = int(input())
sum_gcd = 0
for a in range(1, K+1):
    for b in range(1, K+1):
        for c in range(1, K+1):
            key = str(sorted([a, b, c]))
            if key in log:
                sum_gcd += log[key]
            else:
                result = gcd_m(a, b, c)
                sum_gcd += result
                log[key] = result
print(sum_gcd)


Fixed submission:
from math import gcd

log = {}
K = int(input())
sum_gcd = 0
for a in range(1, K+1):
    for b in range(1, K+1):
        for c in range(1, K+1):
            sum_gcd += gcd(gcd(a, b), c)
print(sum_gcd)

Buggy python submission (verdict: Time Limit Exceeded):
def gcd(a, b):
    if a < b:
        a, b = b, a
    while a%b != 0:
        a, b = b, a%b
    return b

def gcd_m(*args):
    a, b = args[0], args[1]
    for i in range(2, len(args)):
        a, b = gcd(a, b), args[i]

    return gcd(a, b)

K = int(input())
sum_gcd = 0
for a in range(1, K+1):
    for b in range(1, K+1):
        for c in range(1, K+1):
            sum_gcd += gcd_m(a, b, c)
print(sum_gcd)


Fixed submission:
from math import gcd

log = {}
K = int(input())
sum_gcd = 0
for a in range(1, K+1):
    for b in range(1, K+1):
        for c in range(1, K+1):
            sum_gcd += gcd(gcd(a, b), c)
print(sum_gcd)
Buggy python submission (verdict: Time Limit Exceeded):
n = int(input())
s = input()
ans = 0
for i in range(n):
    for j in range(i+1, n):
        if s[i] == s[j]:
            continue
        for k in range(j+1, n):
            if j-i != k-j and s[i] != s[k] and s[j] != s[k]:
                ans += 1

print(ans)

Fixed submission:
n = int(input())
s = input()
ans = s.count("R")*s.count("G")*s.count("B")
for i in range(n):
    for d in range(n):
        j = i + d
        k = j + d
        if k >= n:
            break
        if s[i] != s[j] and s[i] != s[k] and s[j] != s[k]:
            ans -= 1

print(ans)

Buggy python submission (verdict: Time Limit Exceeded):
n = int(input())
s = input()
ans = 0
for i in range(n):
    for j in range(i+1, n):
        for k in range(j+1, n):
            
            if j-i != k-j and s[i] != s[j] and s[i] != s[k] and s[j] != s[k]:
                ans += 1

print(ans)


Fixed submission:
n = int(input())
s = input()
ans = s.count("R")*s.count("G")*s.count("B")
for i in range(n):
    for d in range(n):
        j = i + d
        k = j + d
        if k >= n:
            break
        if s[i] != s[j] and s[i] != s[k] and s[j] != s[k]:
            ans -= 1

print(ans)

Buggy python submission (verdict: Time Limit Exceeded):
n = int(input())
s = input()
ans = 0
for i in range(n):
    for j in range(i+1, n):
        for k in range(j+1, n):
            
            if j-i != k-j and s[i] != s[j] and s[i] != s[k] and s[j] != s[k]:
                ans += 1

print(ans)


Fixed submission:
n = int(input())
s = input()
ans = s.count("R")*s.count("G")*s.count("B")
for i in range(n):
    for d in range(n):
        j = i + d
        k = j + d
        if k >= n:
            break
        if s[i] != s[j] and s[i] != s[k] and s[j] != s[k]:
            ans -= 1

print(ans)
Buggy python submission (verdict: Time Limit Exceeded):
import math
gcd = 0
N = int(input())
for a in range(1, N + 1):
  for b in range(1, N + 1):
    for c in range(1, N + 1):
      arr1 = math.gcd(a, b) 
      arr2 = math.gcd(c, b)
      gcd += math.gcd(arr1, arr2)
print(gcd)



Fixed submission:
import math
gcd1 = 0
gcd3 = 0
gcd6 = 0
N = int(input())
for a in range(1, N + 1):
  for b in range(1, N + 1):
    for c in range(1, N + 1):
      if a < b < c:
        gcd6 += math.gcd(a,math.gcd(b, c))
      elif a == b < c or a < b == c:
        gcd3 += math.gcd(a,math.gcd(b, c))
      elif a == b == c:
        gcd1 += math.gcd(a,math.gcd(b, c))
print(6 * gcd6 + 3 * gcd3 + gcd1)
Buggy python submission (verdict: Runtime Error):
K = int(input())
num = list(range(1, 10))
for i in range(K):
  a = num[i]
  b = 10 * a + a % 10
  if a % 10 != 0:
    num.append(b - 1)
  num.append(b)
  if a % 10 != 9:
    num.append(b + 1)
print(num[K - 1])

Fixed submission:
A, B, C = map(int, input().split()) 
print(C, A, B)
Buggy python submission (verdict: Time Limit Exceeded):
N, K = map(int, input().split())
while N > abs(N - K):
  N = abs(N - K)
print(N)

Fixed submission:
N, K = map(int, input().split())
if abs(N - N // K * K) > abs(N - (N // K + 1) * K):
  print(abs(N - (N // K + 1) * K))
else:
  print(abs(N - N // K * K))
Buggy python submission (verdict: Runtime Error):
N, K, C = map(int, input().split())
S = list(input())
S_work = []
for i in range(N):
  if S[i] == "o":
    S_work.append(i)
start_worklist = []
final_worklist = []
bef = [-2 * 10 ** 5, 2 * 10 ** 5]

for num1 in S_work:
  if num1 - bef[0] > C:
    start_worklist.append(num1)
    bef[0] = num1
  elif len(start_worklist) == K:
    break  

S_work.sort(reverse=True)
for num2 in S_work:
  if bef[1] - num2 > C:
    final_worklist.insert(0, num2)
    bef[1] = num2
  elif len(final_worklist) == K:
    break
for i in range(K):
  if start_worklist[i] == final_worklist[i]:
    print(start_worklist[i] + 1)



Fixed submission:
N, K, C = map(int, input().split())
S = list(input())
S_work = []
s = []
f = []
i = 0
while len(s) < K:
  if S[i] == "o":
    s.append(i)
    i += C + 1
  elif S[i] == "x":
    i += 1
  elif i == len(S):
    break
i = 1
while len(f) < K:
  if S[N - i] == "o":
    f.append(N - i)
    i += C + 1
  elif S[N - i] == "x":
    i += 1
  elif i == len(S):
    break
f.sort()
for i in range(K):
  if s[i] == f[i]:
    print(s[i] + 1)

Buggy python submission (verdict: Time Limit Exceeded):
N, K, C = map(int, input().split())
S = list(input())
list_o = []
for i in range(N):
  if S[i] == "o":
    list_o.append(i)
#oの日だけをピックアップ

bef1 = -2 * 10 ** 5
worklist1 = []
for num1 in list_o:
  if num1 - bef1 > C:
    worklist1.append(num1)
    bef1 = num1
#worklist1の中に、一番単純に思いつく組み合わせを入れる

if len(worklist1) < K:
  exit()
#一個も組み合わせなかったら

else:
  for num2 in worklist1:
    bef2 = -2 * 10 ** 5
    list_o.remove(num2)
    worklist2 = []
    for num3 in list_o:
      if num3 - bef2 > C:
        worklist2.append(num3)
        bef2 = num3
    #ひとつ抜いた状態でworklist2を作ってみる
    list_o.append(num2)
    list_o.sort()
    #list_oを元どおりに
    if len(worklist2) < K:
      print(num2 + 1)
#worklist1の中身をひとつずつ抜いてみて、他に組み合わせが作れないならその項は不可欠だから出力

Fixed submission:
N, K, C = map(int, input().split())
S = list(input())
S_work = []
s = []
f = []
i = 0
while len(s) < K:
  if S[i] == "o":
    s.append(i)
    i += C + 1
  elif S[i] == "x":
    i += 1
  elif i == len(S):
    break
i = 1
while len(f) < K:
  if S[N - i] == "o":
    f.append(N - i)
    i += C + 1
  elif S[N - i] == "x":
    i += 1
  elif i == len(S):
    break
f.sort()
for i in range(K):
  if s[i] == f[i]:
    print(s[i] + 1)
Buggy python submission (verdict: Time Limit Exceeded):
N = int(input())
cnt = 0
for k in range(2, N + 1):
  n = N
  while n >= 1:
    if n % k == 0:
      n /= k
    else:
      n -= k
    if n == 1:
      cnt += 1
print(cnt)

Fixed submission:
N = int(input())

def divider(n):
  dividers = []
  for i in range(1, int(n**0.5) + 1):
    if n % i == 0:
      dividers.append(i)
      if i != n // i:
        dividers.append(n // i)
  dividers.sort()
  dividers.remove(1)
  return dividers
#nの約数を抽出する関数を定義(1以外)

cnt = len(divider(N - 1))
for k in divider(N):
  n = N
  while n % k == 0:
    n /= k
  if n % k == 1:
    cnt += 1
print(cnt)
Buggy python submission (verdict: Time Limit Exceeded):
K, S = map(int, input().split())
cnt = 0
for i in range(K + 1):
  for j in range(i, K + 1):
    for k in  range(j, K + 1):
      if i + j + k == S:
        if i == j == k:
          cnt += 1
        elif i == j or j == k or i == k:
          cnt += 3
        else:
          cnt += 6
print(cnt)

Fixed submission:
K, S = map(int, input().split())
cnt = 0
for i in range(K + 1):
  for j in range(K + 1):
    if S >= i + j >= S - K:
      cnt += 1
print(cnt)

Buggy python submission (verdict: Time Limit Exceeded):
K, S = map(int, input().split())
cnt = 0
for i in range(K + 1):
  for j in range(K + 1):
    for k in  range(K + 1):
      if i + j + k == S:
        cnt += 1
print(cnt)

Fixed submission:
K, S = map(int, input().split())
cnt = 0
for i in range(K + 1):
  for j in range(K + 1):
    if S >= i + j >= S - K:
      cnt += 1
print(cnt)
Buggy python submission (verdict: Runtime Error):
N = int(input())
if N.count(7) >0:
  print(Yes)
else:
  print(No)

Fixed submission:
N = input()
if N.count("7") >0:
  print("Yes")
else:
  print("No")
Buggy python submission (verdict: Runtime Error):
N = int(input())
i = 1
for i in N+1:
  if not i % 3 == 0 or i % 5 == 0:
    m += i

print (m)

Fixed submission:
N = int(input())
m = 0
for i in range(N+1):
  if not (i % 3 == 0 or i % 5 == 0):
    m += i
 
print (m)

Buggy python submission (verdict: Runtime Error):
N = int(input())
for i in N:
  if (i+1) % 3 == 0 or (i+1) % 5 == 0:
    pass
  else:
    m = i + 2

print(int(m))

Fixed submission:
N = int(input())
m = 0
for i in range(N+1):
  if not (i % 3 == 0 or i % 5 == 0):
    m += i
 
print (m)
Buggy python submission (verdict: Runtime Error):
abcdef=input()
if c==d and e==f:
  print(yes)
  else:
    print(no)

Fixed submission:
S=input()
Sbara=list(S)
if Sbara[2]==Sbara[3] and Sbara[4]==Sbara[5]:
  print("Yes")
else:
  print("No")
Buggy python submission (verdict: Runtime Error):
K=[1, 1, 1, 2, 1, 2, 1, 5, 2, 2, 1, 5, 1, 2, 1, 14, 1, 5, 1, 5, 2, 2, 1, 15, 2, 2, 5, 4, 1, 4, 1, 51]
a=int(input())
print K[a-1]

Fixed submission:
K=[1, 1, 1, 2, 1, 2, 1, 5, 2, 2, 1, 5, 1, 2, 1, 14, 1, 5, 1, 5, 2, 2, 1, 15, 2, 2, 5, 4, 1, 4, 1, 51]
a=int(input())
print(K[a-1])

Buggy python submission (verdict: Runtime Error):
K=[1, 1, 1, 2, 1, 2, 1, 5, 2, 2, 1, 5, 1, 2, 1, 14, 1, 5, 1, 5, 2, 2, 1, 15, 2, 2, 5, 4, 1, 4, 1, 51]
a=int(input())
print(K.index(a))

Fixed submission:
K=[1, 1, 1, 2, 1, 2, 1, 5, 2, 2, 1, 5, 1, 2, 1, 14, 1, 5, 1, 5, 2, 2, 1, 15, 2, 2, 5, 4, 1, 4, 1, 51]
a=int(input())
print(K[a-1])

Buggy python submission (verdict: Runtime Error):
K=list(map, int(input()))
a=int(input())
print(K.index(a))


Fixed submission:
K=[1, 1, 1, 2, 1, 2, 1, 5, 2, 2, 1, 5, 1, 2, 1, 14, 1, 5, 1, 5, 2, 2, 1, 15, 2, 2, 5, 4, 1, 4, 1, 51]
a=int(input())
print(K[a-1])
Buggy python submission (verdict: Runtime Error):
A=input()
if A == AAA or A == BBB:
  print(No)
else:
  print(Yes)

Fixed submission:
A=input()
if A == "AAA" or A == "BBB":
  print("No")
else:
  print("Yes")
Buggy python submission (verdict: Runtime Error):
N, R = map(int, input().split())
if N >= 10:
  print(R)
else:
  print(R+100(10-N))

Fixed submission:
N, R = map(int, input().split())
if N >= 10:
  print(R)
else:
  print(R+100*(10-N))
Buggy python submission (verdict: Runtime Error):
S, T = input().split()
A, B = map(int, input().split())
U = int(input())

if S == U:
  print (str(A-1)+" "+str(B))
else:
  print (str(A)+" "+str(B-1))

Fixed submission:
S, T = input().split()
A, B = map(int, input().split())
U = input()
 
if S == U:
  print (str(A-1)+" "+str(B))
else:
  print (str(A)+" "+str(B-1))