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

Fixed submission:
x,n = map(int,input().split())
if n == 0:
  ans = x
else:
  p = [int(i.strip()) for i in input().split()]
  for i in range(n+1):
    ch_1 = x-i
    ch_2 = x+i
    if p.count(ch_1) == 0:
      ans = ch_1
      break
    elif p.count(ch_2) == 0:
      ans = ch_2
      break
print(ans)

Buggy submission (verdict: Runtime Error):
x,n = map(int,input().split())
if n == 0:
  ans = x
else:
  p = [int(i.strip()) for i in input().split()]
  for i in range(n):
    ch_1 = x-i
    ch_2 = x+i
    if p.count(ch_1) == 0:
      ans = ch_1
      break
    elif p.count(ch_2) == 0:
      ans = ch_2
      break
    else:
      ans = x
print(p)

Buggy submission (verdict: Runtime Error):
x,n = map(int,input().split())
if n == 0:
  ans = x
else:
  p = [int(i.strip()) for i in input().split()]
  for i in range(n):
    ch_1 = x-i
    ch_2 = x+i
    if p.count(ch_1) == 0:
      ans = ch_1
      break
    elif p.count(ch_2) == 0:
      ans = ch_2
      break
print(ans)

Buggy submission (verdict: Runtime Error):
x, n = map(int, input().split())
p = map(int, input().split())
p_list = sorted(list(p), reverse=False)
dist_list = list(map(lambda y: abs(y-x), p_list))
all_list = [[]]
ans = 0
for i in range(n):
  all_list.append([p_list[i], dist_list[i]])
del all_list[0] # appendは空に追加してしまうので最初の空を削除
sort_list = sorted(all_list, key=lambda z:(z[1],z[0]))
ans = int(sort_list[0][0])
print(ans)

Buggy submission (verdict: Runtime Error):
x, n = map(int, input().split())
p = map(int, input().split())
p_list = sorted(list(p), reverse=False)
dist_list = list(map(lambda y: abs(y-x), p_list))
all_list = [[]]
ans = 0
for i in range(n):
  all_list.append([p_list[i], dist_list[i]])
del all_list[0] # appendは空に追加してしまうので最初の空を削除
sort_list = sorted(all_list, key=lambda z:(z[1],z[0]))
ans = int(sort_list[0][0])
print(ans)
Problem p02922 (python)

Fixed submission:
a,b = map(int, input().split())
c = 1
ans = 0
if b == 1:
  ans = 0
else:
  for i in range(21):
    c = c-1 + a
    if c >= b:
      ans = i + 1
      break
print(ans)

Buggy submission (verdict: Runtime Error):
a,b = map(int, input().split())
c = 1
if b == 1:
  ans = 0
else:
  for i in range(11):
    c = c-1 + a
    if c >= b:
      ans = i + 1
      break
print(ans)

Buggy submission (verdict: Runtime Error):
a,b = map(int, input().split())
c = 1
if b == 1:
  ans = 0
else:
  for i in range(11):
    c = c-1 + a
    if c >= b:
      ans = i
      break
print(ans)
Problem p02664 (python)

Fixed submission:
# B
T = str(input())
try:
    for i in range(T.count("?")):
        index = T.index("?")
        if T[index - 1] == "P":
            T = T.replace("?","D",1)
        elif T[index + 1] == "D":
            T = T.replace("?","P",1)
        elif T[index + 1] == "?":
            T = T.replace("?","P",1)
        else:
            T = T.replace("?","D",1)
    print(T)
except:
    print(T.replace("?","D"))

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

for i in range(T.count("?")):
    index = T.index("?")
    if T[index - 1] == "P":
        T = T.replace("?","D",1)
    elif T[index + 1] == "D":
        T = T.replace("?","P",1)
    elif T[index + 1] == "?":
        T = T.replace("?","P",1)
    else:
        T = T.replace("?","D",1)
print(T)

Buggy submission (verdict: Runtime Error):
# B
T = str(input())

for i in range(T.count("?")):
    index = T.index("?")
    if T[index - 1] == "P":
        T = T.replace("?","D",1)
    elif T[index + 1] == "D":
        T = T.replace("?","P",1)
    elif T[index + 1] == "?":
        T = T.replace("?","P",1)
    else:
        T = T.replace("?","D",1)
print(T)

