Harryxun/testdata huggingface dataset:
Buggy python submission (verdict: Time Limit Exceeded):
#!/usr/bin/env python
import bisect
from collections import defaultdict
import math

def judge(start, end, S):
    for i in range(start, end):
        s = S[i:i+2]
        if tuple(s) == ("#", "#"):
            return False
    return True

def main():
    N, A, B, C, D = map(int, input().split())
    S = list(input().strip())

    is_ok = judge(A-1, C-1, S)
    if not is_ok:
        print("No")
        return
    is_ok = judge(B-1, D-1, S)
    if not is_ok:
        print("No")
        return

    if C > D:
        for i in range(B-1, D):
            if S[i] != "#":
                new_S = list(S)
                new_S[i] = "#"
                is_ok = judge(A-1, C-1, new_S)
                if is_ok:
                    print("Yes")
                    return
        print("No")
    else:
        print("Yes")

if __name__ == '__main__':
    main()


Fixed submission:
#!/usr/bin/env python
import bisect
from collections import defaultdict
import math

def judge(start, end, S):
    for i in range(start, end):
        s = S[i:i+2]
        if tuple(s) == ("#", "#"):
            return False
    return True

def main():
    N, A, B, C, D = map(int, input().split())
    S = list(input().strip())

    is_ok = judge(A-1, C-1, S)
    if not is_ok:
        print("No")
        return
    is_ok = judge(B-1, D-1, S)
    if not is_ok:
        print("No")
        return

    if C > D:
        for i in range(B-1, D):
            if S[i] != "#" and S[i-1] != "#" and S[i+1] != "#":
                print("Yes")
                return
        print("No")
    else:
        print("Yes")

if __name__ == '__main__':
    main()
Buggy python submission (verdict: Runtime Error):
n, k = map(int, input().split())
s = input()
s[k] = s[k].lower()
print(s)

Fixed submission:
n, k = map(int, input().split())
k -= 1
s = list(input())
s[k] = s[k].lower()
print("".join(s))
Buggy python submission (verdict: Time Limit Exceeded):
from collections import defaultdict

N, M = map(int, input().split())

clusters = []
nums = defaultdict(int)
for i in range(M):
  x, y, z = map(int, input().split())
  clusters.append(set([x, y]))
  nums[x] += 1
  nums[y] += 1

for i in nums:
  new_clusters = []
  if nums[i] < 2:
    continue
  merged_cluster = set()
  for cluster in clusters:
    if i in cluster:
      merged_cluster = merged_cluster | cluster
    else:
      new_clusters.append(cluster)
  new_clusters.append(merged_cluster)
  clusters = list(new_clusters)

num_not_in_clusters = N - len(nums)
print(len(clusters) + num_not_in_clusters)

Fixed submission:
#!/usr/bin/env python
import bisect
from collections import defaultdict
import math

def main():
    N, M = map(int, input().split())

    clusters = []
    index = {}
    for _ in range(M):
        x, y, z = map(int, input().split())
        if x in index and y in index:
            cx = index[x]
            cy = index[y]
            if cx != cy:
                for a in clusters[cy]:
                    index[a] = cx
                    clusters[cx].add(a)
                clusters[cy] = None
        else:
            for a, b in [(x, y), (y, x)]:
                if a in index:
                    c = index[a]
                    index[b] = c
                    clusters[c].add(b)

            if not x in index and not y in index:
                new_c = len(clusters)
                for a in [x, y]:
                    index[a] = new_c
                clusters.append(set([x, y]))

    num = N - len(index) + len([c for c in clusters if c])
    print(num)

if __name__ == '__main__':
    main()
Buggy python submission (verdict: Time Limit Exceeded):
#!/usr/bin/env python
import sys
import re
from collections import deque, defaultdict
from itertools import combinations, combinations_with_replacement
import bisect
from math import factorial, sqrt, log, ceil, floor
sys.setrecursionlimit(1000000)


def main():
    #N, M = map(int, input().split())
    #N, K = map(int, input().split())
    #ps = list(map(int, input().split()))

    N, K = map(int, input().split())
    hs = list(map(int, input().split()))

    dp = []
    for i, h in enumerate(hs):
        if i == 0:
            dp.append(0)
            continue

        max_num = min([len(dp), K])
        cost = min([dp[i-k-1] + abs(hs[i] - hs[i-k-1])
                    for k in range(max_num)])
        dp.append(cost)

    print(dp[-1])


