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

Fixed submission:
N,M = list(map(int,input().split()))
colect_quest = [0]*N
WA_quest = [0]*N
for i in range(M):
    pi,si = list(map(str,input().split()))
    pi = int(pi)
    if si == "AC":
        colect_quest[pi-1] = 1
    if si == "WA" and colect_quest[pi-1] != 1:
        WA_quest[pi-1] += 1
WA_count = 0
for i in range(len(WA_quest)):
    if colect_quest[i] == 1 :
        WA_count += WA_quest[i] 
print(sum(colect_quest),WA_count)

Buggy submission (verdict: Runtime Error):
N,M = list(map(int,input().split()))
colect_quest = [0]*N
WA_quest = [0]*N
for i in range(M):
    pi,si = list(map(str,input().split()))
    pi = int(pi)
    if si == "AC":
        colect_quest[pi] = 1
    if si == "WA" and colect_quest[pi] != 1:
        WA_quest[pi] += 1
    
print(sum(colect_quest),sum(WA_quest))
Problem p02600 (python)

Fixed submission:
point = int(input())

if 400 <= point <=599 :
    print("8")
elif 600<= point <= 799 :
    print("7")
elif 800 <= point <= 999 :
    print("6")
elif 1000 <= point <= 1199 :
    print("5")
elif 1200 <= point <= 1399 :
    print("4")
elif 1400 <= point <= 1599 :
    print("3")
elif 1600 <= point <= 1799 :
    print("2")
elif 1800 <= point <= 1999 :
    print("1")

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

if 400 <= point <=599 :
    print("8")
elif 600<= point <= 799 :
    print("7")
elif 800 <= point <= 999 :
    print("6")
elif 1000 <= point <= 1199 :
    print("5")
elif 1200 <= point <= 1399 :
    print("4")
elif 1400 <= point <= 1599 :
    print("3")
elif 1600 <= point <= 1799 :
    prin("2")
elif 1800 <= point <= 1999 :
    print("1")
Problem p02783 (python)

Fixed submission:
H, A = map(int,input().split())
a = int(H/A)
b = H/A
if a==b:
  print(a)
else:
  c = a+1
  print(c)

Buggy submission (verdict: Runtime Error):
N, K= map(int, input().split())
lists = list(map(int, input().split()))
lists.sort()
if K>=N:
  print(0)
else:
  if K==0:
    SUM = sum(lists)
    print(SUM)
  else:
      del lists[-K:]
      SUM = sum(lists)
      print(SUM)

Buggy submission (verdict: Runtime Error):
N, K= map(int, input().split())
lists = list(map(int, input().split()))
lists.sort()
if K>=N:
  print(0)
else:
  del lists[-K:]
  SUM = sum(lists)
  print(SUM)

Buggy submission (verdict: Runtime Error):
N, K= map(int, input().split())
lists = list(map(int, input().split()))
lists.sort()
if K>=N:
  print(0)
else:
  if K==0:
    print(SUM)
  else:
      del lists[-K:-1]
      SUM = sum(lists)
      print(SUM)

Buggy submission (verdict: Runtime Error):
N, K= map(int, input().split())
lists = list(map(int, input().split()))
lists.sort()
if K>=N:
  print(0)
else:
  del lists[-K:]
  SUM = sum(lists)
  print(SUM)

Buggy submission (verdict: Runtime Error):
H,N = map(int, input().split())
lists = list(map(int, input().split()))
lists.sort()
if N>=2:
  if lists[-2]+lists[-1]>=H:
    print('Yes')
  else:
    print('No')
else:
  if lists[0]>=H:
    print('Yes')
  else:
    print('No')

Buggy submission (verdict: Runtime Error):
H,N = map(int, input().split())
lists = list(map(int, input().split()))
lists.sort()
if N>=2:
  if lists[N-1]+lists[N-2]>=H:
    print('Yes')
  else:
    print('No')
else:
  if lists[0]>=H:
    print('Yes')
  else:
    print('No')