Buggy submission (verdict: Runtime Error):
# B
T = str(input())

def score(t):
    n = 0
    while "PD" in t:
        t = t.replace("PD","",1)
        n+=1
    n += t.count("D")
    return n

for i in range(T.count("?")):
    index = T.index("?")
    if T[index - 1] == "P":
        T = T.replace("?","D",1)
    elif T[index + 1] == "D":
        T = T.replace("?","P",1)
    elif T[index + 1] == "?":
        T = T.replace("?","P",1)
    else:
        T = T.replace("?","D",1)
print(T)
Problem p02741 (python)

Fixed submission:
#1 
mylist = [1, 1, 1, 2, 1, 2, 1, 5, 2, 2, 1, 5, 1, 2, 1, 14, 1, 5, 1, 5, 2, 2, 1, 15, 2, 2, 5, 4, 1, 4, 1, 51]
k = int(input())
print(mylist[k-1])

Buggy submission (verdict: Runtime Error):
#1 
mylist = [1, 1, 1, 2, 1, 2, 1, 5, 2, 2, 1, 5, 1, 2, 1, 14, 1, 5, 1, 5, 2, 2, 1, 15, 2, 2, 5, 4, 1, 4, 1, 51]
k = int(input())
print(mylist[k+1])
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 p02724 (python)

Fixed submission:
i=int(input())
gohyaku = i // 500
go = (i % 500) // 5
print(int(gohyaku*1000+go*5))

Buggy submission (verdict: Runtime Error):
s=input()
if s[2]==s[3] and s[4]==s[5]:print("Yes")
else :print("No")
Problem p02741 (python)

Fixed submission:
K=int(input())
array=[1, 1, 1, 2, 1, 2, 1, 5, 2, 2, 1, 5, 1, 2, 1, 14, 1, 5, 1, 5, 2, 2, 1, 15, 2, 2, 5, 4, 1, 4, 1, 51]
print(array[K-1])

Buggy submission (verdict: Runtime Error):
[a,b,c]=[int(inp) for inp in input().split()]
#if a*a+b*b+c*c -2*(a*b+b*c+c*a) > 0:
if a*(a-2*b)+b*(b-2*c)>-c*(c-2*a):
    print("Yes")
else:
    print("No")

Buggy submission (verdict: Runtime Error):
[a,b,c]=[int(inp) for inp in input().split()]
if (c - a - b) ** 2 - 4 * a * b > 0:
    print("Yes")
else:
    print("No")

Buggy submission (verdict: Runtime Error):
K=input()
array=[1, 1, 1, 2, 1, 2, 1, 5, 2, 2, 1, 5, 1, 2, 1, 14, 1, 5, 1, 5, 2, 2, 1, 15, 2, 2, 5, 4, 1, 4, 1, 51]
return array[K+1]
Problem p02743 (python)

Fixed submission:
[a,b,c]=[int(inp) for inp in input().split()]
#if a*a+b*b+c*c -2*(a*b+b*c+c*a) > 0:
if c - a - b < 0 or a*(a-2*b)+b*(b-2*c)+c*(c-2*a)<=0:
    print("No")
else:
    print("Yes")

Buggy submission (verdict: Runtime Error):
[a,b,c]=[int(inp) for inp in input().split()]
#if a*a+b*b+c*c -2*(a*b+b*c+c*a) > 0:
if a(a-2*b)+b*(b-2*c)+c*(c-2*a)> 0:
    print("Yes")
else:
    print("No")
Problem p02747 (python)

Fixed submission:
import re
strin=input()
pattern = '(hi)+$'
if re.match(pattern, strin):
    print("Yes")
else:
    print("No")

Buggy submission (verdict: Runtime Error):
import math
import itertools
N = int(input())
array=[]
for i in range(0, N-1):
    array.append(input().split())
dist3=[]
for row in array:
    a,b=row
    c = []
    d=[]
    for tmpc1,tmpc2 in array:
        if tmpc1 == a and tmpc2 != a and tmpc2!=b:
            c.append(int(tmpc2)-1)
        if tmpc1 != a and tmpc2 == a and tmpc1 != b:
            c.append(int(tmpc1)-1)
    for tmpd1,tmpd2 in array:
        if tmpd1 == b and tmpd2!=a and tmpd2 != b and tmpd2!=c:
            d.append(int(tmpd2)-1)
        if tmpd1 != b and tmpd1!=a and tmpd2 == b and tmpd1!=c:
            d.append(int(tmpd1)-1)
    if c != [] and d != []:
        #print("{} {} {} {}".format(a, b, c, d))
        dist3.append([c, d])
        
