Harryxun/GPT-100-sft-dataset huggingface dataset:
Problem p02861 (python)

Fixed submission:
import numpy as np
N = int(input())
X = [list(map(int, input().split())) for i in range(N)]

ans = []
for i in range(N):
    for j in range(N):
        ans.append(np.sqrt((X[i][0]-X[j][0])**2 + (X[i][1]-X[j][1])**2))

print(sum(ans) / N)

Buggy submission (verdict: Runtime Error):
N=int(input())
X=[]
for _ in range(n):
	x,y=map(int,input().split())
	X.append([x,y])
    
ans = []
for i in range(N):
    for j in range(N):
        ans.append(np.sqrt((X[i][0]-X[j][0])**2 + (X[i][1]-X[j][1])**2))

print(sum(ans) / N)

Buggy submission (verdict: Runtime Error):
N = int(input())
X = [list(map(int, input().split())) for i in range(N)]

ans = []
for i in range(N):
    for j in range(N):
        ans.append(np.sqrt((X[i][0]-X[j][0])**2 + (X[i][1]-X[j][1])**2))

print(sum(ans) / N)

Buggy submission (verdict: Runtime Error):
N = int(input())
X = [list(map(int, input().split())) for i in range(N)]

ans = []
for i in range(N):
    for j in range(N):
        ans.append(np.sqrt((X[i][0]-X[j][0])**2 + (X[i][1]-X[j][1])**2))

print(sum(ans) / N)
Problem p03161 (python)

Fixed submission:
def func():
    N, K = [int(i) for i in input().split()]
    H = [int(i) for i in input().split()]
    
    dp = [0]*N
    for i in range(1, N):
        L = []
        for j in range(max(0, i-K), i):
            L.append(dp[j] + abs(H[i] - H[j]))
        dp[i] = min(L)

    print(dp[-1])
    
if __name__=="__main__":
    func()

Buggy submission (verdict: Runtime Error):
import numpy as np
N, K = [int(i) for i in input().split()]
H = np.array([int(i) for i in input().split()])

dp = np.zeros(N)
for i in range(1, N):
    L = []
    for j in range(max(0, i-K), i):
        L.append(dp[j] + abs(H[i] - H[j]))
    dp[i] = min(L)

print(int(dp[-1]))

Buggy submission (verdict: Runtime Error):
import numpy as np
N, K = [int(i) for i in input().split()]
H = np.array([int(i) for i in input().split()])

dp = np.zeros(N)
for i in range(1, N):
    L = []
    for j in range(max(0, i-K), i):
        L.append(dp[j] + abs(H[i] - H[j]))
    dp[i] = min(L)