Buggy submission (verdict: Runtime Error):
H,N = map(int, input().split())
lists = list(map(int, input().split())
lists.sort()
if N>=2 and lists[N-1]+lists[N-2]>=H:
  print('Yes')
If N==1 and lists[0]>=H:
  print('Yes')
if N==1 and lists[0]<H:
  print('No')
else:
  print('No')

Buggy submission (verdict: Runtime Error):
H,N = map(int, input().split())
lists = [] 
lists.append(int, input().split())
lists = lists.sort()
if N>=2 and lists[N-1]+lists[N-2]>=H:
  print('Yes')
If N==1 and lists[0]>=H:
  print('Yes')
if N==1 and lists[0]<H:
  print('No')
else:
  print('No')
Problem p02784 (python)

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

Buggy submission (verdict: Runtime Error):
H,N = map(int, input().split())
lists = [] lists.append(int, input().split())
lists = lists.sort()
if N>=2 and lists[N-1]+lists[N-2]>=H:
  print('Yes')
If N==1 and lists[0]>=H:
  print('Yes')
if N==1 and lists[0]<H:
  print('No')
else:
  print('No')
Problem p02657 (python)

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

Buggy submission (verdict: Runtime Error):
a, b = int(input().split())
print(a*b)
Problem p02811 (python)

Fixed submission:
k, x = list(map(int, input().split()))
print('Yes') if k *500 >= x else print('No')

Buggy submission (verdict: Runtime Error):
k, x = list(map(int, input().split))
print('Yes') if k *500 <= x else print('No')
Problem p02646 (python)

Fixed submission:
import math

def a():
    s = input()
    print(s[:3])


def b():
    a, v = map(int, input().split())
    b, w = map(int, input().split())
    t = int(input())
    if v > w:
        if abs(a-b) / (v -w) <= t:
            print('YES')
        else:
            print('NO')
    else:
        print('NO')


def c():
    print('')



def d():
    print('')


b()

Buggy submission (verdict: Runtime Error):
import math

def a():
    s = input()
    print(s[:3])


def b():
    a, v = map(int, input().split())
    b, w = map(int, input().split())
    t = int(input())
    if v > w:
        if abs(a-b) / (v -w) <= t
            print('YES')
        else:
            print('NO')
    else:
        print('NO')


def c():
    print('')



def d():
    print('')


b()
Problem p02675 (python)

Fixed submission:
def a():
    n = int(input()) % 10
    if n == 2 or n == 4 or n == 5 or n == 7 or n == 9:
        print('hon')
    elif n == 3:
        print('bon')
    else:
        print('pon')




# def b():

# def c():
    

# def d():


a()

Buggy submission (verdict: Runtime Error):
def a():
    n = int(input()) % 10
    if n == 2 or n == 4 or n == 5 or n == 7 or n == 9:
        print('hon')
    elif n == 3:
        print('bon')
    else:
        print('pon')




def b():

def c():
    

# def d():


a()
Problem p02700 (python)

Fixed submission:
t, k, c, d = (int(x) for x in input().split())
while (t >= 0 or c >= 0):
  c = c - k
  if c <= 0:
    print("Yes")
    break
  t = t - d
  if t <= 0:
    print("No")
    break

Buggy submission (verdict: Runtime Error):
t, k, c, d = [int(x) for x in input().split()]
while (t >= 0 or c >= 0):
  c = c - k
  if c <= 0:
    print("Yes")
    break
  t = t - d
  if a <= 0:
    print("No")
    break

Buggy submission (verdict: Runtime Error):
t, k, c, d = (int(x) for x in input().split())
while (t >= 0 or c >= 0):
  c = c - k
  if c <= 0:
    print("Yes")
    break
  t = t - d
  if a <= 0:
    print("No")
    break
Problem p02675 (python)

Fixed submission:
N=input()
 
N=int(N[-1])
 
if N==3:
  print("bon")
elif N in [2,4,5,7,9]:
  print("hon")
else :
  print("pon")

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

N=int(N[-1])

if N==3:
  print("bon")
elif N in [1,2,4,5,7,9]:
  print("hon")
else N in [0,1,6,8]:
  print("pon")
Problem p02687 (python)

Fixed submission:
A=input()

if A=="ABC":
  print("ARC")
else:
  print("ABC")

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

if A="ABC":
  print("ARC")
else:
  print("ABC")
Problem p02748 (python)

Fixed submission:
#B
#入力
A,B,M=map(int,input().split())
a=list(map(int,input().split()))
b=list(map(int,input().split()))
d=[list(map(int,input().split())) for i in range(M)]

#処理
x=min(a)+min(b)

for i in d:
    t=a[i[0]-1]+b[i[1]-1]-i[2]
    if t<x:
        x=t
print(x)

Buggy submission (verdict: Runtime Error):
#B
#入力
A,B,M=map(int,input().split())
a=list(map(int,input().split()))
b=list(map(int,input().split()))
d=[list(map(int,input().split())) for i in range(M)]

#処理
x=min(a)+min(b)

for i in d:
    t=a[d[0]-1]+b[d[1]-1]-d[2]
    if t>x:
        x=t
print(x)
Problem p02755 (python)

Fixed submission:
#C
import math
#入力
A,B=map(int,input().split())

#処理
c=0
d=0
c=max([math.floor(A/0.08),math.floor(B/0.1)])
d=min([math.ceil((A+1)/0.08),math.ceil((B+1)/0.1)])
z=-1
for i in range(c,d+1):
    if math.floor(i*0.08)==A and math.floor(i*0.1)==B:
        z=i
        break
print(z)

Buggy submission (verdict: Runtime Error):
#C
import math
#入力
A,B=map(int,input().split())

#処理
c=0
d=0
c=max([math.floor(A/0.08),math.floor(B/0.1)])
d=min([math.ceil((A+1)/0.08),math.ceil((B+1)/0.1)])
x=-1
for i in range(c,d+1):
    if math.floor(i*0.08)==A and math.floor(i*0.1)==B:
        z=i
        break
print(z)

Buggy submission (verdict: Runtime Error):
#C
import math
#入力
A,B=map(int,input().split())

#処理
c=0
d=0
c=max([math.floor(A/0.08),math.floor(B/0.1)])
d=min([math.ceil((A+1)/0.08),math.ceil((B+1)/0.1)])
print(c,d)
x=-1
for i in range(c,d+1):
    if math.floor(i*0.08)==A and math.floor(i*0.1)==B:
        z=i
        break
print(z)
Problem p02780 (python)

Fixed submission:
#D
#モジュール
import numpy as np

#入力
N,K=map(int,input().split())
P=np.array(list(map(int,input().split())))

#諸関数
def pront(X):
    #デバッグ用プリント
    #環境変数としてdebugを確保して、それが1なら内容を出力
    if debug==0:
        print(X)

#デバッグ用
debug=1#0:本番,1:デバッグ中



#処理
pront(P)
#関数
def d_1(p):
    #1~pまででるサイコロの期待値を返す
    return((p+1)/2)
#ここまで

P=list(d_1(P))

pront(P)

X=[0]
for i in range(N):
    if i==0:
        X.append(P[i])
    else:
        X.append(P[i]+X[-1])
result=-1
pront(X)
for i in range(N-K+1):
    cal=X[i+K]-X[i]
    if result<cal:
        result=cal
print(result)

Buggy submission (verdict: Runtime Error):
#D
#　モジュール
import numpy as np
#入力
N,K=map(int,input().split())
P=list(map(int,input().split()))

#処理
#内部関数
def d_1(x):
    t=0
    for i in range(1,x+1):
        t+=i/x
        
    return t

P=np.array([ d_1(i) for i in P])#出る目を期待値に変換
S=np.zeros(K)
for i in range(K):
    S=S+P[i:i+K]
print(np.max(S))
Problem p03523 (python)

Fixed submission:
#1
#入力
S=input()


#処理
import re
m=re.fullmatch(r'A?KIHA?BA?RA?',S)

if m==None:
    print("NO")
else:
    print("YES")

Buggy submission (verdict: Runtime Error):
#入力
S=input()

#処理
l=len(S)
if l==0:
  t=1
else:
  t=0

X="AKIHABAR"
while len(S)!=0:
  if S[0]=="A":
    if S[0]==X[0]:
      S=S[1:]
      X=X[1:]
    else:
      t=1
      break
  else:
    if X[0]=="A":
      X=X[1:]
    else:
      if S[0]==X[0]:
      	S=S[1:]
      	X=X[1:]
      else:
        t=1
        break
        
if t==1:
  print("NO")
elif len(X)!=0:
  print("NO")
else:
  print("YES")

Buggy submission (verdict: Runtime Error):
#入力
S=input()

#処理
l=len(S)
if l==0:
  t=1
else:
  t=0

X="AKIHABARA"
while len(S)!=0:
  if S[0]=="A":
    if S[0]==X[0]:
      S=S[1:]
      X=X[1:]
    else:
      t=1
      break
  else:
    if X[0]=="A":
      X=X[1:]
    else:
      if S[0]==X[0]:
      	S=S[1:]
      	X=X[1:]
      else:
        t=1
        break
        
if t==1:
  print("NO")
elif len(X)!=0:
  print("NO")
else:
  print("YES")

Buggy submission (verdict: Runtime Error):
#入力
S=input()

#処理
l=len(S)
if l==0:
  t=1
else:
  t=0

X="AKIHABARA"
while len(S)!=0:
  if S[0]=="A":
    if S[0]==X[0]:
      S=S[1:]
      X=X[1:]
    else:
      t=1
      break
  else:
    if X[0]=="A":
      X=X[1:]
    else:
      if S[0]==X[0]:
      	S=S[1:]
      	X=X[1:]
      else:
        t=1
        break
        
if t==0:
  print("YES")
else:
  print("NO")

Buggy submission (verdict: Runtime Error):
#入力
S=input()

#処理
l=len(S)
t=0
X="AKIHABARA"
while len(S)!=0:
  if S[0]=="A":
    if S[0]==X[0]:
      S=S[1:]
      X=X[1:]
    else:
      t=1
      break
  else:
    if X[0]=="A":
      X=X[1:]
    else:
      if S[0]==X[0]:
      	S=S[1:]
      	X=X[1:]
      else:
        t=1
        break
        
if t==0:
  print("YES")
else:
  print("NO")
Problem p02812 (python)

Fixed submission:
n=int(input())
s=list(input())
c=0
for i in range(len(s)):
    if s[i] == "A":
        try:
            if s[i+1]=="B":    
                if s[i+2]=="C":
                    c+=1
        except:
            pass
            
print(c)

Buggy submission (verdict: Runtime Error):
n=int(input())
s=list(input())
c=0
for i in range(len(s)):
    if s[i] == "A":
        if s[i+1]=="B":
                try:
                    if s[i+2]=="C":
                        c+=1
                except:
                    pass
            
print(c)

Buggy submission (verdict: Runtime Error):
n=int(input())
s = list(input())
c=0
for i in range(len(s)):
    if s[i] == "A":
        if s[i+1]=="B":
               if s[i+2]=="C":
                    c+=1
               
            
print(c)
Problem p03000 (python)

Fixed submission:
a,b=map(int,input().split())
l=list(map(int,input().split()))
c=1
d=0
r=len(l)
for i in range(r):
    d=d+l[i]
    if d<=b:
        c=c+1
 
        
print(c)

Buggy submission (verdict: Runtime Error):
x,a=map(int,input().split())
b=0
c=0
A=list(map(int,input().split()))
while b<=a:
    b=b+A[c]
    c+=1
print(c)

Buggy submission (verdict: Runtime Error):
x,a=map(int,input().split())
b=0
c=0
A=[int(input()) for _ in range(x)]
while b<=a:
    b=b+A[c]
    c+=1
print(c)

Buggy submission (verdict: Runtime Error):
x,a=map(int,input().split())
b=0
c=0
A = [int(input()) for _ in range(x)]
while b<=a:
    b=b+A[c]
    c+=1
print(c)
Problem p03029 (python)

Fixed submission:
a,p=map(int,input().split())
c=a*3
b=(c+p)//2
print(b)

Buggy submission (verdict: Runtime Error):
a,p=int(input().split())
c=a*3
b=(c+p)//2
print(b)

Buggy submission (verdict: Runtime Error):
a=int(input())
p=int(input())
c=a*3
b=(c+p)/2
print(b)

Buggy submission (verdict: Runtime Error):
a=int(input())#りんご
p=int(input())#りんご欠片
c=a*3
b=(c+p)//2
print(b)
Problem p03071 (python)

Fixed submission:
a,b=map(int,input().split())
c=max(a,b)
d=min(a,b)
e=max(c-1,d)
print(c+e)

Buggy submission (verdict: Runtime Error):
a=int(input())
b=int(input())
c=max(a,b)
d=min(a,b)
e=max(c-1,d)
print(c+e)

Buggy submission (verdict: Runtime Error):
a=int(input())
b=int(input())
c=max(a,b)
d=min(a,b)
e=max(c-1,d)
print(c+e)
Problem p03079 (python)

Fixed submission:
A,B,C=map(int,input().split())
if A==B==C:
    print('Yes')
else:
    print('No')

Buggy submission (verdict: Runtime Error):
N=int(input())
s=input().split()
y=0
v=0
for i in s:
    if i=='R':
        y+=1
    elif i=='B':
        v+=1
if y>v:
    print('Yes')
elif v>=y:
    print('No')

Buggy submission (verdict: Runtime Error):
A=int(input())
B=int(input())
C=int(input())
if A==B==C:
    print('Yes')
else:
    print('No')
Problem p03219 (python)

Fixed submission:
import sys

def solve(a, b):
    return(int(a)+int(b)//2)


def readQuestion():
    ws = sys.stdin.readline().strip().split()
    a = int(ws[0])
    b = int(ws[1])
    return (a, b)

def main():
    print(solve(*readQuestion()))

# Uncomment before submission
main()

Buggy submission (verdict: Runtime Error):
import sys

def solve (a,b):
    c=int(b)//2
    D=int(a)+int(c)
    print(D)
    
def readQuestion():
    ws = sys.stdin.readline().strip().split()
    a = int(ws[0])
    b = int(ws[1])
    return (a, b)

def main():
    print(solve(*readQuestion()))

# Uncomment before submission
 main()

Buggy submission (verdict: Runtime Error):
improt sys

def solve (a,b):
    c=int(b)//2
    D=int(a)+int(c)
    print(D)

def readQuestion（）：
    ws = sys.stdin.readline（）。strip（）。split（）
    a = int（ws [0]）
    b = int（ws [1]）
    return（a、b）

def main（）：
    print（solve（* readQuestion（）））

＃提出前にコメントを外す
main（）

Buggy submission (verdict: Runtime Error):
a=input()
b=input()
c=int(b)//2
D=int(a)+int(c)
print(D)
Problem p03316 (python)

Fixed submission:
import sys

# 関数 solve は，もちろん，問題に応じて書き換える
def solve (N):
    s=0
    for b in str(N):

        s = s + int(b)
    if N % s ==0:
        return 'Yes'
    else:
        return 'No'
   

# ここから下は，入力・出力形式が同じであれば，変えなくて良い．
def readQuestion():
    line = sys.stdin.readline().rstrip()
    return int(line)

def main():
    n = readQuestion()
    answer = solve(n)
    print(answer)
    
if __name__ == '__main__':
    main()

Buggy submission (verdict: Runtime Error):
import sys

def solve (N):
    s=0
    for b in str(N):
        s = s + int(b)
    if N % s ==0:
        return 'Yes'
    else:
        return 'No'

# 関数 solve は，もちろん，問題に応じて書き換える
def solve(n):
   
# ここから下は，入力・出力形式が同じであれば，変えなくて良い．
def readQuestion():
    line = sys.stdin.readline().rstrip()
    return int(line)

def main():
    n = readQuestion()
    answer = solve(n)
    print(answer)
    
if __name__ == '__main__':
    main()
Problem p03323 (python)

Fixed submission:
import sys

def solve(a, b):
    if  a <= 8 and b <= 8 :
        return 'Yay!'
    else:
        return ':('
    
def readQuestion():
    line = sys.stdin.readline().rstrip()
    [str_a, str_b] = line.split(' ')
    return (int(str_a), int(str_b))

def main():
    a, b = readQuestion()
    answer = solve(a, b)
    print(answer)
    
if __name__ == '__main__':
    main()

Buggy submission (verdict: Runtime Error):
import sys

def solve(a,b):
    if  a <= 8 and b <= 8 :
        return 'yay'
    else:
        return ':('
def readQuestion():
    line = sys.stdin.readline().rstrip()
    return int(line)

def main():
    n = readQuestion()
    answer = solve(n)
    print(answer)
    
if __name__ == '__main__':
    main()

Buggy submission (verdict: Runtime Error):
import sys

def solve(n):
    if  a <= 8 and b <= 8 :
        return 'yay'
    else:
        return ':('
def readQuestion():
    line = sys.stdin.readline().rstrip()
    return int(line)

def main():
    n = readQuestion()
    answer = solve(n)
    print(answer)
    
if __name__ == '__main__':
    main()

Buggy submission (verdict: Runtime Error):
import sys

# 関数 solve は，もちろん，問題に応じて書き換える
def solve(n):
    if  a <= 8 and b <= 8 :
        return 'yay'
    else:
        return ':('

# ここから下は，入力・出力形式が同じであれば，変えなくて良い．
def readQuestion():
    line = sys.stdin.readline().rstrip()
    return int(line)

def main():
    n = readQuestion()
    answer = solve(n)
    print(answer)
    
if __name__ == '__main__':
    main()
Problem p04043 (python)

Fixed submission:
a,b,c=input().split()
w=[a,b,c]
e=w.count('5')
if '5' and '7' not in w:
    print ('NO')
elif e==2:
    print ('YES')
else:
    print ('NO')

Buggy submission (verdict: Runtime Error):
a=input()
b=input()
c=input()
w=[a,b,c]
e=w.count('5')
if '5' and '7' not in w:
    print ('NO')
elif e==2:
    print ('YES')
else:
    print ('NO')

Buggy submission (verdict: Runtime Error):
import sys

def solve(a, b, c):
    # Uncomment the following if you want to check the input.
    # print('a =', a)
    # print('b =', b)
    # print('c =', c)
    def I(a,b,c):
    w=[a,b,c]
    if 5 and 7 not in w:
        print ('NO')
    e=w.count(5)
    if e==2:
        print ('YES')
    else:
        print ('NO')


def readQuestion():
    ws = sys.stdin.readline().strip().split()
    a = int(ws[0])
    b = int(ws[1])
    c = int(ws[2])
    return (a, b, c,)

def main():
    solve(*readQuestion())

# Uncomment before submission
    main()

Buggy submission (verdict: Runtime Error):
import sys

def solve(a, b, c):
    # Uncomment the following if you want to check the input.
    # print('a =', a)
    # print('b =', b)
    # print('c =', c)
    w=[a,b,c]
    if 5 and 7 not in w:
        return ('NO')
    e=w.count(5)
    if e==2:
        return ('YES')
    else:
        return ('NO')


def readQuestion():
    ws = sys.stdin.readline().strip().split()
    a = int(ws[0])
    b = int(ws[1])
    c = int(ws[2])
    return (a, b, c,)

def main():
    solve(*readQuestion())

# Uncomment before submission
	main()

Buggy submission (verdict: Runtime Error):
import sys

def solve(a, b, c):
    # Uncomment the following if you want to check the input.
    # print('a =', a)
    # print('b =', b)
    # print('c =', c)
    w=[a,b,c]
    if 5 and 7 not in w:
        return ('NO')
    e=w.count(5)
    if e==2:
        return ('YES')
    else:
        return ('NO')


def readQuestion():
    ws = sys.stdin.readline().strip().split()
    a = int(ws[0])
    b = int(ws[1])
    c = int(ws[2])
    return (a, b, c,)

def main():
    solve(*readQuestion())

# Uncomment before submission
 main()
Problem p02600 (python)

Fixed submission:
x = int(input())
if x >= 400 and x <= 599:
  print(8)
elif x >= 600 and x <= 799:
  print(7)
elif x >= 800 and x <= 999:
  print(6)
elif x >= 1000 and x <= 1199:
  print(5)
elif x >= 1200 and x <= 1399:
  print(4)
elif x >= 1400 and x <= 1599:
  print(3)
elif x >= 1600 and x <= 1799:
  print(2)
elif x >= 1800 and x <= 1999:
  print(1)

Buggy submission (verdict: Runtime Error):
a, b, c = map(int, input().split())
k = int(input())
i = 0

if k > 1:
  for t in range(1, k):
    if a<b*2*t and b*2*t<c*2*(k-t):
      i += 1
    elif a<b and b<c*2*k:
      i += 1
    elif a<b*2*k and b*2*k<C:
      i += 1
    else:
      i += 0
    t += 1
elif k == 1:
  if a<b*2 and b*2<c:
    i = 1
  elif a<b and b<c*2:
    i = 1
  else:
    i = 0
  
if i > 0:
  print('Yes')
elif i == 0:
  print('No')
Problem p02621 (python)

Fixed submission:
a = int(input())
n1 = int(pow(a,1))
n2 = int(pow(a,2))
n3 = int(pow(a,3))
print (n1+n2+n3)

Buggy submission (verdict: Runtime Error):
a = int(input("Input an integer : "))
n1 = int( "%s" % a )
n2 = int( "%s%s" % (a,a) )
n3 = int( "%s%s%s" % (a,a,a) )
print (n1+n2+n3

Buggy submission (verdict: Runtime Error):
a = input()
print(pow(a,1)+pow(a,2)+pow(a,3))
Problem p02837 (python)

Fixed submission:
n = int(input())
s_dict = {}
for i in range(n):
  add_dict = {}
  a = int(input())
  for j in range(a):
    b = list(map(int, input().split()))
    add_dict[b[0]-1] = b[1]
  s_dict[i] = add_dict
max_num = 0

def rec_get_list(i, tmp_num_list, tmp_honest, tmp_unkind):
  add_dict = s_dict[i]
  tmp_num_list.add(i)
  tmp_honest.add(i)
  for k, v in add_dict.items():
      if v:
        if k not in tmp_num_list:
        	tmp_num_list, tmp_honest, tmp_unkind = rec_get_list(k, tmp_num_list, tmp_honest, tmp_unkind)
        tmp_honest.add(k)
      else:
        tmp_unkind.add(k)
  return tmp_num_list, tmp_honest, tmp_unkind

def rec_check(i, tmp_num_list, tmp_honest, tmp_unkind):
  global max_num
  global n
  for j in range(i, n):
    if j in tmp_num_list:
      continue
    use_num_list = tmp_num_list.copy()
    use_honest = tmp_honest.copy()
    use_unkind = tmp_unkind.copy()
    use_num_list, use_honest, use_unkind = rec_get_list(j, use_num_list, use_honest, use_unkind)
    check_flg = len(use_honest & use_unkind)
    if check_flg:
      continue
    else:
      if len(use_num_list) > max_num:
        max_num = len(use_num_list)
    if j+1 < n:
      rec_check(j+1, use_num_list, use_honest, use_unkind)
  
rec_check(0, set(), set(), set()) 
    
print(max_num)

Buggy submission (verdict: Runtime Error):
n = int(input())
test = []
count = 0
for i in range(0, n):
    num_test = int(input())
    for j in range(0, num_test):
        answer = input().split()
        a = answer[1]
        if a == '1':
            count += 1
        else:
            continue
            return 1
print(count)

Buggy submission (verdict: Runtime Error):
n = int(input())
test = []
count = 0
for i in range(0, n):
    num_test = int(input())
    for j in range(0, num_test):
        answer = input().split()
        a = answer[1]
        if a == '1':
            count += 1
        else:
            continue
print(count)
return 1
Problem p02657 (python)

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

Buggy submission (verdict: Runtime Error):
print(A * B)
Problem p02641 (python)

Fixed submission:
def resolve():
	X, N = map(int, input().split())
	if N == 0:
		print(X)
	else:
		A = list(map(int, input().split()))

		for i in range(100):
			Y = X-i
			if Y not in A:
				print(Y)
				break
			Y = X+i
			if Y not in A:
				print(Y)
				break
resolve()

Buggy submission (verdict: Runtime Error):
def resolve():
	X, N = map(int, input().split())
	if N == 0:
		print(X)
	else:
		A = list(map(int, input().split()))
		ymin = min(min(A), X)-1
		ymax = max(max(A), X)
		Y = {}
		for y in range(ymin, ymax):
			if y in A:
				None
			else:
				key = int(abs(X-y))
				if key in Y.keys():
					Y[key] = Y[key].append(y)
				else:
					Y[key] = [y]
		key = min(Y.keys())
		print(min(Y[key]))
resolve()