if __name__ == '__main__':
    main()


Fixed submission:
#!/usr/bin/env python
import sys
import re
from collections import deque, defaultdict
from itertools import combinations, combinations_with_replacement
import bisect
from math import factorial, sqrt, log, ceil, floor
sys.setrecursionlimit(1000000)


def main():
    #N, M = map(int, input().split())
    #N, K = map(int, input().split())
    #ps = list(map(int, input().split()))

    N, K = map(int, input().split())
    hs = list(map(int, input().split()))

    dp = []
    for i, h in enumerate(hs):
        if i == 0:
            dp.append(0)
            continue

        max_num = min([len(dp), K])
        cost = min([dp[i-k-1] + abs(hs[i] - hs[i-k-1])
                    for k in range(max_num)])
        dp.append(cost)

    print(dp[-1])


if __name__ == '__main__':
    main()
Buggy python submission (verdict: Time Limit Exceeded):
#!/usr/bin/env python
import sys
import re
from collections import deque, defaultdict
from itertools import combinations, combinations_with_replacement
import bisect
from math import factorial, sqrt, log, ceil, floor
sys.setrecursionlimit(1000000)


def main():
    #N, M = map(int, input().split())
    #N, K = map(int, input().split())
    #ps = list(map(int, input().split()))

    N, W = map(int, input().split())

    dp = [defaultdict(int)]
    dp[0][0] = 0
    for i in range(N):
        w, v = map(int, input().split())
        keys = list(dp[i].keys())
        new_dp = defaultdict(int)
        for key in keys:
            new_dp[key] = max([new_dp[key], dp[i][key]])
            new_w = key + w
            if new_w <= W:
                new_dp[new_w] = max([new_dp[new_w], dp[i][key] + v])
        dp.append(new_dp)
    print(max(dp[N].values()))


if __name__ == '__main__':
    main()


Fixed submission:
#!/usr/bin/env python
import sys
import re
from collections import deque, defaultdict
from itertools import combinations, combinations_with_replacement
import bisect
from math import factorial, sqrt, log, ceil, floor
sys.setrecursionlimit(1000000)


def main():
    #N, M = map(int, input().split())
    #N, K = map(int, input().split())
    #ps = list(map(int, input().split()))

    N, W = map(int, input().split())

    dp = [defaultdict(int)]
    dp[0][0] = 0
    for i in range(N):
        w, v = map(int, input().split())
        keys = sorted(list(dp[i].keys()))
        new_dp = defaultdict(int)
        for key in keys:
            new_dp[key] = max([new_dp[key], dp[i][key]])
            new_w = key + w
            if new_w <= W:
                new_dp[new_w] = max([new_dp[new_w], dp[i][key] + v])

        max_value = 0
        for key in sorted(new_dp.keys()):
            if max_value > new_dp[key]:
                del new_dp[key]
            else:
                max_value = new_dp[key]

        dp.append(new_dp)
    print(max(dp[N].values()))


if __name__ == '__main__':
    main()
Buggy python submission (verdict: Time Limit Exceeded):
#!/usr/bin/env python
import sys
import re
from collections import deque, defaultdict
from itertools import combinations, combinations_with_replacement
import bisect
from math import factorial, sqrt, log, ceil, floor
sys.setrecursionlimit(1000000)


def get_longest(x, longest, edges):
    if longest[x] is not None:
        return longest[x]
    if not edges[x]:
        return 0
    result = max([get_longest(y, longest, edges)
                  for y in edges[x]])
    return result + 1


def main():
    input = sys.stdin.readline
    #N, M = map(int, input().split())
    #N, K = map(int, input().split())
    #ps = list(map(int, input().split()))

    N, M = map(int, input().split())

    edges = defaultdict(set)
    for i in range(M):
        x, y = map(int, input().split())
        edges[x].add(y)

    longest = [None] * (N + 1)
    for x in range(N):
        x += 1
        if longest[x] is None:
            longest[x] = get_longest(x, longest, edges)

    print(max(longest[1:]))


if __name__ == '__main__':
    main()


Fixed submission:
#!/usr/bin/env python
import sys
import re
from collections import deque, defaultdict
from itertools import combinations, combinations_with_replacement
import bisect
from math import factorial, sqrt, log, ceil, floor
sys.setrecursionlimit(1000000)


