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

Fixed submission:
X = int(input())

for A in range(1000):
    for B in range(-500, 500):
        if A**5-B**5 == X:
            print(A, B)
            exit()

Buggy submission (verdict: Runtime Error):
X = int(input())

for A in range(100):
    for B in range(-50, 50):
        if A**5-B**5 == X:
            print(A, B)
			exit()
Problem p02696 (python)

Fixed submission:
import math
A, B, N = list(map(int, input().split()))
ans = 0
if B+1 < N:
    C = B+1
else:
    C = N
if B//A == 0:
    D = 1
elif B//A > 1:
  	D = B//A-1
else:
    D = B//A
for i in range(1, C+1, D):
    val = math.floor(A*i/B) - A*math.floor(i/B)
    #print("i", i, "val", val)
    ans = max(ans, val)

print(ans)

Buggy submission (verdict: Runtime Error):
import math
A, B, N = list(map(int, input().split()))
ans = 0
if B+1 < N:
    C = B+1
else:
    C = N
if B//A == 0:
    D = 1
elif B//A > 1:
  	D = B//A-0.1
else:
    D = B//A
for i in range(1, C+1, D):
    val = math.floor(A*i/B) - A*math.floor(i/B)
    #print("i", i, "val", val)
    ans = max(ans, val)

print(ans)

Buggy submission (verdict: Runtime Error):
import math
A, B, N = list(map(int, input().split()))
ans = 0
if B+1 < N:
    C = B+1
else:
    C = N
if B//A == 0:
    D = 1
else:
    D = B//A-1
for i in range(1, C+1, D):
    val = math.floor(A*i/B) - A*math.floor(i/B)
    #print("i", i, "val", val)
    ans = max(ans, val)

print(ans)

Buggy submission (verdict: Runtime Error):
import math
A, B, N = list(map(int, input().split()))
ans = 0
if B+1 < N:
    C = B+1
else:
    C = N
if B//A == 0:
    D = 1
else:
    D = B//A
for i in range(1, C+1, D-1):
    val = math.floor(A*i/B) - A*math.floor(i/B)
    #print("i", i, "val", val)
    ans = max(ans, val)

print(ans)
Problem p02705 (python)

Fixed submission:
import math
R = int(input())

print(2*math.pi*R)

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

if N < sum(A):
    print(-1)
else:
    print(N-sum(A))
Problem p02761 (python)

Fixed submission:

#C
N, M = list(map(int, input().split()))
ins = False
ans = [0]*N
ok = True
for i in range(M):
    s, c = list(map(int, input().split()))
    if N != 1 and s==1 and c==0:
        ok = False
    if ans[s-1]==0 or ans[s-1]==c:
        ans[s-1] = c
    else:
        ok = False
    if s == 1:
        ins = True
    else:
        ins = False
answer = []
if ok == True:
    for i in range(len(ans)):
        answer.append(str(ans[i]))
    #if N != 1 and ins==False:
    if N != 1 and answer[0]=='0':
        answer[0]='1'
    if N == 1 and M == 0:
        print(0)
    else:
        print(''.join(answer))
else:
    print('-1')

Buggy submission (verdict: Runtime Error):
ins = False
ans = [0]*N
ok = True
for i in range(M):
    s, c = list(map(int, input().split()))
    if N != 1 and s==1 and c==0:
        ok = False
    if ans[s-1]==0 or ans[s-1]==c:
        ans[s-1] = c
    else:
        ok = False
    if s == 1:
        ins = True
    else:
        ins = False
answer = []
if ok == True:
    for i in range(len(ans)):
        answer.append(str(ans[i]))
    if N != 1 and ins==False:
        answer[0]='1'
    if N == 1 and M == 0:
        print(0)
    else:
        print(''.join(answer))
else:
    print('-1')

Buggy submission (verdict: Runtime Error):
N, M = list(map(int, input().split()))
ins = True
ans = [0]*N
ok = True
for i in range(M):
    s, c = list(map(int, input().split()))
    if s==1 and c==0:
        ok = False
    if ans[s-1]==0 or ans[s-1]==c:
        ans[s-1] = c
    else:
        ok = False
    if s == 1:
        ins = True
    else:
        ins = False