print(int(dp[-1])

Buggy submission (verdict: Runtime Error):
N, K = [int(i) for i in input().split()]
H = np.array([int(i) for i in input().split()])

dp = np.zeros(N)
for i in range(1, N):
    L = []
    for j in range(max(0, i-K), i):
        L.append(dp[j] + abs(H[i] - H[j]))
    dp[i] = min(L)

print(int(dp[-1])

Buggy submission (verdict: Runtime Error):
N, K = [int(i) for i in input().split()]
H = [int(i) for i in input().split()]

dp = [0] * N
for i in range(1, N):
    L = []
    for j in range(max(0, i-K), i):　
        L.append(dp[j] + abs(H[i] - H[j]))
    dp[i] = min(L)

print(dp[-1])

Buggy submission (verdict: Runtime Error):
N, K = [int(i) for i in input().split()]
H = [int(i) for i in input().split()]

for j in range(1,N):
    for i in range(max(0,j-K),j):
        dp[j] = min(dp[j],dp[i] + abs(H[j]-H[i]))
print(dp[-1])
Problem p03162 (python)

Fixed submission:
N = int(input())
A, B, C = [0]*N, [0]*N, [0]*N 
for i in range(N):
    A[i], B[i], C[i] = [int(j) for j in input().split()]
    
dp = [[0]*3 for _ in range(N+1)]

for i in range(N):
    dp[i+1][0] = max(dp[i][1], dp[i][2]) + A[i]
    dp[i+1][1] = max(dp[i][0], dp[i][2]) + B[i]
    dp[i+1][2] = max(dp[i][0], dp[i][1]) + C[i]
    
print(max(dp[-1]))

Buggy submission (verdict: Runtime Error):
N = int(input())
A, B, C = [0]*N, [0]*N, [0]*N 
for i in range(N):
    A[i], B[i], C[i] = [int(j) for j in input().split()]

ABC = [A, B, C]
dp = [[0]*3 for _ in range(N+1)]

for i in range(N):
    for j in range(3):
        dp[i+1][j] = max(dp[i][j-1] + ABC[i][j], dp[i][j-2] + ABC[i][j])

print(max(dp[-1]))

Buggy submission (verdict: Runtime Error):
N = int(input())
A, B, C = [0]*N, [0]*N, [0]*N 
for i in range(N):
    A[i], B[i], C[i] = [int(j) for j in input().split()]

dp = [[0]*3 for _ in range(N+1)]
for i in range(N):
    for j in range(3):
        dp[i+1][j] = max(dp[i][j-1], dp[i][j-2]) + ABC[i][j]

print(max(dp[-1]))
Problem p03163 (python)

Fixed submission:
N, W = [int(i) for i in input().split()]
weight, value = [0] * (N + 1), [0] * (N + 1)
for i in range(1, N + 1):
    weight[i], value[i] = [int(i) for i in input().split()]
#%%
dp = [[0] * (W + 1) for _ in range(N + 1)]

#%%
for i in range(1, N + 1):
    for j in range(1, W + 1):
        if weight[i] <= j:
            dp[i][j] = max(value[i] + dp[i - 1][j - weight[i]], dp[i - 1][j])
        else:
            dp[i][j] = dp[i - 1][j]
print(int(dp[-1][-1]))

Buggy submission (verdict: Runtime Error):
N, W = [int(i) for i in input().split()]
weight, value = [0] * (N + 1), [0] * (N + 1)
for i in range(1, N + 1):
    weight[i], value[i] = [int(i) for i in input().split()]
#%%
import  numpy as np
dp = np.zeros((N + 1, W + 1))

#%%
for i in range(1, N + 1):
    for j in range(1, W + 1):
        if weight[i] <= j:
            dp[i][j] = max(value[i] + dp[i - 1][j - weight[i]], dp[i - 1][j])
        else:
            dp[i][j] = dp[i - 1][j]
print(int(dp[-1][-1]))
Problem p03164 (python)

Fixed submission:
N, W = [int(i) for i in input().split()]
weight, value = [0] * (N), [0] * (N)
for i in range(N):
    weight[i], value[i] = [int(i) for i in input().split()]

#%%

sum_value = sum(value)
dp = [[float("inf")] * (sum_value + 1) for _ in range(N + 1)]
dp[0][0] = 0

#%%

for i in range(N):
    for j in range(sum_value + 1):
        if j >= value[i]:
            dp[i + 1][j] = min(weight[i] + dp[i][j - value[i]], dp[i + 1][j])
        dp[i + 1][j] = min(dp[i + 1][j], dp[i][j])

#%%

ans = 0
for i in range(sum_value + 1):
    if dp[N][i] <= W:
        ans = i
        
print(ans)

Buggy submission (verdict: Runtime Error):
N, W = [int(i) for i in input().split()]
value, weight = [0] * (N + 1), [0] * (N + 1)
for i in range(1, N + 1):
    value[i], weight[i] = [int(i) for i in input().split()]
sum_value = sum(value)
dp = [[float("inf")] * (sum_value + 1) for _ in range(N + 1)]
dp[0][0] = 0

#%%

for i in range(1, N + 1):
    for j in range(sum_value + 1):
        if j >= value[i]:
            dp[i][j] = min(dp[i][j], weight[i] + dp[i -1][j - value[i]])
        else:
            dp[i][j] = dp[i -1][j]
        
ans = 0
for i in range(sum_value + 1):
    if dp[N][i] == W:
        ans = i

print(ans)
Problem p03166 (python)

Fixed submission:
#%%
from sys import stdin, setrecursionlimit as srl
from threading import stack_size
srl(int(1e9)+7)
stack_size(int(1e8))

def func(x, graph, flag, dp):
    if (flag[x]):
        return dp[x]

    flag[x] = 1
    check = 0
    for i in graph[x]:
        check = max(check, func(i, graph, flag, dp) + 1)

    dp[x] = check

    return dp[x]

N, M = [int(i) for i in input().split()]
flag = [0] * (N + 1)
dp = [0] * (N + 1)
graph = [[] for _ in range(N + 1)]
#%%
for _ in range(M):
    temp_x, temp_y = [int(i) for i in input().split()]
    graph[temp_x].append(temp_y)

#%%
ans = 0
for i in range(1, N + 1):
    ans = max(ans, func(i, graph, flag, dp))

print(ans)

Buggy submission (verdict: Runtime Error):


def func(x, graph, flag, dp):
    if (flag[x]):
        return dp[x]

    flag[x] = 1
    check = 0
    for i in graph[x]:
        check = max(check, func(i, graph, flag, dp) + 1)

    dp[x] = check

    return dp[x]

N, M = [int(i) for i in input().split()]
flag = [0] * (N + 1)
dp = [0] * (N + 1)
graph = [[] for _ in range(N + 1)]
#%%
for _ in range(M):
    temp_x, temp_y = [int(i) for i in input().split()]
    graph[temp_x].append(temp_y)

#%%
ans = 0
for i in range(1, N + 1):
    ans = max(ans, func(i, graph, flag, dp))

print(ans)

Buggy submission (verdict: Runtime Error):
import sys
sys.getrecursionlimit(10 ** 9)

def func(x, graph, flag, dp):
    if (flag[x]):
        return dp[x]

    flag[x] = 1
    check = 0
    for i in graph[x]:
        check = max(check, func(i, graph, flag, dp) + 1)

    dp[x] = check

    return dp[x]

N, M = [int(i) for i in input().split()]
flag = [0] * (N + 1)
dp = [0] * (N + 1)
graph = [[] for _ in range(N + 1)]
#%%
for _ in range(M):
    temp_x, temp_y = [int(i) for i in input().split()]
    graph[temp_x].append(temp_y)

#%%
ans = 0
for i in range(1, N + 1):
    ans = max(ans, func(i, graph, flag, dp))

print(ans)

Buggy submission (verdict: Runtime Error):
import sys
sys.getrecursionlimit(1e9)

def func(x, graph, flag, dp):
    if (flag[x]):
        return dp[x]

    flag[x] = 1
    check = 0
    for i in graph[x]:
        check = max(check, func(i, graph, flag, dp) + 1)

    dp[x] = check

    return dp[x]

N, M = [int(i) for i in input().split()]
flag = [0] * (N + 1)
dp = [0] * (N + 1)
graph = [[] for _ in range(N + 1)]
#%%
for _ in range(M):
    temp_x, temp_y = [int(i) for i in input().split()]
    graph[temp_x].append(temp_y)

#%%
ans = 0
for i in range(1, N + 1):
    ans = max(ans, func(i, graph, flag, dp))

print(ans)

Buggy submission (verdict: Runtime Error):

def func(x, graph, flag, dp):
    if (flag[x]):
        return dp[x]

    flag[x] = 1
    check = 0
    for i in graph[x]:
        check = max(check, func(i, graph, flag, dp) + 1)

    dp[x] = check

    return dp[x]

N, M = [int(i) for i in input().split()]
flag = [0] * (N + 1)
dp = [0] * (N + 1)
graph = [[] for _ in range(N + 1)]
#%%
for _ in range(M):
    temp_x, temp_y = [int(i) for i in input().split()]
    graph[temp_x].append(temp_y)

#%%
ans = 0
for i in range(1, N + 1):
    ans = max(ans, func(i, graph, flag, dp))

print(ans)
Problem p03254 (python)

Fixed submission:
N, x = [int(i) for i in input().split()]
a = [int(i) for i in input().split()]
a_sort =sorted(a)
cou = 0
for i in range(N):
    if x >= a_sort[i]:
        x -= a_sort[i]
        cou += 1
if x > 0 and cou == N:
    print(cou-1)
else:
    print(cou)

Buggy submission (verdict: Runtime Error):
a_sort =sorted(a)
cou = 0
for i in range(N):
    if x >= a_sort[i]:
        cou += 1
        x -= a_sort[i]
print(cou)
Problem p03370 (python)

Fixed submission:
n,x = map(int,input().split())
m = [int(input()) for _ in range(n)]
x -= sum(m)
ans = n + x//min(m)
print(ans)

Buggy submission (verdict: Runtime Error):
N, X = map(int, input().split())
m = [int(input(i)) for i in range(N)]
XX -= sum(m)
ans = N + XX // min(m)
print(ans)
Problem p03408 (python)

Fixed submission:
N = int(input())
s = [input() for _ in range(N)]
M = int(input())
t = [input() for _ in range(M)]

Max = 0
for i in set(s):
    C = 0
    C = s.count(i) - t.count(i)
    if Max < C:
        Max = C
print(Max)

Buggy submission (verdict: Runtime Error):
N = int(input())
S = [input() for i in range(N)]
M = int(input())
T = [input() for i in range(M)]

from collections import Counter

cou_S = Counter(S)
cou_T = Counter(T)

ans = [0]
for key in cou_S:
    ans.append(cou_S[key] - cou_T.get(i, 0))
print(max(ans))
Problem p03416 (python)

Fixed submission:
A, B = [int(i) for i in input().split()]
bag=[]
for i in range(A, B+1):
    aa = str(i)
    if aa ==aa[::-1] :
        bag.append(i)

print(len(bag))

Buggy submission (verdict: Runtime Error):
N = int(input())
L = [int(j) for j in str(N)]
if N % sum(L) == 0:
    print("Yes")
else:
    print("No")
Problem p03448 (python)

Fixed submission:
A = int(input())
B = int(input())
C = int(input())
X = int(input())
to = 0
for i in range(A+1):
    for j in range(B+1):
        for k in range(C+1):
            if 500*i + 100*j + 50*k == X:
                to += 1
print(to)

Buggy submission (verdict: Runtime Error):
A, B, C, X = [int(input()) for i in range(4)]
ans =0
for i in range(A+1):
    for j in range(B+1):
        for k in range(C+1):
            if 500*i + 100*j + 50*k == X:
                ans += 1
                
print(ans
Problem p03485 (python)

Fixed submission:
a, b = map(int, input().split())
x = (a + b)
xx = -(-x // 2)
print(xx)

Buggy submission (verdict: Runtime Error):
x,y = map(int,input().split())
if (x + y) % == 0:
    print((x+y)/2)
else:
    print((x+y+1)/2)

Buggy submission (verdict: Runtime Error):
x,y = map(int,input().split())
if (x + y) % == 0:
  print((x+y)/2)
else:
  print((x+y+1)/2)

Buggy submission (verdict: Runtime Error):
x,y = int(input().split())
if (x + y) % == 0:
  print((x+y)/2)
else:
  print((x+y+1)/2)
Problem p03494 (python)

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

cou = []
for i in range(N):
    cc = 0
    while True:
        if x[i] % 2 == 0:
            x[i] /= 2
            cc+=1
        else:
            cou.append(cc) 
            break   
print(min(cou))

Buggy submission (verdict: Runtime Error):
def how_many_times_divisible(n):
	ans = 0
	while n % 2 == 0:
		n /= 2
		ans += 1
	return ans
 
n = int(raw_input())
a = map(int, raw_input().split())
ans = min(map(how_many_times_divisible, a))
 
print ans
Problem p03495 (python)

Fixed submission:
N, K = [int(i) for i in input().split()]
B = sorted([int(i) for i in input().split()])
D ={}
bag = 0

for i in B:
    if i in D:
        D[i] += 1
    else:
        D[i] = 1

LLL = sorted(list(D.values()))
AA = len(D) - K
if len(D) <= K:
    print(0)
else:
    for i in range(AA):
        bag += LLL[i]
    print(bag)

Buggy submission (verdict: Runtime Error):
N, K = [int(i) for i in input().split()]
B = [int(i) for i in input().split()]
C = list(set(B))
D ={}
for i in C:
    D[i] = 0
    for j in B:
        if i == j:
            D[i] += 1
if len(D) <= K:
    print(0)
else:
    LLL = list(D.values())
    AA = len(D) - K
    bag = 0
    for i in range(-AA, 0):
    bag += LLL[i]
    print(bag)
Problem p03502 (python)

Fixed submission:
N = int(input())
L = [int(j) for j in str(N)]
if N % sum(L) == 0:
    print("Yes")
else:
    print("No")

Buggy submission (verdict: Runtime Error):
N = int(inout)
L = [int(j) for j in str(N)]
if N % sum(L) == 0:
    print("Yes")
else:
    print("No")
Problem p03624 (python)

Fixed submission:
S = set(input())
Alp = list("abcdefghijklmnopqrstuvwxyz")
MM = []
for i in Alp:
    if i not in S:
        MM.append(i)
if MM == []:
    print("None")
else:
    print(min(MM))

Buggy submission (verdict: Runtime Error):
S = set(input())
Alp = "abcdefghijklmnopqrstuvwxyz"
L = []
for i in Alp:
    if i not in S:
        L.append(i)
if L == S:
    print("None")
else:
    print(min(L))
Problem p02786 (python)

Fixed submission:
#D
import math
H = int(input())
c = 1
while H>1:
  H = math.floor(H/2)
  c += 1
print(sum([2**i for i in range(c)]))

Buggy submission (verdict: Runtime Error):
#D

H = int(input())
c = 1
while H>1:
  H = math.floor(H/2)
  c += 1
print(sum([2**i for i in range(c)]))
Problem p02675 (python)

Fixed submission:
N=int(input())
n=N%10
if n==3:
  print("bon")
elif n==0 or n==1 or n==6 or n==8:
  print("pon")
else:
  print("hon")

Buggy submission (verdict: Runtime Error):
N=input()
n=N%10
if n==3:
  print("bon")
elif n==0 or n==1 or n==6 or n==8:
  print("pon")
else:
  print("hon")
Problem p02612 (python)

Fixed submission:
n=int(input())
if n%1000==0:
  print(0)
else:
  print(1000-n%1000)

Buggy submission (verdict: Runtime Error):
print(1000-N%1000)
Problem p02613 (python)

Fixed submission:
n=int(input())
l=[]
for i in range(n):
  l.append(input())
a=0
b=0
c=0
d=0
for i in l:
  if i=='AC':
    a+=1
  elif i=='WA':
    b+=1
  elif i=='TLE':
    c+=1
  else:
    d+=1
print('AC x',a)
print('WA x',b)
print('TLE x',c)
print('RE x',d)

Buggy submission (verdict: Runtime Error):
n=int(input())
for i in range(n):
  l.append(input())
a=0
b=0
c=0
d=0
for i in l:
  if i=='AC':
    a+=1
  elif i=='WA':
    b+=1
  elif i=='TLE':
    c+=1
  else:
    d+=1
print('AC x',a)
print('WA x',b)
print('TLE x',c)
print('RE x',d)
Problem p02690 (python)

Fixed submission:
x = int(input())
flag = 0
for a in range(-150, 150):
    for b in range(-150, 150):
        if a**5 - b**5 == x:
            break
    else:
        continue
    break

print(a, b)

Buggy submission (verdict: Runtime Error):
x = int(input())
b = 0
while True:
    a = pow(x + b**5, 0.2)
    if a**5 == int(a**5):
        break
    if b == 0:
        b = 1
    elif b>0:
        b = -b
    else:
        b = -b + 1
print(int(a), b)
Problem p02618 (python)

Fixed submission:
D=int(input())
c=list(map(int,input().split()))
s=[]
t=[]
for i in range(D):
  s.append(list(map(int,input().split())))
l=[0]*26
Manzoku=0

max=0
target=0
deg=0
for d in range(1,D+1):
  for i in range(26):
    deg=c[i]*(d-l[i])
    if max < deg:
      max=deg
      target=i
  t.append(target+1)
  l[target]=d

for i in range(D):
  print(t[i])

Buggy submission (verdict: Runtime Error):
import copy

def cal(x):
  Manzoku=0
  l=[0]*26
  for d in range(D):
    l[x[d]-1]=d
    Manzoku+=s[d][x[d]-1]
    for i in range(26):
      Manzoku-=c[i]*(d-l[i])
  return Manzoku

D=int(input())
c=list(map(int,input().split()))
s=[]
t=[]
for i in range(D):
  s.append(list(map(int,input().split())))
l=[0]*26


max=0
target=0
deg=0
#初期t生成
for d in range(D):
  for i in range(26):
    deg=c[i]*(d-l[i])
    if max < deg:
      max=deg
      target=i
  t.append(target+1)
  l[target]=d

t1=copy.deepcopy(t)
mManzoku=0
for d in range(D):
  for i in range(26):
    t1[d]=i+1
    su=cal(t1)
    if mManzoku < su:
      mManzoku=su
      tar=i+1
  t1[d]=tar
  

for i in range(D):
  print(t[i])
Problem p02641 (python)

Fixed submission:
x,n=map(int,input().split())
if n==0:
  print(x)
else:
  a=list(map(int,input().split()))
  flag=0
  i=0
  while flag==0:
    continueflag=0
    for j in range(n):
      if a[j]==x-i:
        continueflag=1
        break
    if continueflag==0:
      print(x-i)
      break
      
    continueflag=0
    for j in range(n):
      if a[j]==x+i:
        continueflag=1
        break
    if continueflag==0:
      print(x+i)
      break
    i=i+1

Buggy submission (verdict: Runtime Error):
x,n=map(int,input().split())
if n==0:
  print(x)
else:
  a=list(map(int,input().split()))

  dtmp=100
  for i in range(1,101):
    continueflag=0
    for j in a:
      if j==i:
        continueflag=1
        break
    if continueflag==1:
      continue
    d=abs(x-i)
    if d<dtmp:
      dtmp=d
      ans=i

  print(ans)

Buggy submission (verdict: Runtime Error):
x,n=map(int,input().split())
if n==0:
  print(x)
else:
  a=list(map(int,input().split()))

  dtmp=100
  for i in range(1,100):
    continueflag=0
    for j in a:
      if j==i:
        continueflag=1
        break
    if continueflag==1:
      continue
    d=abs(x-i)
    if d<dtmp:
      dtmp=d
      ans=i

  print(ans)

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

dtmp = 100
for i in range(n):
  d=abs(x-a[i])
  if d<dtmp:
    dtmp=d
    ans=x
  elif d==dtmp:
    ans=x
print(ans)
Problem p02957 (python)

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

if (A+B)%2 == 0:
    result = str((A + B) // 2)
else:
    result =  'IMPOSSIBLE'

print(result)

Buggy submission (verdict: Runtime Error):
n = int(input())
a = list(map(int, input().split()))
b = list(map(int, input().split()))
count = 0
for i in range(n):
  if a[i] >= b[i]:
    count += b[i]
  else:
    count += min(b[i], a[i]+a[i+1])
    a[i+1] = max(0, a[i+1]-(b[i]-a[i]))
print(count)
Problem p02639 (python)

Fixed submission:
X = input().split()
         
for i,num in enumerate(X):
	if num == "0":
		print(int(i)+1)

Buggy submission (verdict: Runtime Error):
X = list(map(int, input(),split())
         
for i in X:
	if i == 0:
         print(i+1)
Problem p02658 (python)

Fixed submission:
N = int(input())
A = list(map(int, input().split()))
 
A.sort()
num = A[0]
for a in A[1:]:
  num *= a
  if num > 10 ** 18:
    print(-1)
    exit()
print(num)

Buggy submission (verdict: Runtime Error):
N = int(input())
A = list(map(int, input().split()))

A.sort()
num = A[0]
for a in A[1:]:
  num *= a
  if num > 10 ** 18:
    print(-1)
    exit()
print(result)

Buggy submission (verdict: Runtime Error):
N = int(input())
A = [int(i) for i in input()]
sum = 1

for i in range(N):
  sum = sum * A[i]

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

print(sum)
Problem p02730 (python)

Fixed submission:
s = input()
n = len(s)

s1 = s[:(n-1)//2]
s2 = s[(n+3)//2-1:]

if s == s[::-1] and s1 == s1[::-1] and s2 == s2[::-1]:
  print("Yes")
else:
  print("No")

Buggy submission (verdict: Runtime Error):
s = input()
s1 = s[:n//2]
s2 = s[n//2+1:]
if s1 == s2 and s2 ==  s2[::-1]:
    print('Yes')
else:
    print('No')
Problem p02778 (python)

Fixed submission:
S = input()
 
S_len = len(S)
 
print("x" * S_len)

Buggy submission (verdict: Runtime Error):
S = input()

S_len = len(S)

print(x* S_len)
Problem p02783 (python)

Fixed submission:
H, A = map(int,input().split())
count = 0
while H > 0:
  H -= A
  count += 1
  
print(count)

Buggy submission (verdict: Runtime Error):
H, A = map(int,input.split())
count = 0
while H > 0:
  H -= A
  count += 1
  
print(count)
Problem p02848 (python)

Fixed submission:
alphabet = list("ABCDEFGHIJKLMNOPQRSTUVWXYZ")
N = int(input())
S = input()
for i in S:
  print(alphabet[(alphabet.index(i)+N) % 26], end='')

Buggy submission (verdict: Runtime Error):
alphabet = list("ABCDEFGHRJKLMNOPQRSTUVWXYZ")
n = int(input())
s = input()
for i in s:
  #print(i, alphabet.index(i))
  print(alphabet[(alphabet.index(i)+n) % 26], end='')
Problem p02639 (python)

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

Buggy submission (verdict: Runtime Error):
A = list(map(int, input().split()))
k = A.find(0)
print(k+1)
Problem p02694 (python)

Fixed submission:
X = int(input())
A = 100
Y = 0
while A < X:
  A += A//100
  Y += 1
print(Y)

Buggy submission (verdict: Runtime Error):
X = int(input())
A = 100
Y = 0
while A < X:
  A = int(y*1.01)
  Y += 1 
print(Y)
Problem p02730 (python)

Fixed submission:
S = input()
S1 = S[:int((len(S)-1)/2)]
S2 = S[int((len(S)+3)/2)-1:]
print('Yes' if S == S[::-1] and S1 == S1[::-1] and S2 == S2[::-1] else 'No')

Buggy submission (verdict: Runtime Error):
S = input()
S1 = S[:int((len(s)-1)/2)]
S2 = S[int((len(s)+3)/2)-1:]
print('Yes' if S == S[::-1] and S1 == S1[::-1] and S2 == S2[::-1] else 'No')
Problem p02760 (python)

Fixed submission:
A = list(map(int, input().split()))
B = list(map(int, input().split()))
C = list(map(int, input().split()))
X = A + B + C
N = int(input())
L = []
for i in range (N):
  K = int(input())
  L.append(K)
ck = 'No'
if A[0] in L and A[1]in L and A[2] in L:
  ck = 'Yes'
elif B[0] in L and B[1]in L and B[2] in L:
  ck = 'Yes'
elif C[0] in L and C[1]in L and C[2] in L:
  ck = 'Yes'
elif A[0] in L and B[0]in L and C[0] in L:
  ck = 'Yes'
elif A[1] in L and B[1]in L and C[1] in L:
  ck = 'Yes'
elif A[2] in L and B[2]in L and C[2] in L:
  ck = 'Yes'
elif A[0] in L and B[1] in L and C[2] in L:
  ck = 'Yes'
elif A[2] in L and B[1] in L and C[0] in L:
  ck = 'Yes'
print(ck)

Buggy submission (verdict: Runtime Error):
A = list(map(int, input().split()))
B = list(map(int, input().split()))
C = list(map(int, input().split()))
X = A + B + C
N = int(input())
L = []
for i in range (N):
  K = int(input())
  L.append(K)
ck = 'No'
if A[1] in L and A[2]in L and A[3] in L:
  ck == 'Yes'
elif B[1] in L and B[2]in L and B[3] in L:
  ck == 'Yes'
elif C[1] in L and C[2]in L and C[3] in L:
  ck == 'Yes'
elif A[1] in L and B[1]in L and C[1] in L:
  ck == 'Yes'
elif A[2] in L and B[2]in L and C[2] in L:
  ck == 'Yes'
elif A[3] in L and B[3]in L and C[3] in L:
  ck == 'Yes'
elif A[1] in L and B[2] in L and C[3] in L:
  ck = 'Yes'
elif A[3] in L and B[2] in L and C[1] in L:
  ck = 'Yes'
print(ck)
Problem p02772 (python)

Fixed submission:
N = int(input())
A = list(map(int, input().split()))
k = 'APPROVED'
for i in A:
  if i % 2 == 0:
    if i % 3 == 0:
      pass
    elif i % 5 == 0:
      pass
    else:
      k = 'DENIED'
print(k)

Buggy submission (verdict: Runtime Error):
N = int(input())
A = list(map(int, input().split()))
k = 0
for i in A:
  if i%2 = 1:
    A.remove(i)
for j in A:
  if j%3 != 0 and j%5 != 0:
    k = 1
    break
if k == 0:
  print('APPROVED')
elif k == 1:
  print('DENIED')
Problem p02784 (python)

Fixed submission:
H,N = map(int, input().split())
A = list(map(int, input().split()))
if sum(A) >= H:
  print('Yes')
else:
  print('No')

Buggy submission (verdict: Runtime Error):
H,N = map(int, input().split())
A = list(int(input()))
if sum(A) >= H:
  print('Yes')
else:
  print('No')

Buggy submission (verdict: Runtime Error):
H,N = map(int, input().split())
A = list(int(input().split()))
if sum(A) >= H:
  print('Yes')
else:
  print('No')