def get_longest(x, longest, edges):
    if longest[x] is not None:
        return longest[x]
    if not edges[x]:
        longest[x] = 0
    else:
        result = max([get_longest(y, longest, edges)
                      for y in edges[x]])
        longest[x] = result + 1
    return longest[x]


def main():
    input = sys.stdin.readline
    #N, M = map(int, input().split())
    #N, K = map(int, input().split())
    #ps = list(map(int, input().split()))

    N, M = map(int, input().split())

    edges = defaultdict(set)
    for i in range(M):
        x, y = map(int, input().split())
        edges[x].add(y)

    longest = [None] * (N + 1)
    for x in range(N):
        x += 1
        if longest[x] is None:
            get_longest(x, longest, edges)

    print(max(longest[1:]))


if __name__ == '__main__':
    main()
Buggy python submission (verdict: Runtime Error):
x, y =map(int, input().split())
a= 4*x-y
b= y-2*x
if a%2 ==0 and b%2 ==0 and a>=0 and b>=0:
  print("Yes")
else:
  print("No")
  

Fixed submission:
a = list(map(int, input().split()))
print(int(a.index(0))+1)

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

Fixed submission:
a = list(map(int, input().split()))
print(int(a.index(0))+1)
Buggy python submission (verdict: Runtime Error):
A B =int(input().split())
print(A*B)

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

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


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

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


Fixed submission:
A, B=map(int, input().split())
print(A*B)
Buggy python submission (verdict: Runtime Error):
a= ABC
S= input()

if a == S:
  print("ARC")
else:
  print("ABC")

Fixed submission:
a =['ABC']
S=input()
if S in a:
  print("ARC")
else:
    print("ABC")
Buggy python submission (verdict: Runtime Error):
N=int(input())
li=list(map(int,input().split()))
p=0
for i in range(N):
  p+=1
  print(li.count(p))
  

Fixed submission:
R = int(input())
print(R*2*3.14)
Buggy python submission (verdict: Runtime Error):
A, V = map(int, input().split())
B, W = map(int, input().split())
T = int(input())

if(V <= W):
	print("NO")
elif(abs(B - A) >= V * T):
	print("NO")
elif((B - A) % 2 == 1) and ((W - V) % 2 != 1):
	print("NO")
else:
	print("YES")

Fixed submission:
S= input()
print(S[:3])

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

if(V <= W):
	print("NO")
elif(abs(B - A) >= V * T):
	print("NO")
elif((B - A) % 2 == 1) and ((W - V) % 2 =! 1):
	print("NO")
else:
	print("YES")

Fixed submission:
S= input()
print(S[:3])

Buggy python submission (verdict: Runtime Error):
S= input()
print(S[;2])

Fixed submission:
S= input()
print(S[:3])
Buggy python submission (verdict: Runtime Error):
n, k =map(int,input().split())
# x1、x2と複数入力
x = list(input().split()) for i in range(n)
x.sort()
print(sum(list[0:k]))

Fixed submission:
n, k =map(int,input().split())
# x1、x2と複数入力
x = list(map(int,input().split()))
x.sort()
print(sum(x[0:k]))
Buggy python submission (verdict: Runtime Error):
a,b,c,d=map(int,input().split())
ターン制だから
while True:
    # 自分の体力を相手の攻撃力で引かれる
    c-=b
    if c<=0:
        print("Yes")
        exit()
    # 生きてた場合相手のターンへ
    a-=d
    if a<=0:
        print("No")
        exit()

Fixed submission:
a,b,c,d=map(int,input().split())
# ターン制だから
while True:
    # 自分の体力を相手の攻撃力で引かれる
    c-=b
    if c<=0:
        print("Yes")
        exit()
    # 生きてた場合相手のターンへ
    a-=d
    if a<=0:
        print("No")
        exit()
Buggy python submission (verdict: Runtime Error):
n,m=map(int,input().split())
# 商品iをそれぞれN個入力
num=[int(i) for i in input().split()]
# 降順で並び替え
num=sorted(num,reverse=True)
# 総得票数
sum_num=sum(num)
# m-1番目つまり人気商品の中の一番人気がない商品が
# 総得票数の1/4Mは未満は人気商品と言えないNo
if num[m-1]<sum_num/(4*m):
    print("No")
