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

Fixed submission:
n = int(input())
S = []
result = 0
A_count = 0
B_count = 0
BA_count = 0

for i in range(n):
    Si = str(input())
    S.append(Si)

for i in range(n):
    Si = S[i]
    result += Si.count("AB")
    if Si[0] == "B" and Si[-1] != "A":
        B_count += 1
    if Si[0] != "B" and Si[-1] == "A":
        A_count += 1
    if Si[0] == "B" and Si[-1] == "A":
        BA_count += 1 

if BA_count >= 2:
    result += (BA_count - 1)

if BA_count >= 1:
    if B_count >= 1:
        result += 1
        B_count -= 1
    if A_count >= 1:
        result += 1
        A_count -= 1

if B_count >= 1 and A_count >= 1:
    result += min(B_count, A_count)

print(result)

Buggy submission (verdict: Runtime Error):
n = int(input())
S = []
result = 0
A_count = 0
B_count = 0
BA_count = 0

for i in range(n):
    Si = str(input())
    S.append(Si)

for i in range(n):
    Si = S[i]
    result += Si.count("AB")
    if Si[0] == "B":
        B_count += 1
    if Si[-1] == "A":
        A_count += 1
    if Si[0] == "B" and Si[-1] == "A"
        BA_count += 1 

if BA_count >= 2:
    result += (BA_count - 1)

if BA_count >= 1
    if B_count >= 1:
        result += 1
        B_count -= 1
    if A_count >= 1:
        result += 1
        A_count -= 1

if B_count >= 1 and A_count >= 1:
    result += min(B_count, A_count)

print(result)
Problem p03076 (python)

Fixed submission:
def round_up(n):
    if n%10 != 0:
        return n + 10 - (n%10)
    else:
        return n

def round_up_count(n):
    if n%10 != 0:
        return 10 - n%10
    else:
        return 0

orders = []

max_rc = 0
last_order_index = 0
last_order_time = 0

for i in range(5):
    order = int(input())
    orders.append(order)
    last_order_time += round_up(order)
    rc = round_up_count(order)
    if max_rc <= rc:
        last_order_index = i
        max_rc = rc

print(last_order_time - round_up_count(orders[last_order_index]))

Buggy submission (verdict: Runtime Error):
def round_up(n: int) -> int:
    if n%10 != 0:
        return n + 10 - (n%10)
    else:
        return n

def round_up_count(n: int) -> int:
    if n%10 != 0:
        return 10 - n%10
    else:
        return 0

orders = []

max_rc: int = 0
last_order_index: int = 0
last_order_time: int = 0

for i in range(5):
    order = int(input())
    orders.append(order)
    last_order_time += round_up(order)
    rc = round_up_count(order)
    if max_rc <= rc:
        last_order_index = i
        max_rc = rc

print(last_order_time - round_up_count(orders[last_order_index]))
Problem p03102 (python)

Fixed submission:
N, M, C = map(int, input().split())
B = list(map(int, input().split()))

correct_answer = 0

for i in range(N):
    A = list(map(int, input().split()))
    sum_AB = 0
    for j in range(M):
        sum_AB += A[j]*B[j]
    if sum_AB + C > 0:
        correct_answer += 1

print(correct_answer)

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

correct_answer = 0

for i in range(N):
    A = list(map(int, input().split()))
    
    for j in range(M):
        sum_AB += A[j]*B[j]
    if sum_AB + C > 0:
        correct_answer += 1

print(correct_answer)
Problem p03170 (python)

Fixed submission:
import sys
 
input = sys.stdin.readline
 
N, K = map(int, input().rstrip("\n").split())
a = [int(i) for i in input().rstrip("\n").split()]

dp = [True for j in range(K+1)]
dp[0] = False

for j in range(K):
    for i in range(N):
        if j+1 - a[i] >= 0:
            dp[j+1] = dp[j+1] and dp[j+1 - a[i]]
    dp[j+1] = not dp[j+1]

if dp[-1]:
    print("First")
else:
    print("Second")

Buggy submission (verdict: Runtime Error):
import sys
import numpy as np
 
