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

Fixed submission:
N,M=map(int,input().split())
A=list(map(int,input().split()))
if(1 in A):
    if(4 in A):
        A.remove(4)
    if(9 in A):
        A.remove(9)
    if(6 in A):
        A.remove(6)
if(5 in A):
    if(3 in A):
        A.remove(3)
    if(2 in A):
        A.remove(2)
if(3 in A):
    if(2 in A):
        A.remove(2)
if(9 in A):
    if(6 in A):
        A.remove(6)
if(7 in A):
    if(9 in A):
        A.remove(9)
    if(6 in A):
        A.remove(6)
num=[0,2,5,5,4,5,6,3,7,6]
dp=[0]
keta=[0]
tmp=0
tmp1=0
tmp_keta=-1
tmp1_keta=-1
for i in range(1,N+1):
    tmp=-1
    tmp_keta=-1
    for j in A:
        tmp1=-1
        tmp1_keta=-1
        if(i-num[j]>=0):
            if(dp[i-num[j]]>0):
                tmp1=dp[i-num[j]]+j*(10**keta[i-num[j]])
                tmp1_keta=keta[i-num[j]]+1
            elif(dp[i-num[j]]==0):
                tmp1=j
                tmp1_keta=1

            if(tmp1>tmp):
                tmp=tmp1
                tmp_keta=tmp1_keta
                
    dp.append(tmp)
    keta.append(tmp_keta)
print(dp[N])

Buggy submission (verdict: Runtime Error):
ort math

N,M=map(int,input().split())
A=list(map(int,input().split()))
A.sort(reverse=True)
num=[0,2,5,5,4,5,6,3,7,6]
dp=[0]
keta=[0]
tmp=0
tmp1=0
tmp_keta=-1
tmp1_keta=-1
for i in range(1,N+1):
    tmp=-100000000000000000000
    tmp_keta=-1
    for j in A:
        tmp1=-100000000000000000000
        tmp1_keta=-1
        if(i-num[j]>=0):
            if(dp[i-num[j]]!=0):
                tmp1=dp[i-num[j]]+j*(10**keta[i-num[j]])
                tmp1_keta=keta[i-num[j]]+1
            else:
                tmp1=j
                tmp1_keta=1
            if(tmp1>tmp):
                tmp=tmp1
                tmp_keta=tmp1_keta
    dp.append(tmp)
    keta.append(tmp_keta)
ans=dp[N]
print(ans)
Problem p02687 (python)

Fixed submission:
s = input()
if(s[1]=='B'): print('ARC')
else: print('ABC')

Buggy submission (verdict: Runtime Error):
s = intput()
if(s[1]=='B'): print('ARC')
else: print('ABC')
Problem p02717 (python)

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

print(c,a,b)

Buggy submission (verdict: Runtime Error):
a,b,c = map(int, input())

print(c,a,b)

Buggy submission (verdict: Runtime Error):

a,b,c=map(int, input())
print(c,a,b)
Problem p02718 (python)

Fixed submission:
n,m = map(int,input().split())
 
a = [ int(x) for x in input().split()]
limit = sum(a)/(4*m)
 
count=0
for x in a:
  	if(x>=limit):
      			count+=1
if(count<m):
  	print('No')
else:
  	print('Yes')

Buggy submission (verdict: Runtime Error):
n,m = map(int,input().split())
 
a = [ int(x) for x in input().split()]
limit = sum(a)//(4*m)
 
count=0
for x in a:
  	if(x>=limit):
      	count+=1
if(count<m):
  	print('No')
else:
  	print('Yes')

Buggy submission (verdict: Runtime Error):
sfhgfh
Problem p02705 (python)

Fixed submission:
import math
x = math.pi
a=input()
n = int(a)
print(2*n*x)

Buggy submission (verdict: Runtime Error):
import math
x = math.pi
a=input()
n = int(a)
print(2＊n*x)
Problem p02687 (python)

Fixed submission:
S=input()
if S=="ABC":
  print("ARC")
else:
  print("ABC")

Buggy submission (verdict: Runtime Error):
S=input()
if S=="ABC":
  print("ARC")
if S=="ARC"
  print("ABC")
Problem p02706 (python)