else:
    print("Yes")


Fixed submission:
n,k=map(int,input().split())
# 引き算だとタイムアウトになる。最小イコール余りになる。
# 絶対値だからプラマイ
print(min(n%k,-n%k))
Buggy python submission (verdict: Runtime Error):
N = int(input())
# n文字ぶんのsを書く
S = input()

result = 0
for i in range(N):
    1文字目から
    if S[i:i+2] == 'ABC':
        result += 1
print(result)

Fixed submission:
N = int(input())
# n文字ぶんのsを書く
S = input()

result = 0
for i in range(N):
    # 1文字目から3文字なのでプラス3
    if S[i:i+3] == 'ABC':
        result += 1
print(result)
Buggy python submission (verdict: Runtime Error):
import itertools

n = int(input())
p = tuple(map(int,input().split()))
q = tuple(map(int,input().split()))
# 多分1~4で3!の順列になる
ls = list(itertools.permutations(range(1,n))) #順列生成
# 絶対値absで辞書順のpからqをひく
print(abs(ls.index(p)-ls.index(q)))

Fixed submission:
import itertools

n = int(input())
p = tuple(map(int,input().split()))
q = tuple(map(int,input().split()))
# 多分1~4で3!の順列になる
ls = list(itertools.permutations(range(1,n+1))) #順列生成
# 絶対値absで辞書順のpからqをひく
print(abs(ls.index(p)-ls.index(q)))

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

n = int(input())
p = tuple(map(int,input().split()))
q = tuple(map(int,input().split()))

ls = list(itertools.permutations(range(n))) #順列生成
# 絶対値absで辞書順のpからqをひく
print(abs(ls.index(p)-ls.index(q)))

Fixed submission:
import itertools

n = int(input())
p = tuple(map(int,input().split()))
q = tuple(map(int,input().split()))
# 多分1~4で3!の順列になる
ls = list(itertools.permutations(range(1,n+1))) #順列生成
# 絶対値absで辞書順のpからqをひく
print(abs(ls.index(p)-ls.index(q)))
Buggy python submission (verdict: Runtime Error):
S = input()