for kouho in itertools.permutations(list(range(1,N+1)),N):
    breakflag=False
    for c, d in dist3:
        for tmpc in c:
            for tmpd in d:
                if (kouho[tmpc] + kouho[tmpd]) % 3 != 0 and (kouho[tmpc] * kouho[tmpd]) % 3 != 0:
                    breakflag = True
                    break
                #else:
                    #print("{} {} {} {}".format( tmpc, tmpd,kouho[tmpc],kouho[tmpd]))
            if breakflag==True:
                break
        if breakflag!=True:
            print(' '.join(map(str,kouho)))
            exit()

print('-1')
Problem p02760 (python)

Fixed submission:
from collections import Counter
A1=list(map(int,input().split()))
A2=list(map(int,input().split()))
A3=list(map(int,input().split()))
A=[A1,A2,A3]
N=int(input())
for _ in range(N):
  b=int(input())
  #穴をあける
  for tmpA in A:
    if b in tmpA:
      index=tmpA.index(b)
      tmpA[index]=-1
      break
  
#bingoチェック
#中央が空いている
if A[1][1]==-1:
  #ななめ
  if A[0][0] == A[2][2] or A[0][2]==A[2][0]:
    print("Yes")
  #たてよこ
  elif A[0][1]==A[2][1] or A[1][0]==A[1][2]:
    print("Yes")
#中央が空いていない
else:
  #たて
  if A[0][0]==A[1][0] and A[1][0]==A[2][0] or A[0][2]==A[1][2]and A[1][2]==A[2][2]:
    print("Yes")
   #よこ
  elif len(Counter(A[0]))==1or len(Counter(A[2]))==1:
    print("Yes")
  else:
    print("No")

Buggy submission (verdict: Runtime Error):
from collections import Counter
A1=list(map(int,input().split()))
A2=list(map(int,input().split()))
A3=list(map(int,input().split()))
A=[A1,A2,A3]
N=int(input())
for _ in range(N):
  b=int(input())
  #穴をあける
  for tmpA in A:
    if b in tmpA:
      index=tmpA.index(b)
      tmpA[index]=-1
      break
  
#bingoチェック
  
#たて
if True in [ not False in [A[j][i]==A[j+1][i] for j in range(len(A)-1)] for i in range(len(A[0]))]:
  print("Yes")
#よこ
elif True in [len(Counter(tmpA))==1 for tmpA in A]:
  print("Yes")
#ななめ
elif not False in [A[i][i] == A[i+1][i+1]for i in range(len(A)-1)] or not False in  [A[len(A)-(i+1)][i] == A[len(A)-(i+2)][i+1]for i in range(len(A)-1)]
  print("Yes")
#ダメ
else:
  print("No")

Buggy submission (verdict: Runtime Error):
from collections import Counter
A1=list(map(int,input().split()))
A2=list(map(int,input().split()))
A3=list(map(int,input().split()))
A=[A1,A2,A3]
N=int(input())
for _ in range(N):
  b=int(input())
  #穴をあける
  for tmpA in A:
    if b in tmpA:
      index=tmpA.index(b)
      tmpA[index]=-1
      break
  
#bingoチェック
  
#たて
if True in [ not False in [A[j][i]==A[j+1][i] for j in range(len(A)-1)] for i in range(len(A[0]))]:
  print("Yes")
#よこ
elif True in [len(Counter(tmpA))==1 for tmpA in A]:
  print("Yes")
#ななめ
elif [A[i][i] == A[i+1][i+1]for i in range(len(A)-1)] or [A[len(A)-(i+1)][i] == A[len(A)-(i+2)][i+1]for i in range(len(A)-1)]
  print("Yes")
#ダメ
else:
  print("No")

Buggy submission (verdict: Runtime Error):
from collections import Counter
A1=list(map(int,input().split()))
A2=list(map(int,input().split()))
A3=list(map(int,input().split()))
A=[A1,A2,A3]
N=int(input())
for _ in range(N):
  b=int(input())
  #穴をあける
  for tmpA in A:
    if b in tmpA:
      index=tmpA.index(b)
      tmpA[index]=-1
      break
  