Fixed submission:
N, M = map(int, input().split())
A = list(map(int, input().split()))
sum=0
for i in range(M):
    sum+=A[i]
if N-sum<0:
    print(-1)
else:
    print(N-sum)

Buggy submission (verdict: Runtime Error):
N,M= int(input())
A = list(map(int, input().split()))
sum=0
for i in range(M):
    sum+=A[i]
if N-sum<0:
    print(-1)
else:
    print(N-sum)

Buggy submission (verdict: Runtime Error):
N,M= int(input())
A = list(map(int, input().split()))
sum=0
for i in range(M)
    sum+=A[i]
if N-sum<0:    
    print(-1)
else:
    print(N-sum)
Problem p02730 (python)

Fixed submission:
s = input()
if s == s[::-1]:
    flag = True
else:
    flag = False
N = len(s)
if flag:
    new = s[0:int((N-1)/2)]
    if new == new[::-1]:
        flag = True
    else: flag = False

if flag:
    new = s[int((N+2)/2):N]
    if new == new[::-1]:
        flag = True
    else:
        flag = False

if flag:
    print("Yes")
else:
    print("No")

Buggy submission (verdict: Runtime Error):
S = input()
S=str(S)
N = len(S)
temp = S[0:(N-1)/2]
temp2 = S[(N+2)/2:N]
print("Yes") if temp == temp[::-1] and temp2 == temp2[::-1] else "No"

Buggy submission (verdict: Runtime Error):
S = input()
N = len(str(S))
temp = S[0:(N-1)/2]
temp2 = S[(N+2)/2:N]
print("Yes") if temp == temp[::-1] and temp2 == temp2[::-1] else "No"

Buggy submission (verdict: Runtime Error):
S = input()
N = len(S)
temp = S[0:(N-1)/2]
temp2 = S[(N+2)/2:N]
print("Yes") if temp == temp[::-1] and temp2 == temp2[::-1] else "No"
Problem p03470 (python)

Fixed submission:
N = int(input())
d = [input() for i in range(N)]
print(len(set(d)))

Buggy submission (verdict: Runtime Error):
N = int(input())
d = [input().split() for i in range(N)]
print(len(set(d)))
Problem p03478 (python)

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

Buggy submission (verdict: Runtime Error):
n, a, b = map(int, input().split())
cnt = 0
for i in range(1, N+1):
    if a <= sum(list(map(int, str(i)))) <= b:
        cnt += i
print(cnt)
Problem p03494 (python)

Fixed submission:
n = input()
a = list(map(int, input().split()))
cnt = 0
while all(i%2==0 for i in a):
    a = [i/2 for i in a]
    cnt += 1
print(cnt)

Buggy submission (verdict: Runtime Error):
a = list(map(input().split()))
cnt = 0

while all(i%2==0 for i in a):
         a = [i/2 for i in a]
         cnt += 1
         print(cnt)