result = 0
入力例1なら3文字目まで
for i in range(len(S) // 2):
  # sの1(2番目)がsの最後尾と一緒ならカウント
  if S[i] != S[-(i + 1)]:
    result += 1
print(result)

Fixed submission:
S = input()

result = 0
# 入力例1なら3文字目まで
for i in range(len(S) // 2):
  # sの1(2番目)がsの最後尾と一緒ならカウント
  if S[i] != S[-(i + 1)]:
    result += 1
print(result)
Buggy python submission (verdict: Runtime Error):
N = int(input())

S = input()
# 仮にn=6の場合3より後と3までが一緒ならyes
if N % 2 == 0:
   if S[:int(N/2)] == S[int(N/2):]:
       print("Yes")
   else:
       print("No")
# 奇数ならそもそもno
else:
   print("No")N = int(input())

S = input()

if N % 2 == 0:
   if S[:int(N/2)] == S[int(N/2):]:
       print("Yes")
   else:
       print("No")
      
else:
   print("No")

Fixed submission:
N = int(input())

S = input()
# 仮にn=6の場合3より後と3までが一緒ならyes
if N % 2 == 0:
   if S[:int(N/2)] == S[int(N/2):]:
       print("Yes")
   else:
       print("No")
# 奇数ならそもそもno
else:
   print("No")
Buggy python submission (verdict: Time Limit Exceeded):
N = int(input())
ans = 0
for i in range(N):
    ans += i
print(ans)

Fixed submission:
N = int(input())
if N % 2 == 0:
    ans = int(N /2) * (N -1) 
else:
    ans = int((N - 1) / 2) * N
print(ans)
Buggy python submission (verdict: Time Limit Exceeded):
N = int(input())
A = input().split()

a=int(A[0])
for i in range(N-1):
  a=a*int(A[i+1])
  
if a>10**18:
  print(-1)
else:
  print(a)

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

if 0 in A:
  print(0)
else:
  result=1
  for i in A:
    result*=i
    if result>10**18:
      result=-1
      break
  print(result)
Buggy python submission (verdict: Runtime Error):
x=int(input())
happiness = 0
if x>=500:
    ans = divmod(x,500)
    happiness += 1000*ans[0]
    x = ans[1]

if x>=5:
    ans =divmod(x,5)
    happiness += 5*ans[0]

print(happiness)

Fixed submission:
s=input()
if s[2]==s[3] and s[4]==s[5]:
    print('Yes')
else:
    print('No')
Buggy python submission (verdict: Runtime Error):
a = list(input().split())
s = a[0]
t = a[1]

s = list(s)
t = list(t)
time = 0
for i in range(len(s)):
    if s[i] != t[i] :
        s[i] = t[i]
        time += 1

print(time)

Fixed submission:
s = list(input())
t = list(input())

time = 0
for i in range(len(s)):
    if s[i] != t[i] :
        s[i] = t[i]
        time += 1
 
print(time)
Buggy python submission (verdict: Runtime Error):
A = Input()
A = A.split()

B = []
for x in A:
    y = int(x)
    B.append(y)

c = [1, 2, 3, 4, 5]
for x in range(len(B)):
    if B[x] != c[x]:
        z = x+1
        print(z)

Fixed submission:
A = input()
A = A.split()
B = []
for x in A:
    y = int(x)
    B.append(y)

c = [1, 2, 3, 4, 5]
for x in range(len(B)):
    if B[x] != c[x]:
        z = x+1
        print(z)

Buggy python submission (verdict: Runtime Error):
A = Input()
A = A.split()

B = []
for x in A:
y = int(x)
B.append(y)

C = [1, 2, 3, 4, 5]
for x in range(len(B)):
if B[x]!=C[x]:
z = x +1
print(z)


Fixed submission:
A = input()
A = A.split()
B = []
for x in A:
    y = int(x)
    B.append(y)

c = [1, 2, 3, 4, 5]
for x in range(len(B)):
    if B[x] != c[x]:
        z = x+1
        print(z)
Buggy python submission (verdict: Runtime Error):
a,b,c,k = map(int,input().split())

s = []
s = s + [1] * a + [0] * b + [-1] * c

ans = s[:k]

print(sum(ans))

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


if k <= a:
    print(k)
elif a < k and k <= a + b:
    print(a)
elif a + b < k:
    print(a - (k - a - b))
Buggy python submission (verdict: Time Limit Exceeded):
import math

a,b,n = map(int,input().split())

l = [0]

for x in range(1,n+1):
    ans = 0
    ans = math.floor(a*x/b) - a * math.floor(x/b)
    l.append(ans)
    if l[x] > ans:
        break
#print(l)
print(max(l))

Fixed submission:
A,B,N=map(int,input().split())
def f(x):
  return int(A*x/B)-A*int(x/B)

print(f(min(N,B-1)))

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

a,b,n = map(int,input().split())

l = [0]

for x in range(1,100):
    ans = 0
    ans = math.floor(a*x/b) - a * math.floor(x/b)
    l.append(ans)
    if l[x+1] > ans:
        break

print(ans)

Fixed submission:
A,B,N=map(int,input().split())
def f(x):
  return int(A*x/B)-A*int(x/B)

print(f(min(N,B-1)))

Buggy python submission (verdict: Time Limit Exceeded):
import math

a,b,n = map(int,input().split())

l = [0]

for x in range(n+1):
    ans = 0
    ans = math.floor(a*x/b) - a * math.floor(x/b)
    l.append(ans)
    if max(l) > ans:
        break
print(max(l))

Fixed submission:
A,B,N=map(int,input().split())
def f(x):
  return int(A*x/B)-A*int(x/B)

print(f(min(N,B-1)))

Buggy python submission (verdict: Time Limit Exceeded):
import math

a,b,n = map(int,input().split())

l = []

for x in range(n+1):
    ans = 0
    ans = math.floor(a*x/b) - a * math.floor(x/b)
    l.append(ans)

print(max(l))

Fixed submission:
A,B,N=map(int,input().split())
def f(x):
  return int(A*x/B)-A*int(x/B)

print(f(min(N,B-1)))
Buggy python submission (verdict: Time Limit Exceeded):
import math
import itertools
from functools import reduce

def gcd(*numbers):
    return reduce(math.gcd, numbers)

k = int(input())

ans = 0 

for a,b,c in itertools.product(range(1,k + 1), repeat=3):
    s = gcd(a,b,c)
    ans += s
print(ans)

Fixed submission:
import math
 
k = int(input()) + 1
ans = 0
 
for a in range(1, k):
    for b in range(1, k):
        d = math.gcd(a, b)
        for c in range(1, k):
            ans += math.gcd(d, c)
 
print(ans)

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

def gcd(*numbers):
    return reduce(math.gcd, numbers)

k = int(input())

ans = 0 
comb_list  = itertools.product(range(1,k + 1), repeat=3)

for a,b,c in comb_list:
    s = gcd(a,b,c)
    ans += s
print(ans)

Fixed submission:
import math
 
k = int(input()) + 1
ans = 0
 
for a in range(1, k):
    for b in range(1, k):
        d = math.gcd(a, b)
        for c in range(1, k):
            ans += math.gcd(d, c)
 
print(ans)

Buggy python submission (verdict: Runtime Error):
k = int(input())

#acd_list = []
all_num = [i for i in range(1,k + 1)]
ans = 0 

#comb_list  = list(itertools.combinations(all_num, 3))
#print(comb_list)

def gcd(*numbers):
    return reduce(math.gcd, numbers)

def gcd_list(numbers):
    return reduce(math.gcd, numbers)

result = []
for i in all_num:
  for j in all_num:
    for k in all_num:
      result.append([i, j, k])

for a,b,c in result:
#for a,b,c in comb_list:
    s = gcd(a, b,c)
    ans += s
print(ans)

Fixed submission:
import math
 
k = int(input()) + 1
ans = 0
 
for a in range(1, k):
    for b in range(1, k):
        d = math.gcd(a, b)
        for c in range(1, k):
            ans += math.gcd(d, c)
 
print(ans)
Buggy python submission (verdict: Runtime Error):
from collections import deque

k = int(input())
q = deque(range(1, 10))
 
for i in range(k):
    x = q.popleft()
    if x % 10 != 0:
        q.append(10 * x + x % 10 - 1) #左端

    q.append(10 * x + x % 10) #真ん中

    if x % 10 != 9:
        q.append(10 * x + x % 10 + 1) #右端
 
print(x)

Fixed submission:
x,y,z = map(int,input().split())
print('{0} {1} {2}'.format(z,x,y))
Buggy python submission (verdict: Time Limit Exceeded):
n,k = map(int,input().split())

if k == 1:
    print(0)
else:
    for i in range(1000000000000000000):
        if n > abs(n-k):
            n = abs(n-k)
        elif n <= abs(n-k):
            break
    print(n)

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

# if k == 1:
#     print(0)
# else:
#     for i in range(1000000000000000000):
#         if n > abs(n-k):
#             n = abs(n-k)
#         elif n <= abs(n-k):
#             break
#     print(n)
amari = n % k
if abs(amari-k) < amari:
    print(abs(amari-k))
else:
    print(amari)
Buggy python submission (verdict: Runtime Error):
k = int(input())
s = [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]
print(s[k] + 1)

Fixed submission:
k = int(input())
s = [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]
print(s[k-1])
Buggy python submission (verdict: Runtime Error):
import math

a,b = map(int,input().split())

ans = []
for i in range(10000):
    a_shouhizei = math.floor(i * 8/100)
    b_shouhizei = math.floor(i * 10/100)
    if a_shouhizei == a and b_shouhizei == b:
        ans.append(i)
print(min(ans))

Fixed submission:
import math

a,b = map(int,input().split())

ans = []
for i in range(10000):
    a_shouhizei = math.floor(i * 8/100)
    b_shouhizei = math.floor(i * 10/100)
    if a_shouhizei == a and b_shouhizei == b:
        ans.append(i)
if ans == []:
    print('-1')
else:
    print(min(ans))
Buggy python submission (verdict: Time Limit Exceeded):
n = int(input())
p = list(input('').split())

count = 0
count2 = 0
for i in range(1,n):
    count = 0
    for j in range(i):
        if int(p[j]) >= int(p[i]):
            count += 1
    if count == i:
        count2 += 1

print(count2 + 1)

Fixed submission:
n = int(input())
p = list(input('').split())

min = 10000000000
count = 0
for i in range(n):
    if min >= int(p[i]):
        count += 1
    if min >= int(p[i]):
        min = int(p[i])

print(count)