answer = []
if ok == True:
    for i in range(len(ans)):
        answer.append(str(ans[i]))
    if ins==False:
        answer[0]=1
    print(''.join(answer))
else:
    print('-1')
Problem p02801 (python)

Fixed submission:
C = str(input())

alph = ['a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z']

for i, j in enumerate(alph):
  if C == j:
    print(alph[i+1])

Buggy submission (verdict: Runtime Error):
C = str(input())

alph = ['a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u

for i, j in enumerate(alph):
  if C == j:
    print(alph[i+1])

Buggy submission (verdict: Runtime Error):
C = str(input())

alph = ['a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u

for i, j in enumerate(alph):
  if C == j:
    print(alph[i+1])
Problem p02802 (python)

Fixed submission:

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

isAC = [0] * (N+1)
isWA = [0] * (N+1)

ACnum = 0
WAnum = 0

for _ in range(M):
    p, s = input().split()
    p = int(p)

    if isAC[p] == 1: continue
    if s == 'AC':
        isAC[p] = 1
        ACnum += 1
        WAnum += isWA[p]
    elif s == 'WA':
        isWA[p] += 1

print("%d %d"%(ACnum, WAnum))

Buggy submission (verdict: Runtime Error):
N, M = list(map(int, input().split()))
P = []
S = []


def f(s):
  lst = s.split()
  return int(lst[0]),lst[1]

for i in range(M):
  p, s = f(input())
  P.append(p)
  S.append(s)

correct = 0
penalty = 0
q = []
p = []

for i, j in enumerate(S):
  if 'AC' in j:
    if P[i] not in q:
      q.append(P[i])
      correct += 1
    else:
      continue
  if 'WA' in j:
    p.append(P[i])
    if P[i] not in q:
        penalty += 1
    else:
      continue
    if S(P.index(P[i])) == 'AC':
      prenalty -= 1

'''
for i in range(len(p)):
  if p[i] not in q:
    penalty -= 1
'''

print(correct, penalty)

Buggy submission (verdict: Runtime Error):
N, M = list(map(int, input().split()))
P = []
S = []

def f(s):
  lst = s.split()
  return int(lst[0]),lst[1]



for i in range(M):
  p, s = f(input())
  P.append(p)
  S.append(s)

correct = 0
penalty = 0
q = []

for i, j in enumerate(S):
  if 'AC' in j:
    if P[i] not in q:
      q.append(P[i])
      relate.append(P[i])
      correct += 1
    else:
      continue
  if 'WA' in j:
    if P[i] not in q:
        penalty += 1
    else:
      continue

for i, j in enumerate(S):
  if 'WA' in j:
    if P[i] not in P:
      penalty -= 1

print(correct, penalty)

Buggy submission (verdict: Runtime Error):
N, M = list(map(int, input().split()))
P = []
S = []

def f(s):
  lst = s.split()
  return int(lst[0]),lst[1]



for i in range(M):
  p, s = f(input())
  P.append(p)
  S.append(s)

correct = 0
penalty = 0
q = []
relate = []

for i, j in enumerate(S):
  if 'AC' in j:
    if P[i] not in q:
      q.append(P[i])
      relate.append(P[i])
      correct += 1
    else:
      relate.append(P[i])
      continue
  if 'WA' in j:
    if P[i] not in q:
        penalty += 1
    else:
      continue

for i, j in enumerate(S):
  if 'WA' in j:
    if P[i] not in relate:
      peanlty -= 1

print(correct, penalty)
Problem p02812 (python)

Fixed submission:
N = int(input())
S = str(input())

cnt = 0

for i in range(0,len(S)-2):
  if S[i]  == 'A' and  S[i+1] == 'B' and S[i+2] == 'C':
   cnt += 1


print(cnt)

Buggy submission (verdict: Runtime Error):
N = int(input())
S = str(input())

cnt = 0

for i in range(0,len(S)):
  if S[i]  == 'A' and  S[i+1] == 'B' and S[i+2] == 'C':
   cnt += 1


print(cnt)

Buggy submission (verdict: Runtime Error):
N = int(input())
S = str(input())

cnt = 0

for i in range(0,len(S):
  if S[i]  == 'A' and  S[i+1] == 'B' and S[i+2] == 'C':
   cnt += 1


print(cnt)
Problem p02885 (python)

Fixed submission:
a,b=list(map(int,input().split()))
s=a-2*b
if s<=0:
    print(0)
else:
    print(s)

Buggy submission (verdict: Runtime Error):
,b=list(map(int,input().split()))
s=a-2*b
if s<=0:
    print(0)
else:
    print(s)
Problem p02900 (python)

Fixed submission:
from fractions import gcd

def solve(string):
    a, b = map(int, string.split())
    g = gcd(a, b)
    ans = 1 if g % 2 else 2
    while g % 2 == 0:
        g //= 2
    for i in range(3, int(g**0.5) + 1, 2):
        if g % i == 0:
            ans += 1
        while g % i == 0:
            g //= i
    return str(ans + 1) if g > 1 else str(ans)

if __name__ == '__main__':
    print(solve(input()))

Buggy submission (verdict: Runtime Error):
from fractions import gcd
import math
def solve(string):
    a, b = map(int, string.split())
    g = math.gcd(a, b)
    ans = 1 if g % 2 else 2
    while g % 2 == 0:
        g //= 2
    for i in range(3, int(g**0.5) + 1, 2):
        if g % i == 0:
            ans += 1
        while g % i == 0:
            g //= i
    return str(ans + 1) if g > 1 else str(ans)

if __name__ == '__main__':
    print(solve(input()))
Problem p02743 (python)

Fixed submission:
from decimal import Decimal
from sys import stdin
 
 
def get_result(data):
    A, B, C = data
    r_a = Decimal(A**Decimal(0.5))
    r_b = Decimal(B**Decimal(0.5))
    r_c = Decimal(C**Decimal(0.5))
    return 'Yes' if r_a + r_b < r_c else 'No'
 
 
if __name__ == '__main__':
    data = stdin.readline().rstrip().split(' ')
    data = list(map(int, data))
    result = get_result(data)
    print(result)

Buggy submission (verdict: Runtime Error):
import math
from decimal import Decimal
from sys import stdin


def get_result(data):
    A, B, C = data
    r_a = Decimal(A**0.5)
    r_b = Decimal(B**0.5)
    r_c = Decimal(C**0.5)
    return 'Yes' if r_a + r_b < r_c 'No'


if __name__ == '__main__':
    data = stdin.readline().rstrip().split(' ')
    data = list(map(int, data))
    result = get_result(data)
    print(result)
Problem p02778 (python)

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

Buggy submission (verdict: Runtime Error):
s = input().rstrip()
2 print('x' * len(s))

Buggy submission (verdict: Runtime Error):
s = input().rstrip()
2 print('x' * len(s))
Problem p02780 (python)

Fixed submission:
from sys import stdin


def get_result(data):
    N, K = data[0]
    A = data[1]
    e_val = [(1 + val) / 2 for val in A]

    # 累積和を算出 (最初は0)
    e_cumsum = [0]
    for i in range(N):
      e_cumsum.append(e_cumsum[i] + e_val[i])

    # 隣接するK個の部分和を取得
    e_sum_k = []
    for i in range(N+1-K):
      e_sum_k.append(e_cumsum[i+K] - e_cumsum[i])

    return max(e_sum_k)

if __name__ == '__main__':
    raw_data = [val.rstrip('\n') for val in stdin.readlines()]
    data = [list(map(int, val.split(' '))) for val in raw_data]
    result = get_result(data)
    print(result)

Buggy submission (verdict: Runtime Error):
from sys import stdin


def get_result(data):
    N, K = data[0]
    A = data[1]
    e_val = [(1 + val) / 2 for val in A]

    # 累積和を算出 (最初は0)
    e_cumsum = [0]
    for i in range(N):
      e_cumsum.append(e_cumsum[i] + e_val[i])

    # 隣接するK個の部分和を取得
    e_sum_k = []
    for i in range(N-K):
      e_sum_k.append(e_cumsum[i+K] - e_cumsum[i])

    return max(e_sum_k)

if __name__ == '__main__':
    raw_data = [val.rstrip('\n') for val in stdin.readlines()]
    data = [list(map(int, val.split(' '))) for val in raw_data]
    result = get_result(data)
    print(result)
Problem p02783 (python)

Fixed submission:
# Enter your code here. Read input from STDIN. Print output to STDOUT

import numpy as np
from sys import stdin


def get_result(data):
    remainder = data[0] % data[1]
    quotient = data[0] // data[1]
    return quotient if remainder == 0 else quotient + 1

if __name__ == '__main__':
    data = list(map(int, stdin.readline().split(' ')))
    result = get_result(data)
    print(result)

Buggy submission (verdict: Runtime Error):
import numpy as np
from sys import stdin


## This code doesn't pass the test
# def get_result(data):
#     H, N = data[0]
#     A_and_B = np.array(data[1:])
#     calc_efficient = np.array(list(map(lambda x: float(x[0] / x[1]), A_and_B)))
#     sorted_index = np.argsort(-calc_efficient)

#     cost = 0
#     remainder_H = H
#     for i in sorted_index:
#         A, B = A_and_B[i]
#         quotient = remainder_H // A
#         if quotient > 0:
#             cost += B * quotient
#             remainder_H = remainder_H - A * quotient
#         else:
#             if remainder_H > 0:
#                 continue
#             else:
#                 break

#     return cost

## 答え (DP, ナップザック問題の典型らしい)
# 自分の解法は典型的なハマり方をしたっぽい

def get_result(data):
    # 初期化
    H, N = data[0]
    A_and_B = np.array(data[1:])
    A = A_and_B[:, 0].reshape(-1)
    B = A_and_B[:, 1].reshape(-1)

    # 最小化問題だから無限で初期化
    # DP[j] = Aの和が j の時の最小コスト (魔力)
    # 計算量は、O(NH)なのでHが少なくなるようにテーブルは作る
    inf = float("inf")
    # N × H (制約条件) のテーブルを作成
    dp =[inf for j in range(H+1)]
    # 初期値
    dp[0] = 0

    # DP (コードはなんとなく理解できた)
    for i in range(H):
        for j in range(N):
            # 魔力1つずつについてloopさせる
            if (i+1) - A[j] < 0:
                dp[i+1] = min(dp[i+1], dp[0] + B[j])
            else:
                dp[i+1] = min(dp[i+1], dp[i+1-A[j]] + B[j])

    return dp[H]

if __name__ == '__main__':
    raw_data = [val.rstrip('\n') for val in stdin.readlines()]
    data = [list(map(int, val.split(' '))) for val in raw_data]
    result = get_result(data)
    print(result)
Problem p02921 (python)

Fixed submission:
S = input()
T = input()
cnt = 0

for i in range(3):
    if S[i] == T[i]:
        cnt += 1

print(cnt)

Buggy submission (verdict: Runtime Error):
S = input()
T = input()
cnt = 0

if S[0] === T[0]:
    cnt += 1

if S[1] === T[1]:
    cnt += 1

if S[2] === T[2]:
    cnt += 1

print(cnt)
Problem p02988 (python)

Fixed submission:
n = int(input())
l = [int(i) for i in input().split()]
cnt = 0
for i in range(1,n-1):
    three = [l[i-1],l[i],l[i+1]]
    three_sort_list = sorted(three)
    if three[1] == three_sort_list[1]:
        cnt += 1

print(cnt)

Buggy submission (verdict: Runtime Error):
n = int(input())
l = list(input)
cnt = 0
for i in range(1,n):
    three = [l[i-1],l[i],l[i+1]]
    three.sort()
    if three[1] == list[i]:
        cnt += 1

print(cnt)
Problem p03029 (python)

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

kakera = 3 * a + p
pie = kakera // 2
print(pie)

Buggy submission (verdict: Runtime Error):
a, p = map(int, input().suplit())

kakera = 3 * a + p
pie = kakera // 2
print(pie)
Problem p03035 (python)

Fixed submission:
age, price = map(int, input().split())
ans = 0

if age <= 5:
    ans = 0
elif age >= 6 and age <= 12:
    ans = price // 2
else:
    ans = price 

print(ans)

Buggy submission (verdict: Runtime Error):
r, d, x = map(int, input().split())

for i in range(10):
    ans = x * r - d
    print(ans)
    x = ans

Buggy submission (verdict: Runtime Error):
r, d, x = map(int, input().split())

for i range (10):
    ans = x * r - d
    print(ans)
    x = ans
Problem p03086 (python)

Fixed submission:
s = input()
n = len(s)
ans = 0
for i in range(n):
    for j in range(i, n):
        if all('ACGT'.count(c) == 1 for c in s[i : j + 1]):
            ans = max(ans, j-i+1)
print(ans)

Buggy submission (verdict: Runtime Error):
s = input()
n = len(s)
ans = 0
for i in range(n):
    for j in range(i, n):
        if all('ACGT'.count(c) == 1 for c in s[i + j +1]):
            ans = max(ans, j-i+1)
print(ans)

Buggy submission (verdict: Runtime Error):
s = input()
n = len(s)
ans = 0
for i in range(n):
    for j in range(i, n):
        if all('ACGT'.count(c) == 1 for c in s[i + j +1]):
            ans = max(ans, j-i+1)
print(ans)
Problem p03110 (python)

Fixed submission:
N = int(input())
ans = 0
for i in range(N):
    x,u = input().split()
    x = float(x)

    if u == 'JPY':
        ans += x
    else:
        ans += (x*380000)
print(ans)

Buggy submission (verdict: Runtime Error):
N = int(input())
ans = 0
for i in range(N):
    x,u = input().split()
    x = float(x)

    if u == 'JPY':
        ans += x
    else:
        ans += (x**380000)
print(ans)
Problem p03210 (python)

Fixed submission:
X = int(input())

if(X == 3):
    print("YES")
elif(X == 5):
    print("YES")
elif(X == 7):
    print("YES")
else:
    print("NO")

Buggy submission (verdict: Runtime Error):
S = input()
l = []
for i in range(len(S) - 2):
    num = abs(int(S[i:i+3]) - 753)
    l.append(num)
print(min(l))
Problem p03211 (python)

Fixed submission:
S = input()
l = []
for i in range(len(S) - 2):
    num = abs(int(S[i:i+3]) - 753)
    l.append(num)
print(min(l))

Buggy submission (verdict: Runtime Error):
S = input()
l = []
for i in range(len(S) - 2):
    num = abs(int(S[i + i+3] - 753))
    l.append(num)
print(min(l))
Problem p03212 (python)

Fixed submission:
N = int(input())

def dfs(s):
#文字列sで始まる七五三数の個数
    if int(s) > N:
        return 0
    #s自体が七五三数なら+1
    ret = 1 if all(s.count(c) > 0 for c in '753') else 0
    for c in '753':
        ret += dfs(s + c)
    return ret

print(dfs('0'))

Buggy submission (verdict: Runtime Error):
N = int(input)

def dfs(s):
#文字列sで始まる七五三数の個数
    if int(s) > N:
        return 0
    #s自体が七五三数なら+1
    ret = 1 if all(s.count(c) > 0 for c in '753') else 0
    for c in '753':
        ret += dfs(s + c)
    return ret

print(dfs('0'))
Problem p03238 (python)

Fixed submission:
N = int(input())


if N == 1:
    print("Hello World")
else:
    A = int(input())
    B = int(input())
    print(A + B)

Buggy submission (verdict: Runtime Error):
N = int(input())
A = int(input())
B = int(input())

if N == 1:
    print("Hello World")
else:
    print(A + B)
Problem p03239 (python)

Fixed submission:
N,T = map(int, input().split())
min_cost = 1001

for i in range(N):
    c,t = map(int, (input().split()))
    if t <= T:
        if c < min_cost:
            min_cost = c

if min_cost == 1001:
    print('TLE')
else:
    print(min_cost)

Buggy submission (verdict: Runtime Error):
N,T = int(input())
min_cost = 1001

for i in range(N):
    l = input()
    if l[1] <= T:
        if l[0] < min_cost:
            min_cost = l[0]

if min_cost = 1001:
    print('TLE')
else:
    print(min_cost)
Problem p03261 (python)

Fixed submission:
N = int(input())

l = []
for i in range(N):
    l.append(input())

#重複チェック
if len(set(l)) != N:
    print("No")
    exit()

#しりとりチェック
for i in range(N-1):
    if l[i][-1] != l[i+1][0]:
        print("No")
        exit()

print("Yes")

Buggy submission (verdict: Runtime Error):
N = int(input())

l = []
for i in range(N):
    l.append(input())

#重複チェック
if len(set(l)) != n:
    print("No")
    exit()

#しりとりチェック
for i in range(n-1):
    if l[i][-1] != l[i+1][0]:
        print("No")
        exit()

print("Yes")
Problem p03280 (python)

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

print((A-1) * (B-1))

Buggy submission (verdict: Runtime Error):
N = int(input())
ans = 0

#奇数判定
for i in range(1, N+1, 2):
    cnt = 0
    #約数判定
    for j in range(1, i+1):
        if j % i == 0:
            cnt += 1
        
    if cnt == 8:
        ans += 1

print(ans)

Buggy submission (verdict: Runtime Error):
N = int(input())
ans = 0

#奇数判定
for i in range(1, N+1, 2):
    cnt = 0
    #約数判定
    for j in range(1, i+1):
        if j % i == 0:
            cnt += 1
        if cnt == 8:
            ans += 1

print(ans)
Problem p03292 (python)

Fixed submission:
A,B,C = map(int, input().split())
num_list = [A,B,C]
num_sorted_list = sorted(num_list)
print(num_sorted_list[1]-num_sorted_list[0] + num_sorted_list[2]-num_sorted_list[1])

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

for i in range(len(S)-1):
    if S == T:
        print('Yes')
        exit()
    x = S[-1]
    S = list(S)
    S.pop(-1)
    S.insert(0,x)
    S = ''.join(S)


print('No')

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

for i in range(len(S)-1):
    x = S[-1]
    S = list(S)
    S.pop(-1)
    S.insert(0,x)
    S = ''.join(S)
    if S == T:
        print('Yes')
        exit()

print('No')
Problem p03407 (python)

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

if A + B >= C:
    print('Yes')
else:
    print('No')

Buggy submission (verdict: Runtime Error):
A,B,C = map(int,input())

if A + B >= C:
    print('Yes')
else:
    print('No')

Buggy submission (verdict: Runtime Error):
A,B,C = map(int,(input()))

if A + B >= C:
    print('Yes')
else:
    print('No')

Buggy submission (verdict: Runtime Error):
A,B,C = map(int(input()))

if A + B >= C:
    print('Yes')
else:
    print('No')
Problem p03415 (python)

Fixed submission:
c1 = input()
c2 = input()
c3 = input()
print(c1[0] + c2[1] + c3[2])

Buggy submission (verdict: Runtime Error):
c11,c12,c13 = map(int,input().split())
c21,c22,c23 = map(int,input().split())
c31,c32,c33 = map(int,input().split())
print(str(c11) + str(c22) + str(c33))

Buggy submission (verdict: Runtime Error):
c11,c12,c13 = map(int,input().split())
c21,c22,c23 = map(int,input().split())
c31,c32,c33 = map(int,input().split())
print(c11 + c22 + c33)
Problem p03424 (python)

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

for i in range(len(S)-1):
    if S[i] == 'Y':
        print("Four")
        exit()
print("Three")

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

for i in range(len(S-1)):
    if S[i] == 'Y':
        print("Four")
        break
print("Three")
Problem p03478 (python)

Fixed submission:
n, a, b = map(int, input().split())
 
sum = 0
for i in range(n+1) :
    count = 0
    for num in str(i) :
        count += int(num)
 
    if (count >= a) and (count <= b) :
        sum += i
            
print(sum)

Buggy submission (verdict: Runtime Error):
N,A,B = map(int, input().split())
total = 0
for num in range(1,N):
    cnt = 0
    num_str = str(num)
    for i in num_str:
        cnt += int(i)
        if A <= cnt <= B:
            total += num_str

print(total)

Buggy submission (verdict: Runtime Error):
N,A,B = map(int, input().split())
l = []

for i in range(N):
    if i >= 10:
        keta_one = i //10
        keta_ten = i % 10
        sum = keta_one + keta_ten
    else:
        sum = i
    if 2 <= i <=5:
        l.append(i)
print(l)
print(sum(l))

Buggy submission (verdict: Runtime Error):
N,A,B = map(int, input().split())
ten_keta = N[:1]
one_keta = N[1:]
ans = 0

for i in range(N+1):
    if int(ten_keta) + int(one_keta) >= A and ten_keta + one_keta <= B:
        ans += i

print(ans)

Buggy submission (verdict: Runtime Error):
N,A,B = map(int, input().split())
ten_keta = int(N[0])
one_keta = int(N[1])
ans = 0

for i in range(N+1):
    if ten_keta + one_keta >= A and ten_keta + one_keta <= B:
        ans += i

print(ans)
Problem p03494 (python)

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

#A内のaすべてが偶数の場合
while all(a%2==0 for a in A):
    A = [a/2 for a in A]
    cnt += 1

print(cnt)

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

#A内のaすべてが偶数の場合
while all(a%2==0 for a in A):
    A = A // 2
    cnt += 1

print(cnt)
Problem p03502 (python)

Fixed submission:
N = int(input())

N_str = str(N)
N_keta = []
N_sum = 0

for i in range(len(N_str)):
    N_keta.append(int(N_str[i]))
N_sum = sum(N_keta)

if N % N_sum == 0:
    print('Yes')
else:
    print('No')

Buggy submission (verdict: Runtime Error):
N = int(input())

N_str = str(N)
N_keta = N_str[0] + N_str[1]
N_keta = int(N_keta)

if N_keta % N == 0:
    print('Yes')
else:
    print('No')
Problem p03598 (python)

Fixed submission:
N = int(input())
K = int(input())
l = [int(i) for i in input().split()]
zero_kyori = 0
K_kyori = 0
kyori_list = []

for i in range(N):
    zero_kyori = (l[i] - 0) * 2
    K_kyori = (abs(l[i] - K)) * 2
    kyori_list.append(min(zero_kyori, K_kyori))

print(sum(kyori_list))

Buggy submission (verdict: Runtime Error):
N = int(input())
K = int(input())
l = [int(input()) for i in range(N)]
zero_kyori = 0
K_kyori = 0
kyori_list = []

for i in range(N):
    zero_kyori = l[i] - 0
    K_kyori = abs(l[i] - 0)
    kyori_list.append(min(zero_kyori, K_kyori))

print(sum(kyori_list))
Problem p03605 (python)

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

if(N//10 == 9):
    ans = 'Yes'
if(N%10 == 9):
    ans ='Yes'
print(ans)

Buggy submission (verdict: Runtime Error):
N = int(input())
ans = 'No'

if(N//10 == 9):
    ans = 'Yes'
if(N%0 == 9):
    ans ='Yes'
Problem p03606 (python)

Fixed submission:
N = int(input())
ans = 0
for i in range(N):
    l,r = map(int, input().split())
    ans += r - l + 1
print(ans)

Buggy submission (verdict: Runtime Error):
N = int(input())
for i in range(N):
    l,r = map(int, input().split())
    ans += r - l + 1
print(ans)