input = sys.stdin.readline
 
N, K = map(int, input().split())
a = [int(i) for i in input().split()]

dp = [True for j in range(K+1)]
dp[0] = False

for j in range(K):
    for i in range(N):
        if j+1 - a[i] >= 0:
            dp[j+1] = dp[j+1] and dp[j+1 - a[i]]
    dp[j+1] = not dp[j+1]

if dp[-1]:
    print("First")
else:
    print("Second")

Buggy submission (verdict: Runtime Error):
import sys
import numpy as np
 
input = sys.stdin.readline
 
N, K = map(int, input().split())
a = [int(i) for i in input().split()]

dp = [True for j in range(K+1)]
dp[0] = False

for j in range(K):
    for i in range(N):
        if j+1 - a[i] >= 0:
            dp[j+1] = dp[j+1] and dp[j+1 - a[i]]
    dp[j+1] = not dp[j+1]

if dp[-1]:
    print("First")
else:
    print("Second")
Problem p02614 (python)

Fixed submission:
row, col, num = map(int, input().split())

tmp_l = []
board = []
for i in range(row):
  str = input()
  for j in range(col):
    if str[j] == '.':
      tmp_l.append(0)
    if str[j] == '#':
      tmp_l.append(1)
  board.append(tmp_l)
  tmp_l = []

onoff = []
bi = [32, 16, 8, 4, 2, 1]
for i in range(64):
  tmp = i
  for j in bi:
    tmp_l.insert(0, int(tmp / j))
    tmp %= j
  onoff.append(tmp_l)
  tmp_l = []

count = 0
ans = 0
for i in range(2**row):
  for j in range(2**col):
    for k in range(row):
      if onoff[i][k] == 1:
        for l in range(col):
          if onoff[j][l] == 1:
            if board[k][l] == 1:
              count += 1
    if count == num:
      ans += 1
    count = 0

print(ans)

Buggy submission (verdict: Runtime Error):
row, col, num = map(int, input().split())

tmp_l = []
board = []
for i in range(row):
  str = input()
  for j in range(col):
    if str[j] == '.':
      tmp_l.append(0)
    if str[j] == '#':
      tmp_l.append(1)
  board.append(tmp_l)
  tmp_l = []

onoff = []
bi = [32, 16, 8, 4, 2, 1]
for i in range(64):
  tmp = i
  for j in bi:
    tmp_l.insert(0, int(tmp / j))
    tmp = tmp % j
  onoff.append(tmp_l)
  tmp_l = []

count = 0
ans = 0
for i in range(2**row):
  for j in range(2**col):
    for k in range(row):
      if onoff[i][k] == 1:
        for l in range(col):
          if onoff[j][l] == 1:
            if board[l][k] == 1:
              count += 1
    if count == num:
      ans += 1
    count = 0

print(ans)

Buggy submission (verdict: Runtime Error):
row, col, num = map(int, input().split())

tmp_list = []
board = []
for i in range(row):
  str = input()
  for j in range(col):
    if str[j] == '.':
      tmp_list.append(0)
    if str[j] == '#':
      tmp_list.append(1)
  board.append(tmp_list)
  tmp_list = []

onoff = []
bi = [32, 16, 8, 4, 2, 1]
for i in range(64):
  tmp = i
  for j in bi:
    tmp_list.insert(0, int(tmp / j))
    tmp %= j
  onoff.append(tmp_list)
  tmp_list = []

count = 0
ans = 0
for i in range(2**row):
  for j in range(2**col):
    for k in range(row):
      if onoff[i][k] == 1:
        for l in range(col):
          if onoff[j][l] == 1:
            if board[l][k] == 1:
              count += 1
    if count == num:
      ans += 1
    count = 0

print(ans)
Problem p03266 (python)

Fixed submission:
s = input().split()
N = int(s[0])
K = int(s[1])

ans = N // K 
ans = ans ** 3