#bingoチェック
  
#たて
if True in [[tmpA[i]==tmpA[i] and [i]==[i] for i in range(3)] for tmpA in A]
  print("Yes")
#よこ
elif len(Counter(A[0]))==1 or len(Counter(A[1]))==1 or len(Counter(A[2]))==1:
  print("Yes")
#ななめ
elif A[1][1]==-1 and (A[0][0] == A[2][2] or A[0][2]==A[2][0]):
  print("Yes")
#ダメ
else:
  print("No")
Problem p02761 (python)

Fixed submission:
[M,N]=[int(item) for item in input().split()]

num={}

for _ in range(N):
    [s,c] = [int(item) for item in input().split()]
    if s > M or  not M==1 and  s == 1 and c == 0:
        print(-1)
        exit()
    if s in num:
        if num[s] == c:
            continue
        else:
            print(-1)
            exit()
    num[s]=c

#print(num)
#数字にする
num_int = 0

if M == 1:
    if  1 in num:
        print(num[1])
    else:
        print(0)
    exit()

if  1 in num:
    num_int = num[1]
else:
    num_int=1

for i in range(2, M + 1):
    num_int*=10
    if i in num:
        num_int+=num[i]

print(num_int)

Buggy submission (verdict: Runtime Error):
[M,N]=[int(item) for item in input().split()]

num={}

for _ in range(N):
    [s,c] = [int(item) for item in input().split()]
    if s > M or  not M==1 and  s == 1 and c == 0:
        print(-1)
        exit()
    if s in num:
        if num[s] == c:
            continue
        else:
            print(-1)
            exit()
    num[s]=c

#print(num)
#数字にする
num_int = 0

if M == 1:
    print(num[1])
    exit()

if  1 in num:
    num_int = num[1]
else:
    num_int=1

for i in range(2, M + 1):
    num_int*=10
    if i in num:
        num_int+=num[i]

print(num_int)

Buggy submission (verdict: Runtime Error):
[M,N]=[int(item) for item in input().split()]

num={}

for _ in range(N):
    [s,c] = [int(item) for item in input().split()]
    if s > M or  not M==1 and  s == 1 and c == 0:
        print(-1)
        exit()
    if s in num:
        if num[s] == c:
            continue
        else:
            print(-1)
            exit()
    num[s]=c

#print(num)
#数字にする
num_int = 0

if M == 1:
    print(num[1])
    exit()

if  1 in num:
    num_int = num[1]
else:
    num_int=1

for i in range(2, M + 1):
    num_int*=10
    if i in num:
        num_int+=num[i]

print(num_int)
Problem p02853 (python)

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

ttl=0
if(x>3 and y>3):
  ttl=0
else:
  for i in range(1,4):
    if i==x:
        ttl=(4-i)*100000
        break
  for j in range(1,4):
    if j==y:
        ttl=ttl+(4-j)*100000
        break
  if ttl==600000:
    ttl=ttl+400000
print(ttl)

Buggy submission (verdict: Runtime Error):
x,y=map(int,input().split())
ttl=0
if x>3 and y>3:
  #do nothing
else:
  for i in range(1,4):
    ttl=(4-i)*100000
    for j in range(1,4):
    	ttl=ttl+(4-j)*100000
        break
  if ttl==600000:
    ttl=ttl+400000
print(ttl)
Problem p02658 (python)

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

ans = 1
ng = False
max = 10**18
for A in Aj:
	if A == 0:
		ans = 0
		break
	if ng or ans*A > max:
		ans = -1
		ng = True
	else:
		ans *= A
print(ans)

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

ans = 1
ng = false
max = 10**18
for A in Aj:
	if A == 0:
		ans = 0
		break
	if ans*A > max:
		ans *= A
print(ans)
Problem p02613 (python)

Fixed submission:
def i():
	return int(input())
def i2():
	return map(int,input().split())
def s():
	return str(input())
def l():
	return list(input())
def intl():
	return list(int(k) for k in input().split())

n = i()
s = [s() for _ in range(n)]

ac = 0
wa = 0
tle = 0
re = 0
for i in range(n):
	if s[i] == "AC":
		ac += 1
	elif s[i] == "WA":
		wa += 1
	elif s[i] == "TLE":
		tle += 1
	else:
		re += 1