Buggy submission (verdict: Runtime Error):
a = list(map(input().split())
cnt = 0

while all(i%2==0 for i in a):
         a = [i/2 for i in a]
         cnt += 1
         print(cnt)

Buggy submission (verdict: Runtime Error):
a = list(map(input().split())
cnt = 0

while all(i%2==0 for i in a):
         a = [i/2 for i in a]
         cnt += 1
         print(cnt)
Problem p02690 (python)

Fixed submission:
def hoge():
    X = int(input())
    for a in range(0,int(X**(1/5))+1):
        for b in range(0,a+1):
            if a**5+b**5 == X:
                return (a,-b)
    for a in range(int(X**(1/5)),10**9):
        for b in range(0,a+1):
            if a**5-b**5 == X:
                return (a,b)


result = hoge()
print(result[0], result[1])

Buggy submission (verdict: Runtime Error):
def hoge():
    X = int(input())
    for a in range(0,int(X**(1/5))+1):
        for b in range(0,a):
            #print(a,b)
            if a**5+b**5 == X:
                return (a,-b)
            elif a**5 - b**5 ==X:
                return (a,b)


result = hoge()
print(result[0], result[1])
Problem p02789 (python)

Fixed submission:
# -*- coding: utf-8 -*-
# スペース区切りの整数の入力
N, M = map(int, input().split())
if N == M:
    print("Yes")
else:
    print("No")

Buggy submission (verdict: Runtime Error):
-*- coding: utf-8 -*-
# 整数の入力
a = int(input()) #1
# スペース区切りの整数の入力
b, c = map(int, input().split()) #2 3
# 文字列の入力
s = input()
# 出力
#print("{} {}".format(a+b+c, s))
print(str(a+b+c) + " " + s)
Problem p02696 (python)

Fixed submission:
import sys
import math

lines = sys.stdin.readlines()

X = lines[0].split(' ')
A = int(X[0])
B = int(X[1])
N = int(X[2])

m = A // B
j = A % B

if N >=B-1:
    print(max(0,m*(B-1)-1+j))
else:
    k = B-N
    print(max(0,j+m*N-math.ceil(j*k/B)))

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

lines = sys.stdin.readlines()

X = lines[0].split(' ')
A = int(X[0])
B = int(X[1])
N = int(X[2])

m = A // B
j = A % B

if N >=B-1:
    print(m*(B-1)-1+j)
else:
    k = B-N
    print(max(0,j+m*N-math.ceil(j*k/B))
Problem p02717 (python)

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

Buggy submission (verdict: Runtime Error):
A B C=map(int,input().split())
print(C,A,B)
Problem p04043 (python)

Fixed submission:
hoge = list(map(int, input().split()))
huga = sorted(hoge)
if huga == [5,5,7]:
  print("YES")
else:
  print("NO")

Buggy submission (verdict: Runtime Error):
hoge = list(map(int, input().split()))
huga = sorted(hoge)
if huga == [5,5,7]:
  print("YES")
elif:
  print("NO")

Buggy submission (verdict: Runtime Error):
hoge = list(map(int, input().split()))
huga = hoge.sort()
if huga == [5,5,7]:
  print("YES")
elif:
  print("NO")
Problem p02708 (python)

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

total = 0
mod = 10**9+7
s = [0]
for i in range(0, N+1):
    s.append(s[-1] + i)

for i in range(K, N+2):
    total = (total + ((s[-1]-s[-(i+1)]) - s[i] + 1)) % mod
print(total)

Buggy submission (verdict: Runtime Error):
import math.fact
N, K = map(int, input().split())

def combination_mod(n, r, mod):
    if (r < 0) or (n < r):
        return 0
    r = min(r, n-r)
    return fact[n] * factinv[r] * factinv[n-r] % mod

mod = 10**9+7
fact = [1, 1]
factinv = [0, 1]
inv = [0, 1]
total = 0

for i in range(2, N+1):
    fact.append((fact[-1] * i) % mod)
    inv.append((-inv[mod % i] * (mod // i)) % mod)
    factinv.append((factinv[-1] * inv[-1]) % mod)

for i in range(K, N+1):
    total += combination_mod(N, i, mod) % mod

print(total)
Problem p03079 (python)

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

if a == b and b == c:
    print("Yes")
else:
    print("No")

Buggy submission (verdict: Runtime Error):
a=int(input())
b=int(input())
c=int(input())

if a == b and b == c:
    print("Yes")
else:
    print("No")
Problem p02780 (python)

Fixed submission:
import numpy as np
N,K = map(int, input().split())
p = [(int(i)+1)/2 for i in input().split()]
s = [0]*N
s[0] = p[0]
if N==K:
    print(sum(p))
else:
    for i in range(N-1):
        s[i+1] = s[i]+p[i+1]
    ans=max(s[i+K]-s[i] for i in range(N-K))
    print(ans)

Buggy submission (verdict: Runtime Error):
import numpy as np
def main():
N,K = map(int, input().split())
p = np.array(list(map(int,input().split())))
p = (p+1)/2
ans = 0.0
for i in range(N-K+1):
    buf = sum(p[i:i+K])
    if ans < buf:
        ans = buf
print(ans)

if __name__ == '__main__':
    main()

Buggy submission (verdict: Runtime Error):
import numpy as np
N,K = map(int, input().split())
p = np.array(list(map(int,input().split())))
p = (p+1)/2
sorted_p = np.sort(p)[::-1]
ans = sum(sorted_p[0:K])
print(ans)

Buggy submission (verdict: Runtime Error):
import numpy as np
N,K = map(int, input().split())
p = np.array(list(map(int,input().split())))
p = (p+1)/2
ans = 0.0
for i in range(N-K+1):
    buf = sum(p[i:i+K])
    if ans < buf:
        ans = buf
print(ans)
Problem p02924 (python)

Fixed submission:
N = int(input())

print(N*(N-1)//2)

Buggy submission (verdict: Runtime Error):
import numpy as np
N = int(input())
narray = np.arange(1,N+1)
P = np.hstack((narray , narray))
ans = 0
A = []
for i in range(N):
  for l in range(N):
    ans += narray[l] % P[i+l]
  A.append(ans)
  ans = 0
print(max(A))
Problem p02690 (python)

Fixed submission:
res = {}
for i in range(-500, 500):
    for j in range(-500, 500):
        ans = i ** 5 - j ** 5
        res[ans] = (i, j)
n = int(input())
print(res[n][0], res[n][1])

Buggy submission (verdict: Runtime Error):
res = {}
for i in range(-100, 100):
    for j in range(-100, 100):
        ans = i ** 5 - j ** 5
        res[ans] = (i, j)
n = int(input())
print(res[n][0], res[n][1])
Problem p02705 (python)

Fixed submission:
r = int(input())
R = 2*3.1415*r
print(R)

Buggy submission (verdict: Runtime Error):
r = input()
R = 2*3.1415*r
print(R)
Problem p02731 (python)

Fixed submission:
a = int(input())
b=a/3
print(b**3)
exit()

Buggy submission (verdict: Runtime Error):
a=input()
b=a/3
print(b**3)
exit()

Buggy submission (verdict: Runtime Error):
a=input()
b=a/3
print(b**3)
exit(0)
Problem p02909 (python)

Fixed submission:
import sys
S = input()
a = "Sunny"
b = 'Cloudy'
c = 'Rainy'
if S == a:
    print(b)
elif S == b:
        print(c)
elif S == c:
        print(a)
else:
    sys.exit()
sys.exit()

Buggy submission (verdict: Runtime Error):
import sys
S = input()
a = "Sunny"
b = 'Cloudy'
c = 'Rainy'
if S == a:
    print(b)
elif S == b:
        print(c)
elif S == b:
        print(a)
else:
    sys.exit()
sys.exit()

Buggy submission (verdict: Runtime Error):
import sys
S = include()
a = "Sunny"
b = 'Cloudy'
c = 'Rainy'
if S == a:
    print(b)
elif S == b:
        print(c)
elif S == b:
        print(a)
else:
    sys.exit()
sys.exit()

Buggy submission (verdict: Runtime Error):
import sys
S = include()
a = "Sunny"
b = 'Cloudy'
c = 'Rainy'
if S == a:
    print(b)
elif S == b:
        print(c)
elif S == b:
        print(a)
else:
    sys.exit()
sys.e

Buggy submission (verdict: Runtime Error):
S = include()
a = "Sunny"
b = 'Cloudy'
c = 'Rainy'
if S == a:
    print(b)
elif S == b:
        print(c)
elif S == b:
        print(a)

Buggy submission (verdict: Runtime Error):
S = include()
a = "Sunny"
b = 'Cloudy'
c = 'Rainy'
if S == a:
    print(b)
elif S == b:
        print(c)
elif S == b:
        print(a)


exit()

Buggy submission (verdict: Runtime Error):
S = include()
a = "Sunny"
b = 'Cloudy'
c = 'Rainy'
if S == a:
    print(b)
elif S == b:
        print(c)
elif S == b:
        print(a)
else

exit()

Buggy submission (verdict: Runtime Error):
S = include()
a = "Sunny"
b = 'Cloudy'
c = 'Rainy'
if S == a:
    print(b)
    elif S == b:
        print(c)
    elif S == b:
        print(a)
else
exit()

Buggy submission (verdict: Runtime Error):
S = include()
a = "Sunny"
b = 'Cloudy'
c = 'Rainy'
if S == a:
    print('Cloudy')
    elif S == b:
        print('Rainy')
    elif S == b:
        print('Sunny')
else
exit()

Buggy submission (verdict: Runtime Error):
S = include()
if S == 'S':
    print('Cloudy')
    elif S == "C":
        print('Rainy')
    elif S =='R':
        print('Sunny')
else
exit()

Buggy submission (verdict: Runtime Error):
S = include()
if S == 'S':
    print('Cloudy')
    elif S == "C":
        print('Rainy')
    elif S =='R':
        print('Sunny')
else
exit()

Buggy submission (verdict: Runtime Error):
S = include()
if S == 'Sunny':
    print('Cloudy')
    elif S == "Cloudy":
        print('Rainy')
    elif S =='Rainy':
        print('Sunny')
else
exit()
Problem p02687 (python)

Fixed submission:
S = input()
 
if S == "ABC":
    print("ARC")
else:
    print("ABC")

Buggy submission (verdict: Runtime Error):
S = input()
 
if S = "ABC":
    print("ARC")
else:
    print("ABC")

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

if S = "ABC":
    print("ARC")
else:
    print("ABC")
Problem p02760 (python)

Fixed submission:
X = []
Y = []
Z = []
for i in range(3):
    x, y, z = map(int, input().split())
    X.append(x)
    Y.append(y)
    Z.append(z)
N = int(input())

b = list(map(int, [input() for i in range(N)]))

for i in range(N):
    
    if X[0] == b[i]:
        X[0] = 'OK'
    if X[1] == b[i]:
        X[1] = 'OK'
    if X[2] == b[i]:
        X[2] = 'OK'
    if Y[0] == b[i]:
        Y[0] = 'OK'
    if Y[1] == b[i]:
        Y[1] = 'OK'
    if Y[2] == b[i]:
        Y[2] = 'OK'
    if Z[0] == b[i]:
        Z[0] = 'OK'
    if Z[1] == b[i]:
        Z[1] = 'OK'
    if Z[2] == b[i]:
        Z[2] = 'OK'

if (X[0] == X[1] == X[2]
    or Y[0] == Y[1] == Y[2]
    or Z[0] == Z[1] == Z[2]
    or X[0] == Y[0] == Z[0]
    or X[1] == Y[1] == Z[1]
    or X[2] == Y[2] == Z[2]
    or X[0] == Y[1] == Z[2]
    or X[2] == Y[1] == Z[0]):
    print('Yes')
else:
    print('No')

Buggy submission (verdict: Runtime Error):
X = []
Y = []
Z = []
for i in range(3):
    x, y, z = map(str, input().split())
    X.append(x)
    Y.append(y)
    Z.append(z)
N = int(input())

b = map(str, [input() for i in range(N)])

for x in sorted(b, reverse=True):
    X = [s.replace(x, 'OK') for s in X]
    Y = [s.replace(x, 'OK') for s in Y]
    Z = [s.replace(x, 'OK') for s in Z]

if ('OK' in X[0] and 'OK' in X[1] and 'OK' in X[2]
    or 'OK' in Y[0] and 'OK' in Y[1] and 'OK' in Y[2]
    or 'OK' in Z[0] and 'OK' in Z[1] and 'OK' in Z[2]
    or 'OK' in X[0] and 'OK' in Y[0] and 'OK' in Z[0]
    or 'OK' in X[1] and 'OK, in Y[1] and 'OK' in Z[1]
    or 'OK' in X[2] and 'OK' in Y[2] and 'OK' in Z[2]
    or 'OK' in X[0] and 'OK' in Y[1] and 'OK' in Z[2]
    or 'OK' in X[2] and 'OK' in Y[1] and 'OK' in Z[0]):
    print('Yes')
else:
    print('No')
Problem p02923 (python)

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

cnts = 0
cnt = [0] * N
for i in range(1, N):
    if H[i-1] >= H[i]:
        cnts +=1
    else :
        cnts = 0
    cnt[i] = cnts

print(max(cnt))

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

cnt = [0] * N
for i in range(N):
    for j in range(i, N-i+2):
        if H[j] >= H[j+1]:
            cnt[i] +=1
        else:
            break

print(max(cnt))

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

cnt = [0] * N
for i in range(N):
    for j in range(i, N-i+1):
        if H[j] >= H[j+1]:
            cnt[i] +=1
        else:
            break

print(max(cnt))
Problem p02936 (python)

Fixed submission:
from collections import deque
 
# BFSで通す
N, Q = map(int, input().split())  # N頂点, Q個の命令
 
G = [[] for _ in range(N)]
count = [0]*N
for i in range(N-1):  # 辺はN-1本
    a, b = map(lambda x: int(x)-1, input().split())
    G[a].append(b)
    G[b].append(a)
 
for i in range(Q):  # Q個の操作について
    p, x = map(int, input().split())
    count[p-1] += x
 
q = deque([0])
flag = [False]*N
 
while len(q):
    v = q.pop()
    flag[v] = True
    for e in G[v]:  # vを親にもつノードについてループを回す
        if flag[e]:  # 頂点eに到達済みであれば
            continue
        count[e] += count[v]  # それぞれの子たちに親の値を伝播させる
        q.append(e)
 
print(*count)

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

v = [[] for i in range(n)] # []のn個配列
for i in range(n-1):
  a,b = map(int,input().split())
  a -= 1 # listのindex参照をそのまま使いたいので頂点id(1から始まっている)を-1しておく
  b -= 1 # aと同様
  v[a].append(b)
  v[b].append(a)

f = [0]*n
for i in range(q):
  p,x = map(int,input().split())
  p -= 1 # aと同様
  f[p] += x

def dfs(x,d,s): # x:計算する頂点（上側）, d:計算済み(0)か否か(1), s:頂点xの値
  for y in v[x]: # 頂点xとつながる各頂点yの計算を行う
    if d[y]: # 頂点yが計算未了の場合
      s += f[y] # 頂点xの値sに頂点yの値を足す
      ans[y] = s # 頂点yの値はsに確定
      d[y] = 0 # 頂点yの計算は終わったのでd[y]=0とする
      dfs(y,d,s) # 頂点yの下層についても再帰的に計算
      s -= f[y] # 頂点yの下層の計算が終わったので、sを頂点xの値に戻す

ans = [0]*n
d = [1]*n
d[0] = 0
ans[0] = f[0]
s = f[0]

dfs(0,d,s)
print(*ans) #ansの中身を展開
Problem p02947 (python)

Fixed submission:
N = int(input())
D = {}
for _ in range(N):
    S = "".join(sorted(input()))
    if S in D:
        D[S] += 1
    else:
        D[S] = 1

ans = 0
for v in D.values():
    ans += v * (v - 1) // 2

print(ans)

Buggy submission (verdict: Runtime Error):
N = int(input())
D = {}
for _ in range(N):
    S = "".join(sorted(input()))
    print("S",S)
    print("D",D)
    if S in D:
        D[S] += 1
    else:
        D[S] = 1

ans = 0
for v in D.values():
    ans += v * (v - 1) // 2

print(ans)

Buggy submission (verdict: Runtime Error):
N = int(input())
D = {}
for _ in range(N):
    S = "".join(sorted(input()))
    print("S",S)
    print("D",D)
    if S in D:
        D[S] += 1
    else:
        D[S] = 1

ans = 0
for v in D.values():
    ans += v * (v - 1) // 2

print(ans)
Problem p02687 (python)

Fixed submission:
def awc(s):
    print("ARC" if s == "ABC" else "ABC")

if __name__ == "__main__":
    import sys
    in_str = input()
    awc(in_str)

Buggy submission (verdict: Runtime Error):
def awc(s):
    print("ARC" if s == "ABC" else "ABC")

if __name__ == "__main__":
    import sys
    in_str = []
    for line in sys.stdin:
        in_str.append(line)
    awc(s)
Problem p02811 (python)

Fixed submission:
def ghke(k, x):
    print('Yes') if k * 500 >= x else print("No")

if __name__ == "__main__":
    import sys
    in_str = []
    for line in sys.stdin:
        in_str.append(line)
    k, x = [int(_) for _ in in_str[0].split(' ')]
    ghke(k, x)

Buggy submission (verdict: Runtime Error):
def ghke(k, x):
    return k * 500 >= x

if __name__ == "__main__":
    import sys
    in_str = []
    for line in sys.stdin:
        in_str.append(int(line))
    roundone([int(_) for _ in in_str[0].split()])
Problem p02841 (python)

Fixed submission:
def isLast(m1, d1, m2, d2):
  return m2 > m1
 
if __name__ == "__main__":
  import sys
  in_str = ''
  for line in sys.stdin:
    in_str += line
  m1, d1, m2, d2 = [int(_) for _ in in_str.split()]
  print(int(isLast(m1, d1, m2, d2)))

Buggy submission (verdict: Runtime Error):
def isLast(m1, d1, m2, d2):
  return m2 > m1

if __name__ == "__main__":
  import sys
  m1, d1, m2, d2 = [int(_) for _ in sys.argv[1:]]
  print(isLast(m1, d1, m2, d2))
Problem p02842 (python)

Fixed submission:
def beforeTax(n):
  li = int(n // 1.08)
  if int(li * 1.08) == n:
    print(li)
  elif int((li + 1) * 1.08) == n:
    print(li + 1)
  else:
  	print(':(')
 
if __name__ == "__main__":
  import sys
  in_str = ''
  for line in sys.stdin:
    in_str += line
  n = [int(_) for _ in in_str.split()][0]
  beforeTax(n)

Buggy submission (verdict: Runtime Error):
def beforeTax(n):
  li = int(n // 1.08)
  if int(li * 1.08) == n:
    print(li)
  if int((li + 1) * 1.08) == n:
    print(li + 1)
  print(':(')
 
if __name__ == "__main__":
  import sys
  in_str = ''
  for line in sys.stdin:
    in_str += line
  n = [int(_) for _ in in_str.split()]
  print(int(beforeTax(n)))
Problem p02694 (python)

Fixed submission:
import math
X = int((input() .split())[0])
Yokin = 100
Nen = 0

while X > Yokin:
	Yokin = math.floor(Yokin * 1.01)
	Nen = Nen + 1

print( Nen )

Buggy submission (verdict: Runtime Error):
import math
X = int(input() .split)
Yokin = 100
Nen = 0

while X > Yokin:
	Yokin = math.floor(Yokin * 1.01)
	Nen = Nen + 1

print( Nen )

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

import math

Yokin = 100
Nen = 0

while X > Yokin
	Yokin = math.floor(Yokin * 1.01)
	Nen = Nen + 1

print( Nen )
Problem p04001 (python)

Fixed submission:
s=list(input())
n=len(s)
if n == 1:
    print(int(s[0]))
else:    
    n2 = 2**(n-1)
    #print(n2)
    n3 = (n-1)*-1
    # if n2 = 1
    ans=0
    for i in range(n2):
        li = list(format(i,'010b'))
        li = li[n3:]
        #    print(li)
        tmpstr=s[0]
        tmpnum=0
        index = 0
        for j in li:
            #        print("ans",ans,"tmpstr",tmpstr,"tmpnum",tmpnum,"index",index)
            if j == '0':
                # string
                tmpstr=tmpstr+s[index+1]
            else:
                # plus
                if tmpstr =="":
                    tmpnum=0
                else:
                    tmpnum=int(tmpstr)
                    tmpstr=s[index+1]
                    ans=ans+tmpnum
            index += 1
        if tmpstr != "":
            #        print("ans",ans,"tmpstr",tmpstr)
            tmpnum=int(tmpstr)
            ans=ans+tmpnum
    print(ans)

Buggy submission (verdict: Runtime Error):
s=list(input())
n=len(s)
n2 = 2**(n-1)
n3 = (n-1)*-1
# if n2 = 1
ans=0
for i in range(n2):
    li = list(format(i,'010b'))
    li = li[n3:]
    #    print(li)
    tmpstr=s[0]
    tmpnum=0
    index = 0
    for j in li:
#        print("ans",ans,"tmpstr",tmpstr,"tmpnum",tmpnum,"index",index)
        if j == '0':
            # string
            tmpstr=tmpstr+s[index+1]
        else:
            # plus
            if tmpstr =="":
                tmpnum=0
            else:
                tmpnum=int(tmpstr)
            tmpstr=s[index+1]
            ans=ans+tmpnum
        index += 1
    if tmpstr != "":
#        print("ans",ans,"tmpstr",tmpstr)
        tmpnum=int(tmpstr)
        ans=ans+tmpnum
print(ans)
Problem p02687 (python)

Fixed submission:
S = input()
if S == 'ABC':
	print('ARC')
else:
	print('ABC')

Buggy submission (verdict: Runtime Error):
S = input()
if S = ABC:
	retrun ARC
else:
	retrun ABC