ans_ev = 0
if K % 2 == 0:
  ans_ev = (N+(K//2)) // (K)
  ans_ev = ans_ev ** 3
                         

print(ans+ ans_ev )

Buggy submission (verdict: Runtime Error):
s = input().split()
N = int(s[0])
K = int(s[1])

ans = N // K 

if K % 2 == 0:
  ans = ans + N//(K%2)

print(ans**3 )
Problem p03284 (python)

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

if(n % k > 0):
    print(1)
else:
    print(0)

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

if(n % k > 0):
    print(1)
else:
    print(0)
Problem p02642 (python)

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

dp = [0] * (10**6+1)

for a in A:
    dp[a] += 1

for i in range(1, len(dp)):
    if dp[i]:
        for j in range(i+i, len(dp), i):
            dp[j] = 0
print(dp.count(1))

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

dp = [0] * (2*(10**5) + 1)

for a in A:
    dp[a] += 1

for i in range(1, len(dp)):
    if dp[i]:
        for j in range(i+i, len(dp), i):
            dp[j] = 0
print(dp.count(1))

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

dp = [0] * (2*(10**5))

for a in A:
    dp[a] += 1

for i in range(1, len(dp)):
    if dp[i]:
        for j in range(i+i, len(dp), i):
            dp[j] = 0
print(dp.count(1))

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

for i in range(n):
    for j in range(n):
        if i == j:
            continue
        if A[i] % A[j] == 0:
            break
    else:
        ans += 1

print(ans)
Problem p02717 (python)

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

print(z, x, y)

Buggy submission (verdict: Runtime Error):
n, m = map(int, input().split())
A = list(map(int, input().split()))
borderline = sum(A) / (4 * m)

print('Yes' if sorted(A, reverse=True)[m-1] >= borderline else 'No')
Problem p02787 (python)

Fixed submission:
h, n = map(int, input().split())
magics = sorted(list(map(int, input().split())) for _ in range(n))
max_cost = max(magic[1] for magic in magics)

dp = [float('inf')] * (h+max_cost)
dp[0] = 0
for i in range(h+max_cost):
    for at, cost in magics:
        if at <= i:
            dp[i] = min(dp[i], dp[i-at] + cost)
        else:
            break
print(min(dp[h:]))

Buggy submission (verdict: Runtime Error):
h, n = map(int, input().split())
magics = sorted(list(map(int, input().split())) for _ in range(n))
max_cost = max(magic[1] for magic in magics)

dp = []
dp[0] = 0
for i in range(h+max_cost+1):
    for at, cost in magics:
        if at <= i:
            dp[i] = min(dp[i], dp[i-at] + cost)
        else:
            break
print(min(dp[h:]))
Problem p02952 (python)

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

Buggy submission (verdict: Runtime Error):
n = int(n)

count = 0
for i in range(1, n+1):
  if len(str(i)) % 2 == 1:
    count += 1
print(count)
Problem p03059 (python)

Fixed submission:
# coding: utf-8

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

def biscuit_generator(a, b, t):
    biscuit = 0
    t -= a
    while (t+0.5) > 0:
      biscuit += b
      t -= a

    return biscuit

print(biscuit_generator(A, B, T))

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

print((T+0.5) // A * B)
Problem p03060 (python)

Fixed submission:
# coding: utf-8

from itertools import combinations, chain

N = int(input())
values = map(int, input().split())
costs = map(int, input().split())

sales = [v - c for v, c in zip(values, costs)]

print(max(chain.from_iterable(map(sum, combinations(sales, i)) for i in range(0, N+1))))

Buggy submission (verdict: Runtime Error):
n = int(input().strip())
values = list(map(int, input().split()))
costs = list(map(int, input().split()))

sales = [v - c for v, c in zip(values, costs) if v > c else 0]

print(sum(sales))
Problem p03061 (python)

Fixed submission:
# coding: utf-8

n=int(input())
A=list(map(int,input().split()))

def gcd(a, b):
    if a < b:
        a, b = b, a
    if b == 0:
        return a
    return gcd(b, a%b)

L = [0]
R = [0]

for i in range(n):
    L.append(gcd(L[i], A[i]))
    R.append(gcd(R[i], A[n-1-i]))
R.reverse()

result = []

for i in range(n):
    result.append(gcd(L[i], R[i+1])) 

print(max(result))

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

def gcd(a, b):
  if a < b:
    a, b = b, a
  if b == 0:
    return a
  return gcd(b, a % b)

X = [0] * (n + 1)
Y = [0] * (n + 1)

for i in range(n):
  X[i+1] = gcd(X[i], A[i])
  Y[n-1-i] = gcd(Y[n-i], A[n-1-i])

gcds = []

for i in range(n+1):
  gcds.append(gcd(X[i], Y[i+1]))

print(max(gcds))

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

def gcd(a, b):
  if a < b:
    a, b = b, a
  if b == 0:
    return a
  return gcd(b, a % b)

X = [0] * (n + 1)
Y = [0] * (n + 1)

for i in range(n):
  X[i+1] = gcd(X[i], A[i])
  Y[n-1-i] = gcd(Y[n-i], A[n-1-i])

gcds = []

for i in range(n+1):
  gcds.append(gcd(X[i], Y[i+1]))

print(max(gcds))

Buggy submission (verdict: Runtime Error):
from functools import reduce
import fractions

n=int(input())
A=list(map(int,input().split()))

def gcd(data):
    if len(data) == 1:
        return data[0]
    return reduce(lambda x, y: fractions.gcd(x, y), data)

gcds = []

for i in range(1, n-1):
    gcds.append(gcd(A[0:i] + A[i+1:n]))

print(max(gcds))

Buggy submission (verdict: Runtime Error):
from functools import reduce
import fractions

n=int(input())
A=list(map(int,input().split()))

def gcd(data):
    if len(data) == 1:
        return data[0]
    return reduce(lambda x, y: fractions.gcd(x, y), data)

gcds = []

for i in range(1, n-2):
    gcds.append(gcd(A[0:i] + A[i+1:n]))

print(max(gcds))

Buggy submission (verdict: Runtime Error):
from functools import reduce
import copy
import math

N = int(input())
integers = list(map(int, input().split()))


gcds = []

for i in range(N):
    for x in set(integers):
        tmp_integers = copy.copy(integers)
        tmp_integers[i] = x
        gcds.append(reduce(math.gcd, tmp_integers))
print(max(gcds))
Problem p02767 (python)

Fixed submission:
N=int(input())
X=list(map(int,input().split()))
dispersion=[]
cnt=0
for i in range(100):
    for j in range(N):
        cnt+=abs(X[j]-i)**2
    dispersion.append(cnt)
    cnt=0
print(min(dispersion))

Buggy submission (verdict: Runtime Error):
N=int(input())
X=list(map(int,input().split()))
dispersion=[]
cnt=0
for i in range(min(X),max(X)):
    for j in range(N):
        cnt+=abs(X[j]-i)**2
    dispersion.append(cnt)
    cnt=0
print(min(dispersion))

Buggy submission (verdict: Runtime Error):
def rally():
    N=int(input())
    X=list(map(int,input().split()))
    dispersion=[]
    cnt=0
    for i in range(min(X),max(X)):
        for j in range(N):
            cnt+=abs(X[j]-i)**2
        dispersion.append(cnt)
        cnt=0
    print(min(dispersion))
    return 0
rally()

Buggy submission (verdict: Runtime Error):
def rally():
    N=int(input())
    X=list(map(int,input().split()))
    dispersion=[]
    cnt=0
    for i in range(min(X),max(X)):
        for j in range(N):
            cnt+=abs(X[j]-i)**2
        dispersion.append(cnt)
        cnt=0
    print(min(dispersion))

rally()

Buggy submission (verdict: Runtime Error):
def rally():
    N=input()
    X=list(map(int,input().split()))
    dispersion=[]
    cnt=0
    for i in range(min(X),max(X)):
        for j in X:
            cnt+=abs(j-i)**2
        dispersion.append(cnt)
        cnt=0
    print(min(dispersion))

rally()

Buggy submission (verdict: Runtime Error):
def rally():
    N=input()
    X=list(map(int,input().split()))
    dispersion=[]
    cnt=0
    for i in range(min(X),max(X)):
        for j in X:
            cnt+=(j-i)**2
        dispersion.append(cnt)
        cnt=0
    print(min(dispersion))

rally()
Problem p02582 (python)

Fixed submission:
str = input()
if 'R' in str:
   crs=1
   if 'RR' in str:
      crs=2
      if 'RRR' in str:
         crs=3
else:
    crs=0
print(crs)

Buggy submission (verdict: Runtime Error):
import sys
import copy
R, C, K = map(int, input().split())
item = [[0]*C for _ in range(R)] 
for s in sys.stdin.readlines():
    r, c, v = map(int, s.split())
    r -= 1
    c -= 1
    item[r][c] = v
    
dp0 = [[0] * (C+1) for r in range(R+1)]
dp1 = [[0] * (C+1) for r in range(R+1)]
dp2 = [[0] * (C+1) for r in range(R+1)]
dp3 = [[0] * (C+1) for r in range(R+1)]
 
for r in range(R):
   for c in range(C):
      dp3[r][c] = max(dp3[r][c], dp2[r][c] + item[r][c])
      dp2[r][c] = max(dp2[r][c], dp1[r][c] + item[r][c])
      dp1[r][c] = max(dp1[r][c], dp0[r][c] + item[r][c])
      dp1[r][c+1] = max(dp1[r][c], dp1[r][c+1])
      dp2[r][c+1] = max(dp2[r][c], dp2[r][c+1])
      dp3[r][c+1] = max(dp3[r][c], dp3[r][c+1])
      dp0[r+1][c] = max(dp0[r+1][c], dp1[r][c])
      dp0[r+1][c] = max(dp0[r+1][c], dp2[r][c])
      dp0[r+1][c] = max(dp0[r+1][c], dp3[r][c])
ans = max(dp0[R-1][C-1], dp1[R-1][C-1])
ans = max(ans, dp3[R-1][C-1])
ans = max(ans, dp2[R-1][C-1])
print(ans)

Buggy submission (verdict: Runtime Error):
import sys
import copy
R, C, K = map(int, input().split())
item = [[0] * C for _ in range(R)]  # dp配列と合わせるために, 0行目, 0列目を追加している.
for s in sys.stdin.readlines():
    r, c, v = map(int, s.split())
    r -= 1
    c -= 1
    item[r][c] = v
    
dp0 = [[0] * (C+1) for r in range(R+1)]
dp1 = [[0] * (C+1) for r in range(R+1)]
dp2 = [[0] * (C+1) for r in range(R+1)]
dp3 = [[0] * (C+1) for r in range(R+1)]
 
for r in range(R):
   for c in range(C):
      dp3[r][c] = max(dp3[r][c], dp2[r][c] + item[r][c])
      dp2[r][c] = max(dp2[r][c], dp1[r][c] + item[r][c])
      dp1[r][c] = max(dp1[r][c], dp0[r][c] + item[r][c])
      dp1[r][c+1] = max(dp1[r][c], dp1[r][c+1])
      dp2[r][c+1] = max(dp2[r][c], dp2[r][c+1])
      dp3[r][c+1] = max(dp3[r][c], dp3[r][c+1])
      dp0[r+1][c] = max(dp0[r+1][c], dp1[r][c])
      dp0[r+1][c] = max(dp0[r+1][c], dp2[r][c])
      dp0[r+1][c] = max(dp0[r+1][c], dp3[r][c])
ans = max(dp0[R-1][C-1], dp1[R-1][C-1])
ans = max(ans, dp3[R-1][C-1])
ans = max(ans, dp2[R-1][C-1])
print(ans)
Problem p02584 (python)

Fixed submission:
s = input().split()
X=int(s[0])
K=int(s[1])
D=int(s[2])
q, mod = divmod(X, D)
if q < 0:
  q = -q
if 2*mod < D:
   if K < q:
      if X > 0:
         m = X - D*K
      else:
         m = X + D*K
   else:
       restmovement = (K-q)%2
       if restmovement==0:
          m = mod
       else:
          m = D - mod
else:
   if X > 0:
      if K < q+1:
         m = X - D*K
      else:
         restmovement = (K - q - 1)%2
         if restmovement==0:
                    m = D - mod
         else:
                    m = mod
   else:
       if K < q-1:
          m=X - D*K
       else:
          restmovement = (K+1-q)%2
          if restmovement==0:
                m = D-mod
          else:
                m = mod
if m < 0:
   print(-m)
else:
   print(m)

Buggy submission (verdict: Runtime Error):
X, K, D = input().split()
X = abs(X)
Q, mod = divmod(X, D)
if K < Q:
    ans = X - K*D
else:
    Rest = (K - Q)%2
    if Rest == 0:
         ans = mod
    else:
         ans = D - mod
print(ans)
Problem p02641 (python)

Fixed submission:
X, N = list(map(int, input().split()))
p = list(map(int, input().split()))
integer = [i for i in range(102)]
for i in range(N):
   integer.remove(p[i])
l = len(integer)
ans = -200
for i in range(l):
   if abs(ans) > abs(integer[i]-X):
      ans = integer[i] - X
print(ans + X)

Buggy submission (verdict: Runtime Error):
X, N = list(map(int, input().split()))
p = list(map(int, input().split()))
integer = [i+1 for i in range(100)]
for i in range(N):
   integer.remove(p[i])
integer = map(lambda x: x - X, integer)
l = len(integer)
ans = -200
for i in range(l):
   if abs(ans) > abs(integer[i]):
      ans = integer[i]
print(ans + X)
Problem p02660 (python)

Fixed submission:
import math
N = int(input())
max_D = int(2 + math.sqrt(N))
count = []
ans = 1
for i in range(2, max_D):
   if N % i == 0:
      count.append(0)
      while N % i == 0:
         N = N // i
         count[-1] += 1
   if N < i:
      ans = 0
      break
l = len(count)
for i in range(l):
   E = 2*count[i]
   j = 0
   while j * (j + 1) <= E:
      j += 1
   ans += j - 1
print(ans)

Buggy submission (verdict: Runtime Error):
import math
N = int(input())
max_D = int(1 + math.sqrt(N))
count = []
for i in range(max_D):
   if N % i == 0:
      count.append([0])
      while N%i == 0:
         N = N / i
         count[-1] += 1
   if N < i:
      break
l = len(count)
ans = 0
for i in range(l):
   E = count[i]
   j = 0
   while j * (j + 1) <= 2 * E:
      j += 1
   ans += j - 1
print(ans)
Problem p02678 (python)

Fixed submission:
from collections import deque
import sys
N, M = list(map(int, input().split()))
ans = [-1] * N
visited = [False] * N
dq = deque([0])
path = [[] for _ in range(N)]
for s in sys.stdin.readlines():
    a, b = list(map(lambda x: int(x)-1, s.split()))
    path[a].append(b)
    path[b].append(a)
while dq:
   i = dq.popleft()
   if visited[i]:
      continue
   visited[i] = True
   next_rs = path[i]
   for j in range(len(next_rs)):
      if not visited[next_rs[j]]:
         dq.append(next_rs[j])
         if ans[next_rs[j]] == -1:
            ans[next_rs[j]] = i
if sum(visited) == N:
   print('Yes')
   for i in range(N):
      if i == 0:
         continue
      else:
         print(ans[i]+1)
else:
   print(-1)

Buggy submission (verdict: Runtime Error):
from collections import deque
import sys
N, M = list(map(int, input().split))
ans = [[] * N]
visited = [[False] * N]
dq = deque([0])
path = [[0] * N]
for s in sys.stdin.readlines():
    a, b = map(lambda: int(x)-1, s.split())
    path[a].add(b)
    path[b].add(a)
while dq:
   i = dq.popleft()
   if visited[i]:
      continue
   visited[i] = True
   next_rs = path[i]
   for i in range(len(next_rs)):
      dq.append(next_rs[i])
      ans[next_rs[i]] = i
if sum(visited) == N:
   print('Yes')
   for i in range(N):
      if i == 0:
         continue
      else:
         print(ans[i])
else:
   print(-1)
Problem p02576 (python)

Fixed submission:
n, x, t = map(int, input().split())
print(int((n+x-1)/x) * t)

Buggy submission (verdict: Runtime Error):
print(int((N+X-1)/X) * T)
Problem p02621 (python)

Fixed submission:
a = int(input())
print(a + a ** 2 + a ** 3)

Buggy submission (verdict: Runtime Error):
a = int(input())
print(a + a ** 2 + a *** 3)
Problem p02628 (python)

Fixed submission:
n, k = map(int, input().split())
p = list(map(int, input().split()))
p.sort()
price = 0

for i in range(k):
  price += p[i]
  
print(price)

Buggy submission (verdict: Runtime Error):
n, k = map(int, input().split())
p = list(map(int, input().split()))
p.sort()
price = 0

for p in range(k):
  price += p[k]
  
print(price)

Buggy submission (verdict: Runtime Error):
n, k = map(int, input().split())
p = list(map(int, input().split()))
p.sort()
price = 0

for p in range(k):
  price += p[k]
 
print(price)

Buggy submission (verdict: Runtime Error):
n, k = map(int, input().split())
p = list(map(int, input().split()))
p.sort()
for i in range(k):
  price += p[i]
print(price)
Problem p02675 (python)

Fixed submission:
n = input()
if n[-1] in "24579":
  print("hon")
elif n[-1] in "0168":
  print("pon")
elif n[-1] in "3":
  print("bon")

Buggy submission (verdict: Runtime Error):
n = input()
if n[-1] in "24579":
  print("hon")
elif n[-1] in "0168":
  print("pon")
elif n[-1] in "3"
  print("bon")

Buggy submission (verdict: Runtime Error):
n = int(input())
if n[-1] in "24579":
  print("hon")
elif n[-1] in "0168":
  print("pon")
elif n[-1] in "3"
  print("bon")

Buggy submission (verdict: Runtime Error):
n = int(input())
if n[-1] = 2, 4, 5, 7, 9:
  print("hon")
elsif n[-1] = 0, 1, 6, 8:
  print("pon")
else:
  print("bon")
Problem p02681 (python)

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

if s == t[:-1]:
    print('Yes')
else:
    print('No')

Buggy submission (verdict: Runtime Error):
s = input()
t = input()

if t = (s + 1):
  print("Yes")
else:
  print("No")
Problem p02705 (python)

Fixed submission:
R = int(input())
import math
pi = math.pi
print(2 * pi * R)

Buggy submission (verdict: Runtime Error):
n, m = map(int, input().split())
a = list(map(int, input().split()))
  
print(max(-1, n - sum(a))
Problem p02765 (python)

Fixed submission:
n, r = map(int, input().split())
if n >= 10:
  print(r)
else:
  print(r + (100 * (10 - n)))

Buggy submission (verdict: Runtime Error):
n, r = map(int, input().split())
if n >= 10:
  print r
else:
  print r + (100 * (10 - n))

Buggy submission (verdict: Runtime Error):
n, r = map(int, input().split())
if n >= 10:
  print r
else:
  print r + 100 * (10 - n)
Problem p02921 (python)

Fixed submission:
s = input()
t = input()
ans = 0

for i in range(3):
  ans += s[i] == t[i]

print(ans)

Buggy submission (verdict: Runtime Error):
s = input()
t = input()
ans = 0

for i in range(s):
  ans += s[i] == t[i]

print(ans)
Problem p03206 (python)

Fixed submission:
d = int(input())
if d == 25:
  print("Christmas")
elif d == 24:
  print("Christmas Eve")
elif d == 23:
  print("Christmas Eve Eve")
elif d == 22:
  print("Christmas Eve Eve Eve")

Buggy submission (verdict: Runtime Error):
d = int(input())
if d = 25:
  print("Christmas")
elif d = 24:
  print("Christmas Eve")
elif d = 23:
  print("Christmas Eve Eve")
elif d = 22:
  print("Christmas Eve Eve Eve")