print("AC x ",ac)
print("WA x ",wa)
print("TLE x ",tle)
print("RE x ",re)

Buggy submission (verdict: Runtime Error):
n = int(input())
s = [str(i) for _ in range(n)]
for i in ("AC","WA","TLE","RE"):
	print("{0} x {1}".format(i,s.count(i))
Problem p02641 (python)

Fixed submission:
def i():
	return int(input())
def i2():
	return map(int,input().split())
def s():
	return str(input())
def l():
	return list(input())
def intl():
	return list(int(k) for k in input().split())

x,n = i2()
p = intl()

m = 100
ls = [int(i) for i in range(-200,200)]
for i in range(n):
	ls.remove(p[i])
for j in range(len(ls)):
	if abs(x - ls[j]) < m :
		m = abs(x - ls[j])
		ans = ls[j]
print(ans)

Buggy submission (verdict: Runtime Error):
def i():
	return int(input())
def i2():
	return map(int,input().split())
def s():
	return str(input())
def l():
	return list(input())
def intl():
	return list(int(k) for k in input().split())

x,n = i2()
p = intl()

m = 100
ls = [int(i) for i in range(1,101)]
for i in range(n):
	ls.remove(p[i])
for j in range(len(ls)):
	if abs(x - ls[j]) < m :
		m = abs(x - ls[j])
		ans = ls[j]
		
print(ans)
Problem p02657 (python)

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

Buggy submission (verdict: Runtime Error):
# include <bits/stdc++.h>
using namespace std;

int main(){
	int a,b;
	cin >> a >> b;
	cout << a*b << endl;
}
Problem p02677 (python)

Fixed submission:
import math
a,b,h,m = map(int,input().split())

ans = 0
cos = 0
mi = m/60 * 360 #分針の角度
hour = (60*h + m)/720 * 360 #時針の角度

cos = math.cos(math.radians(hour - mi))
ans = a*a + b*b -2*a*b*cos
#余弦定理
ans = ans ** (1/2)
print(ans)

Buggy submission (verdict: Runtime Error):
a,b,h,m = map(int,input().split())
import math
mi = 360*(((60*h + m) % 60) / 60)
hour = 360*(((60*h + m) % 720) / 720)
cos = 0
ans = 0
if hour > mi:
	cos = math.cos(math.radians(hour - mi))
	ans = (a**2 + b**2 - 2*a*b*cos)**0.5
elif hour == mi:
	ans = 0
elif hour +180 > mi:
	cos = math.cos(math.radians(mi - hour))
	ans = (a**2 + b**2 - 2*a*b*cos)**0.5
elif hour + 180 == mi:
	ans = a + b
elif hour + 180 < mi:
	cos.hour = math.cos(math.radians(hour - mi + 360))
	ans = (a**2 + b**2 - 2*a*b*cos)**0.5
print(cos)
print(ans)

Buggy submission (verdict: Runtime Error):
a,b,h,m = map(int,input().split())
import math
mi = 360*(((60*h + m) % 60) / 60)
hour = 360*(((60*h + m) % 720) / 720)
print(hour)
print(mi)
cos = 0
ans = 0
if hour > mi:
	cos = math.cos(math.radians(hour - mi))
	ans = (a**2 + b**2 - 2*a*b*cos)**0.5
elif hour == mi:
	ans = 0
elif hour +180 > mi:
	cos = math.cos(math.radians(mi - hour))
	ans = (a**2 + b**2 - 2*a*b*cos)**0.5
elif hour + 180 == mi:
	ans = a + b
elif hour + 180 < mi:
	cos.hour = math.cos(math.radians(hour - mi + 360))
	ans = (a**2 + b**2 - 2*a*b*cos)**0.5
print(cos)
print(ans)
Problem p02742 (python)

Fixed submission:
h,w=map(int,input().split())
a=0
if h==1 or w==1:
	a=1
else:
	if h%2==1 and w%2==1:
		a=(h*w+1)//2
	else:
		a=h*w//2
print(a)

Buggy submission (verdict: Runtime Error):
h,w=map(int,input().split())
a=0
if h=1 or w=1:
	a=1
else:
	if h%2==1 and w%2==1:
		a=(h*w+1)/2
	else:
		a=h*w/2
print(a)

Buggy submission (verdict: Runtime Error):
h,w=map(int,input().split())
a=0
if h=1 or w=1:
	a=1
elif:
	if h%2==1 and w%2==1:
		a=(h*w+1)/2
	else:
		a=h*w/2
print(a)

Buggy submission (verdict: Runtime Error):
h,w=map(int,input().split())
a=0
if h=a or w=1:
	a=1
elif:
	if h%2==1 and w%2==1:
		a=(h*w+1)/2
	else:
		a=h*w/2
print(a)
Problem p02743 (python)

Fixed submission:
a,b,c=map(int,input().split())
if 4*a*b<(c-a-b)**2 and c-a-b>0:
	print('Yes')
else:
	print('No')

Buggy submission (verdict: Runtime Error):
import math
a,b,c=map(int,input().split())
r=math.sqrt(a)*math.sqrt(b)
if a+b+2r-c<0:
	print('Yes')
else:
	print('No')
Problem p02755 (python)

Fixed submission:
import math
a,b=map(int,input().split())
for i in range(1,1009):
	A=math.floor(i*0.08)
	B=math.floor(i*0.1)
	if a==A and b==B:
		print(i)
		exit()
print(-1)

Buggy submission (verdict: Runtime Error):
2 2
Problem p02767 (python)

Fixed submission:
n=int(input())
x=[int(i) for i in input().split()]
a=[]
p=0
for i in range(1,max(x)+1):
  for j in range(n):
    p+=(x[j]-i)**2
  a.append(p)
  p=0
print(min(a))

Buggy submission (verdict: Runtime Error):
n=int(input())
x=[int(i) for i in input().split()]
a=[]
p=0
for i in range(1,max(x)):
  for j in range(n):
    p+=(x[j]-i)**2
  a.append(p)
  p=0
print(min(a))

Buggy submission (verdict: Runtime Error):
n=int(input())
x=[int(i) for i in input().split()]
a=[]
p=0
for i in range(1,n**n):
  for j in range(n):
    p+=(x[j]-i)**2
  a.append(p)
  p=0
print(min(a))
Problem p02801 (python)

Fixed submission:
alp='abcdefghijklmnopqrstuvwxyz'
s=str(input())
flag=False
for c in alp:
  if flag:
    print(c)
    break
  if c==s:
    flag=True

Buggy submission (verdict: Runtime Error):
a=input()
b=a.next(a)
print(b)
Problem p02811 (python)

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

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

count=0
for i in range(a-2):
  if b[i]=='A'and b[i+1]=='B' and b[i+2]=='C':
    count+=1
print(count)
Problem p02812 (python)

Fixed submission:
n=int(input())
s=input()
count=0
for i in range(n-2):
  if s[i]=='A' and s[i+1]=='B' and s[i+2]=='C':
    count+=1
print(count)

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

count=0
for i in range(a-2):
  if b[i]='a'and b[i+1]='b' and b[i+2]='c':
    count+=1
print(count)

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

if
Problem p02817 (python)

Fixed submission:
a,b=input().split()
print(b+a)

Buggy submission (verdict: Runtime Error):
a,b,k=map(int,input().split())
if k>=a:
  A=0
  if k-a>=b:
    B=0
  else:
    B=b-(k-a)
else:
  A=a-k
  B=b
print('{}{}'.format(A,B))

Buggy submission (verdict: Runtime Error):
S=int(input()) 
T=int(input())
print(T+S)
Problem p02911 (python)

Fixed submission:
def i():
	return int(input())
def i2():
	return map(int,input().split())
def s():
	return str(input())
def l():
	return list(input())
def intl():
	return list(int(k) for k in input().split())

n,k,q = i2()
ls = [k-q]*n 
for _ in range(q):
	a = i()
	ls[a-1] += 1 

for j in range(n):
	if ls[j] > 0:
		print("Yes")
	else:
		print("No")

Buggy submission (verdict: Runtime Error):
def i():
	return int(input())
def i2():
	return map(int,input().split())
def s():
	return str(input())
def l():
	return list(input())
def intl():
	return list(int(k) for k in input().split())

n,k,q = i2()
ls = [k-q]*n 
for _ in range(q):
	a = i()
	ls[a-1] += 1 

for _ in range(n):
	if ls[j] > 0:
		print("Yes")
	else:
		print("No")
Problem p02999 (python)

Fixed submission:
x,a = map(int,input().split())
if x < a:
	print(0)
else:
	print(10)

Buggy submission (verdict: Runtime Error):
x,a = map(int,input().split())
if x <　a:
	print(0)
else:
	print(10)
Problem p03029 (python)

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

Buggy submission (verdict: Runtime Error):
def i():
	return int(input())
def i2():
	return map(int,input().split())
def s():
	return str(input())
def l():
	return list(input())
def intl():
	return list(int(k) for k in input().split())

n = i()
s = {}
for i in range(n):
	S,P = map(str,input().split())
	s[i+1] = [S, -int(P)]

note = sorted(s.items(), key=lambda x: (x[1][0],x[1][1])
print(note)
Problem p03076 (python)

Fixed submission:
def i():
	return int(input())
def i2():
	return map(int,input().split())
def s():
	return str(input())
def l():
	return list(input())
def intl():
	return list(int(k) for k in input().split())

a = [str(input()) for _ in range(5)]

n = 10
cnt = 0

for i in range(len(a)):
	if int(a[i][-1]) < n and int(a[i][-1]) != 0 :
		n = int(a[i][-1])
		cnt = i

for i in range(len(a)):
	if i == cnt:
		a[i] = int(a[i])
	elif int(a[i][-1]) == 0:
		a[i] = int(a[i])
	else:
		a[i] = (int(a[i])//10 + 1)*10

print(sum(a))

Buggy submission (verdict: Runtime Error):
def i():
	return int(input())
def i2():
	return map(int,input().split())
def s():
	return str(input())
def l():
	return list(input())
def intl():
	return list(int(k) for k in input().split())

a = [str(input()) for _ in range(5)]

n = 9

for i in range(len(a)):
	if int(a[i][-1]) <= n and int(a[i][-1]) != 0 :
		n = int(a[i][-1])
		cnt = i

for i in range(len(a)):
	if i == cnt:
		a[i] = int(a[i])
	elif int(a[i][-1]) == 0:
		a[i] = int(a[i])
	else:
		a[i] = (int(a[i])//10 + 1)*10
print(a)
print(sum(a))

Buggy submission (verdict: Runtime Error):
def i():
	return int(input())
def i2():
	return map(int,input().split())
def s():
	return str(input())
def l():
	return list(input())
def intl():
	return list(int(k) for k in input().split())

a = [str(input()) for _ in range(5)]

n = 9

for i in range(len(a)):
	if int(a[i][-1]) < n and int(a[i][-1]) != 0 :
		n = int(a[i][-1])
		cnt = i

for i in range(len(a)):
	if i == cnt:
		a[i] = int(a[i])
	elif int(a[i][-1]) == 0:
		a[i] = int(a[i])
	else:
		a[i] = (int(a[i])//10 + 1)*10
print(sum(a))
Problem p03105 (python)

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

Buggy submission (verdict: Runtime Error):
a,b,c = map(int,input().split())
print( min(b//a,c)
Problem p03136 (python)

Fixed submission:
n = int(input())
l = [int(i) for i in input().split()]

l.sort()
cnt = 0
for i in range(n-1):
	cnt += l[i]
if cnt > l[n-1]:
	print("Yes")
else:
	print("No")

Buggy submission (verdict: Runtime Error):
n = int(input())
l = [int(i) for i in input().split()]

l.sort()
l.reverse()
cnt = 0
for i in range(n-1):
	cnt += l[i]
if cnt > l[n]:
	print("Yes")
else:
	print("No")
Problem p03206 (python)

Fixed submission:
def i():
	return int(input())
def i2():
	return map(int,input().split())
def s():
	return str(input())
def l():
	return list(input())
def intl():
	return list(int(k) for k in input().split())

d = i()
if d == 25:
	print("Christmas")
elif d == 24:
	print("Christmas Eve")
elif d == 23:
	print("Christmas Eve Eve")
else:
	print("Christmas Eve Eve Eve")

Buggy submission (verdict: Runtime Error):
def i():
	return int(input())
def i2():
	return map(int,input().split())
def s():
	return str(input())
def l():
	return list(input())
def intl():
	return list(int(k) for k in input().split())

d = i()
if d == 25:
	print("Christmas")
elif d = 24:
	print("Christmas Eve")
elif d == 23:
	print("Christmas Eve Eve")
else:
	print("Christmas Eve Eve Eve")