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

Fixed submission:
b=input()
if b=='A':
    a='T'
elif b=='T':
    a='A'
elif b=='C':
    a='G'
else:
    a='C'
print(a)

Buggy submission (verdict: Runtime Error):
b=input()
if b=='A':
  a='T'
elif b=='T':
  a='A':
elif b=='C':
  a='G':
else:
  a='C'
 print(a)
Problem p03103 (python)

Fixed submission:
import numpy as np

n,m = map(int,input().split())
a=[0] * n
b=[0] * n
for i in range(n):
    a[i],b[i] = map(int,input().split())

mk = np.array([a,b])
#print(m)
index = np.argsort(mk)
#print(index)
mn = np.array([mk[0,index[0,:]],mk[1,index[0,:]]])
#print(mn)

sum = 0
for i in range(n):
    if mn[1][i] <= m:
        sum += mn[0][i] * mn[1][i]
        m = m - mn[1][i]

    else:
        sum += mn[0][i] * m
        break
print(sum)

Buggy submission (verdict: Runtime Error):
n,m=map(int,input().split())
a=[0]*n
b=[0]*n
for i in range(n):
    a[i],b[i]=map(int,input().split())
def merge(rr):
    mid=len(rr[0])
    c=int(mid/2)
    if mid>1:
        left=merge([rr[0][:c],rr[1][:c]])
        right=merge([rr[0][c:],rr[1][c:]])
        ar=[]
        br=[]
        while len(left[0])!=0 and len(right[0])!=0:
            if left[0][0]<right[0][0]:
                ar.append(left[0].pop(0))
                br.append(left[1].pop(0))
            else:
                ar.append(right[0].pop(0))
                br.append(right[1].pop(0))
        if len(left[0])!=0:
            ar.extend(left[0])
            br.extend(left[1])
        elif len(right[0])!=0:
            ar.extend(right[0])
            br.extend(right[1])
        rr=[ar,br]
    return rr
rr=[a,b]
re=merge(rr)
tot=0
sum=0
while(1):
    if tot+re[1][0]<=m:
        tot+=re[1][0]
        sum+=re[0][0]*re[1][0]
        re[1].pop(0)
        re[0].pop(0)
        if len(re[1])==0:
            break
    else:
        break
sum+=re[0][0]*(m-tot)
print(sum)

Buggy submission (verdict: Runtime Error):
n,m=map(int,input().split())
a=[0]*n
b=[0]*n
for i in range(n):
    a[i],b[i]=map(int,input().split())
def merge(rr):
    mid=len(rr[0])
    c=int(mid/2)
    if mid>1:
        left=merge([rr[0][:c],rr[1][:c]])
        right=merge([rr[0][c:],rr[1][c:]])
        ar=[]
        br=[]
        while len(left[0])!=0 and len(right[0])!=0:
            if left[0][0]<right[0][0]:
                ar.append(left[0].pop(0))
                br.append(left[1].pop(0))
            else:
                ar.append(right[0].pop(0))
                br.append(right[1].pop(0))
        if len(left[0])!=0:
            ar.extend(left[0])
            br.extend(left[1])
        elif len(right[0])!=0:
            ar.extend(right[0])
            br.extend(right[1])
        rr=[ar,br]
    return rr
rr=[a,b]
re=merge(rr)
tot=0
sum=0
while(1):
    if tot+re[1][0]<=m:
        tot+=re[1][0]
        sum+=re[0][0]*re[1][0]
        re[1].pop(0)
        re[0].pop(0)
    else:
        break
sum+=re[0][0]*(m-tot)
print(sum)
Problem p03126 (python)

Fixed submission:
n,m=map(int,input().split())
c=[0]*m
for i in range(n):
    li=list(map(int,input().split()))
    for j in range(li[0]):
        c[li[j+1]-1]+=1
        ans=0
for i in range(m):
    if c[i]==n:
        ans+=1
print(ans)

Buggy submission (verdict: Runtime Error):
n,m=map(int,input().split())
c=[0]*m
for i in range(n):
    li=list(map(int,input().split()))
    for j in range(li[0]):
        c[li[j+1]-1]+=1
        ans=0
for i in range(n):
    if c[i]==n:
        ans+=1
print(ans)
Problem p03136 (python)

Fixed submission:
n=int(input())
li=list(map(int,input().split()))
m=max(li)
sum=0
for i in range(n):
    sum+=li[i]
if m<sum-m:
    print('Yes')
else:
    print('No')

Buggy submission (verdict: Runtime Error):
n=int(input())
s=list(input())
k=int(input())
ans=''
for i in range(n):
    if s[i]==s[k]:
        ans+=s[i]
    else:
        ans+='*'
print(ans)
Problem p02700 (python)

Fixed submission:

a, b, c, d = map(int, input().split())

while True:
  c -= b
  if c <= 0:
    print('Yes')
    break
  
  a -= d
  if a <= 0:
    print('No')
    break

Buggy submission (verdict: Runtime Error):
a,b,c,d=map(int, input().split())
while True:
  	b -= c
 	if c<=0:
   		print("Yes")
    	break
    a -=d
    if a<=0:
		print("No")
      	break

Buggy submission (verdict: Runtime Error):
a,b,c,d=map(int, input().split())
while True:
	b -= c
	if c<=0:
      print("Yes")
      break
	a -=d
	if a<=0:
      print("No")
      break

Buggy submission (verdict: Runtime Error):
a,b,c,d=map(int, input().split())
while True:
	b -= c
	if c<=0 print("Yes"):
      	break
	a -=d
	if a<=0 print("No"):
      	break

Buggy submission (verdict: Runtime Error):
a,b,c,d=map(int, input().split())
while True:
	b -= c
	if c<=0 print"Yes":
      	break
	a -=d
	if a<=0 print"No":
      	break

Buggy submission (verdict: Runtime Error):
a,b,c,d=map(int, input().split())
while True:
	b -= c
	if c<=0 print"Yes" break
	a -=d
	if a<=0 print"No" break

Buggy submission (verdict: Runtime Error):
a,b,c,d=map(int, input().split())
while
	b -= c
	if c<=0
		print"Yes"
 		break
	a -=d
	if a<=0
      	print"No"
        break
Problem p02705 (python)

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

Buggy submission (verdict: Runtime Error):
 print(int(input())*6.3)
Problem p02717 (python)

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

Buggy submission (verdict: Runtime Error):
s = [input()]
print(s[2], s[0], s[1])

Buggy submission (verdict: Runtime Error):
s = [input(),input(),input()]
print(s[2], s[0], s[1])

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

Buggy submission (verdict: Runtime Error):
s = input()
t = input()
u = inpuy()
print(t, u, s)

Buggy submission (verdict: Runtime Error):
s = input()
t = input()
u = input()
print(t u s)
Problem p02765 (python)

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

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

Buggy submission (verdict: Runtime Error):
n = input()
k = input()
if n >= 10:
    print(k)
else:
    print(k+(100*(10-n)))

Buggy submission (verdict: Runtime Error):
n = int(input())
k = int(input())
if n>=10:
    print("k")
else:
    print("k+(100*(10-n))")

Buggy submission (verdict: Runtime Error):
n = int(input())
k = int(input())
if n>=10:
    print(int(k))
else:
    print(int(k+(100*(10-n))))

Buggy submission (verdict: Runtime Error):
n = input()
k = input()
if n>=10:
    print(k)
else:
    print(k+(100*(10-n)))

Buggy submission (verdict: Runtime Error):
n = int(input())
k = int(input())
if n>=10:
    print(k)
else:
    print(k+(100*(10-n)))

Buggy submission (verdict: Runtime Error):
n = int(input())
k = int(input())
if n>=10:
  print(k)
else:
  print(k-(100*(10-n)))

Buggy submission (verdict: Runtime Error):
n = int(input())
k = int(input())
if n>=10:
  print(k)
else:
  print(k-(100*(10-n))

Buggy submission (verdict: Runtime Error):
n = int(input())
k = (input())
if n>=10:
  print(k)
else:
  print(k-(100*(10-n))
Problem p03048 (python)

Fixed submission:
R, G, B, N = list(map(int, input().split()))

cnt = 0
for r in range(N//R + 1):
    for g in range((N - r*R)//G + 1):
        if (N-r*R-g*G) % B == 0:
            cnt += 1

print(cnt)

Buggy submission (verdict: Runtime Error):
N = int(input())
Ss=[input() for s in range(N)]
count = [s.count("AB") for s in Ss if "AB" in s]
headcount = len([s for s in Ss if s[0]=="B"])
outcount = len([s for s in Ss if s[-1]=="A"])
if headcount==outcount:
    print(sum(count) + min(headcount, outcount)-1)
else:
    print(sum(count)+min(headcount,outcount))
Problem p03049 (python)

Fixed submission:
N = int(input())
Ss=[input() for s in range(N)]
count = [s.count("AB") for s in Ss]
headcount = len([s for s in Ss if s[0]=="B" and s[-1]!="A"])
outcount = len([s for s in Ss if s[-1]=="A" and s[0]!="B"])
multicount = len([s for s in Ss if s[0]=="B" and s[-1]=="A"])
if outcount==0 and headcount==0:
    if multicount<=0:
        print(sum(count))
    else:
        print(sum(count)+multicount-1)
else:
    print(sum(count)+min(headcount,outcount)+multicount)

Buggy submission (verdict: Runtime Error):
N = int(input())
Ss=[input() for s in range(N)]
count = [s.count("AB") for s in Ss]
headcount = sum([s for s in Ss if s[0]=="B" and s[-1]!="A"])
outcount = sum([s for s in Ss if s[-1]=="A" and s[0]!="B"])
multicount = sum([s for s in Ss if s[0]=="B" and s[-1]=="A"])
if outcount==0 and headcount==0:
    print(sum(count)+multicount-1)
else:
    print(sum(count)+min(headcount,outcount)+multicount)
Problem p03086 (python)

Fixed submission:
Ss=[i for i in input()]
anss = []
counter = 0
for i in range(len(Ss)):
    if Ss[i]!="A" and Ss[i]!="C" and Ss[i]!="G" and Ss[i]!="T":
        anss.append(counter)
        counter=0
    else:
        counter+=1
        anss.append(counter)
if len(anss)!=0:
    print(max(anss))
else:
    print(0)

Buggy submission (verdict: Runtime Error):
Ss=[i for i in input()]
anss = []
counter = 0
for i in range(len(Ss)):
    if Ss[i]!="A" and Ss[i]!="C" and Ss[i]!="G" and Ss[i]!="T":
        anss.append(counter)
        counter=0
    else:
        counter+=1
print(max(anss))
Problem p03109 (python)

Fixed submission:
S = input().split("/")
tuki = S[1]
hi = S[2]
if int(tuki)<4:
    print("Heisei")
else:
    if int(tuki)==4 and int(hi)<=30:
        print("Heisei")
    else:
        print("TBD")

Buggy submission (verdict: Runtime Error):
S = input().split("/")
if S[1]<=4:
    print("Heisei")
else:
    print("TBD")

Buggy submission (verdict: Runtime Error):
S = input().split("/")
tuki = S[1]
hi = S[2]
print(int(tuki))
if int(tuki)<4:
    print("Heisei")
else:
    if int(tuki)==4 and hi<=30:
        print("Heisei")
    else:
        print("TBD")
Problem p03206 (python)

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

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

Fixed submission:
N,T = map(int,input().split())
ans = [int(c) for c,t in [(input().split()) for i in range(N)] if int(t)<=T]
if len(ans)!=0:
    print(min(ans))
else:
    print("TLE")

Buggy submission (verdict: Runtime Error):
N,T = map(int,input().split())
ans = [c for c,t in sorted([(input().split()) for i in range(N)],key=lambda x :x[1]) if int(t)<=T][0]
if len(ans)!=0:
    print(ans)
else:
    print("TLE")

Buggy submission (verdict: Runtime Error):
N,T = map(int,input().split())
ans = [c for c,t in sorted([(input().split()) for i in range(N)],key=lambda x :x[1]) if int(t)<=T][-1]
if len(ans)!=0:
    print(ans)
else:
    print("TLE")
Problem p03273 (python)

Fixed submission:
H,W = map(int,input().split())
ahw = [strlist for strlist in [[s for s in input()] for i in range(H)] if "#" in strlist]
tenti = []
for h in range(W):
   m =  [ah[h] for ah in ahw]
   if "#" in m:
       tenti.append(m)
for ahwnum in range(len(ahw)):
    print("".join([num[ahwnum] for num in tenti]))

Buggy submission (verdict: Runtime Error):
H,W = map(int,input().split())
ahw = [strlist for strlist in [[s for s in input()] for i in range(H)] if "#" in strlist]
tenti = []
for h in range(H-1):
   m =  [ah for ah in ahw[h]]
   if "#" in m:
       tenti.append(m)
for ahwnum in range(len(ahw)):
    print("".join([num for num in tenti[ahwnum]]))
Problem p03294 (python)

Fixed submission:
import math
from functools import reduce
import fractions
def lcm_base(x, y):
    return (x * y)//fractions.gcd(x, y)
def lcm(numbers):
    return reduce(lcm_base, numbers, 1)
N = int(input())
nums= list(map(int,input().split()))
ans = 0
lcmnum= lcm(nums)-1
for num in nums:
    ans+=(int(lcmnum)%num)
print(ans)

Buggy submission (verdict: Runtime Error):
import math
from functools import reduce
def lcm_base(x, y):
    return int((x * y)/math.gcd(x, y))
def lcm(numbers):
    return reduce(lcm_base, numbers, 1)
N = int(input())
nums= list(map(int,input().split()))
ans = 0
lcmnum= lcm(nums)-1
for num in nums:
    ans+=(int(lcmnum)%num)
print(ans)

Buggy submission (verdict: Runtime Error):
import math
from functools import reduce
def lcm_base(x, y):
    kakeru = x*y
    gcd = math.gcd(x,y)
    ans = kakeru//gcd
    return ans
def lcm(numbers):
    return reduce(lcm_base, numbers, 1)
N = int(input())
nums= list(map(int,input().split()))
ans = 0
lcmnum= lcm(nums)-1
for num in nums:
    ans+=(int(lcmnum)%num)
print(ans)

Buggy submission (verdict: Runtime Error):
import math
from functools import reduce
def lcm_base(x, y):
    return ((x * y)//math.gcd(x, y))
def lcm(numbers):
    return reduce(lcm_base, numbers, 1)
N = int(input())
nums= list(map(int,input().split()))
ans = 0
lcmnum= lcm(nums)-1
for num in nums:
    ans+=(int(lcmnum)%num)
print(ans)

Buggy submission (verdict: Runtime Error):
import math
from functools import reduce
def lcm_base(x, y):
    return (x * y)//math.gcd(x, y)
def lcm(numbers):
    return reduce(lcm_base, numbers, 1)
N = int(input())
nums= list(map(int,input().split()))
ans = 0
lcmnum= lcm(nums)-1
for num in nums:
    ans+=(int(lcmnum)%num)
print(ans)

Buggy submission (verdict: Runtime Error):
import math
from functools import reduce
def lcm_base(x, y):
    return (x * y) // math.gcd(x, y)
def lcm(numbers):
    return reduce(lcm_base, numbers, 1)
N = int(input())
nums= list(map(int,input().split()))
ans = 0
lcmnum= lcm(nums)-1
for num in nums:
    ans+=(int(lcmnum)%num)
print(ans)
Problem p03386 (python)

Fixed submission:
A,B,K = map(int,input().split())
ansnums = [A+k for k in range(K) if A+K<=B]
ansnums.extend([B-k for k in range(K) if B-k>=A])
ansnums = sorted(set(ansnums))
for i in ansnums:
    print(i)

Buggy submission (verdict: Runtime Error):
A,B,K = map(int,input().split())
ansnums = [A+k for k in K]
ansnums.extend([B-k for k in K])
ansnums = sorted(set(ansnums))
for i in ansnums:
    print(i)
Problem p03424 (python)

Fixed submission:
N = int(input())
An = set(input().split())
if len(An)==3:
    print("Three")
else:
    print("Four")

Buggy submission (verdict: Runtime Error):
N = int(input())
Ss = set([input() for s in range(N)])
if len(Ss)==3:
    print("Three")
else:
    print("Four")
Problem p03591 (python)

Fixed submission:
S = [i for i in input()]
if len(S)>=4:
  if S[0]=="Y" and S[1] == "A" and S[2]=="K" and S[3] == "I":
    print("Yes")
  else:
    print("No")
else:
  print("No")

Buggy submission (verdict: Runtime Error):
S = [i for i in input()]
if S[0]=="Y" and S[1] == "A" and S[2]=="K" and S[3] == "I":
  print("Yes")
else:
  print("No")
Problem p03610 (python)

Fixed submission:
s = [i for num,i in enumerate(input()) if num%2==0]
print("".join(s))

Buggy submission (verdict: Runtime Error):
atcoder
Problem p03694 (python)

Fixed submission:
N = int(input())
an= sorted(set([int(n) for n in input().split()]))
print(an[-1]-an[0])

Buggy submission (verdict: Runtime Error):
N = int(input())
an= sorted(set([input() for n in range(N)]))
print(an[-1]-an[0])
Problem p03845 (python)

Fixed submission:
import copy
N = int(input())
Ts=list(map(int,input().split()))
M = int(input())
for i in range(M):
    p,x = map(int,input().split())
    anslist = copy.deepcopy(Ts)
    anslist[p-1]=x
    print(sum(anslist))

Buggy submission (verdict: Runtime Error):
N = int(input())
Ts=list(map(int,input().split()))
M = int(input())
for i in range(M):
    p,x = map(int,input().split())
    anslist = copy.deepcopy(Ts)
    anslist[p-1]=x
    print(sum(anslist))
Problem p02705 (python)

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

Buggy submission (verdict: Runtime Error):
if __name__ == '__main__':
    import math
    t = int(raw_input())
    print(t * math.pi)

Buggy submission (verdict: Runtime Error):
r = raw_input()
import math
print(math.pi * r)

Buggy submission (verdict: Runtime Error):
r = raw_intput()
import math
print(math.pi * r)
Problem p02742 (python)

Fixed submission:
import math
H,W=[int(s) for s in input().split(" ")]

if H==1 or W==1:
    print(min(H,W))
else:
    print(math.ceil(H*W/2))

Buggy submission (verdict: Runtime Error):
H,W=int(input().split(" "))

print(int(H*W/2))
Problem p02755 (python)

Fixed submission:
import math
A,B=[int(s) for s in input().split(" ")]
list=[]
for i in range(1010):
    if math.floor(i*0.08)==A and math.floor(i*0.1)==B:
            list.append(i)
list.sort()

print(-1 if list==[] else list[0])

Buggy submission (verdict: Runtime Error):
A,B=[int(s) for s in input().split(" ")]
N1list=[]
N2list=[]

for i in range(0,10,1):
    N1list.append((A+(i/10))/0.08)   
    N2list.append((B+(i/10))/0.1)

N3=-2
N1list.sort(reverse=True)
N2list.sort(reverse=True)

for i in range(len(N1list)+1):
    N=N1list[i]
    if N==int(N):
        for j in range(len(N2list)+1):
            if N==N2list[j]:
                N3=N
                break
    else:
        N4=-1

print(int(N3) if N4<N3 else N4)
Problem p02923 (python)

Fixed submission:
N=int(input())
H=[int(s) for s in input().split()]

count_max=0
count=0
for i in range(N-1):
    if H[i]-H[i+1] >= 0:
        count+=1
        if count > count_max:
            count_max=count
    else:
        count=0

print(count_max)

Buggy submission (verdict: Runtime Error):
N=int(input())
H=[int(s) for s in input().split()]

count_max=0
count=0
for i in range(N-1):
    if H[i]-H[i+1] >= 0:
        count+=1
    else:
        count=0
    if count > count_max:
        count_max=count
        X=j

print(count_max)

Buggy submission (verdict: Runtime Error):
N=int(input())
H=[int(s) for s in input().split()]

count_max=0
count=0
for i in range(N-1):
    if H[i]-H[i+1] >= 0:
        count+=1
    else:
        count=0
    if count > count_max:
        count_max=count
        X=j

print(count_max)
Problem p02957 (python)

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

K=(A+B)/2
print(int(K) if int(K)==K else "IMPOSSIBLE")

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

A=int(A)
B=int(B)

K=0
Ans=0
for K in range(-100000,100000,1):
    if abs(A-K)==abs(B-K):
        print(K)
        Ans=K
        break
if Ans==0:
    print("impossible")
Problem p02994 (python)

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

Apple_List1=[]
Apple_List2=[]
for i in range(N):
    Apple_List1.append(L+i)
    Apple_List2.append(abs(L+i))

#Apple_List=abs(Apple_List)
Apple_List2.sort()

flag=0
if Apple_List2[0] in Apple_List1:
    flag=1
elif -Apple_List2[0] in Apple_List1:
    flag=-1
    
print(sum(Apple_List1)-flag*Apple_List2[0])

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


A=[]
for i in range(N):
    a=L+i
    A.append(a)

T=0
for i in range(N):
    T+=A[i]    

if T>=0:
    A.pop(0)
else:
    A.pop(N)

T2=0
for i in range(N-1):
    T2+=A[i]

print(T2)
Problem p03000 (python)

Fixed submission:
N,X=map(int,input().split(" "))
L=[int(s) for s in input().split(" ")]

bound_List=[0]
for i in range(N):
    bound_List.append(L[i]+bound_List[i])

count=0
for i in bound_List:
    if i<=X:
        count+=1
        
print(count)

Buggy submission (verdict: Runtime Error):
N,X=map(int,input().split(" "))
L=[int(s) for s in input().split(" ")]

Sum=0
Count=0
while Sum<=X and Count<=N+1:
    Sum+=L[Count]
    Count+=1
    
print(Count)

Buggy submission (verdict: Runtime Error):
N,X=map(int,input().split(" "))
L=[int(s) for s in input().split(" ")]

Sum=0
Count=0
while Sum<=X and Count<N+1:
    Sum+=L[Count]
    Count+=1
    
print(Count)
Problem p03037 (python)

Fixed submission:
n, m = list(map(int, input().split()))
 
R, L = [], []
for i in range(m):
    l, r = list(map(int, input().split()))
    R.append(r)
    L.append(l)
  
print(max(min(R) - max(L) + 1, 0))

Buggy submission (verdict: Runtime Error):
import collections
N,M=map(int,input().split(" "))
List=[input().split(" ") for _ in range(M)]

List3=[]
for i in range(M):
    List2=[x for x in range(int(List[i][0]),int(List[i][1])+1)]
    for j in range(len(List2)):
        List3.append(List2[j])
List3.sort()
List4=list(set(List3))

Ans=[0]*len(List3)
for i in range(len(List3)):
    Ans[List3[i]-1]+=1

count=0    
for i in range(len(Ans)):
    if Ans[i]==M:
        count+=1
print(count)
Problem p03219 (python)

Fixed submission:
X,Y=map(int,input().split())
print(X+Y//2)

Buggy submission (verdict: Runtime Error):
X,Y=int(input().split())
print((X+Y)//2)

Buggy submission (verdict: Runtime Error):
X,Y=int(input())
print((X+Y)//2)

Buggy submission (verdict: Runtime Error):
X,Y=int(input())
print(X+Y//2)
Problem p03239 (python)

Fixed submission:
N,T=map(int,input().split())
list=[input() for _ in range(N)]

list1=[]
for i in range(N):
    X,Y=map(int,list[i].split(" "))
    if Y <= T:
        list1.append(X)
print(min(list1) if list1 != [] else "TLE")

Buggy submission (verdict: Runtime Error):
N,T=map(int,input().split())
list=[input() for _ in range(N)]

list1=[]
for i in range(N):
    X,Y=map(int,list[i].split(" "))
    if Y <= T:
        list1.append(X)
print(min(list1))

Buggy submission (verdict: Runtime Error):
N,T=map(int,input().split())
list=[input() for _ in range(N)]

list1=[]
for i in range(N):
    X,Y=map(int,list[i].split(" "))
    if Y < T:
        list1.append(X)
print(min(list1))
Problem p03485 (python)

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

print(-(-(a+b)//2))

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

print(-(-((a+b)//2))

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

print(-~((a+b)/2))
Problem p03636 (python)

Fixed submission:
list=[s for s in input()]
med=len(list)
med2=med-2
print(list[0]+str(med2)+list[med-1])

Buggy submission (verdict: Runtime Error):
list=[s for s in input()]
med=len(list)
print(list[0]+str(med)+list[med])
Problem p04011 (python)

Fixed submission:
list=[input() for i in range(4)]
N,K,X,Y=map(int,list)

print(X*K+Y*(N-K) if N > K else X*N)

Buggy submission (verdict: Runtime Error):
N,K,X,Y=[input() for _ in range(4)]
if N-K>0:    
    print(X*K+Y*(N-K))
else:
    print(X*N)

Buggy submission (verdict: Runtime Error):
N,K,X,Y=[input() for _ in range(4)]
if N-K>=0:    
    print(X*K+Y*(N-K))
else:
    print(X*N)
Problem p04030 (python)

Fixed submission:

n = input()
 
res = []
 
for char in n:
    if char == '0':
        res.append(char)
    elif char == '1':
        res.append(char)
    elif char == 'B':
        if len(res) > 0:
            res.pop()
 
print(''.join(res))

Buggy submission (verdict: Runtime Error):
s = [i for i in input()]

for i in s:
    if i == 'B':
        s.remove(i)
        s.remove(tmp)  
    tmp = i

if s[0] == 'B':
    s.remove('B')
print(''.join(s))

Buggy submission (verdict: Runtime Error):
s = [i for i in input()]

for i in s:
    if i == 'B':
        s.remove(i)
        s.remove(tmp)  
    tmp = i

if s[0] == 'B':
    s.remove('B')
print("".join(s))

Buggy submission (verdict: Runtime Error):
s = [i for i in input()]

for i in s:
    if i == 'B':
        s.remove(i)
        s.remove(tmp)  
    tmp = i

if s[0] == 'B':
    s.remove('B')
print("".join(s))

Buggy submission (verdict: Runtime Error):
s = [i for i in input()]

for i in s:
    if i == 'B':
        s.remove(i)
        s.remove(tmp)  
    tmp = i

if s[0] == 'B':
    s.remove('B')
print("".join(s))

Buggy submission (verdict: Runtime Error):
s = [i for i in input()]

for i in s:
    if i == 'B':
        s.remove(i)
        s.remove(tmp)  
    tmp = i

if s[0] == 'B':
    s.remove('B')
print("".join(s))
Problem p02700 (python)

Fixed submission:
import math
A, B, C, D = input().split()
 
if math.ceil(int(C)*1.0/(int(B)*1.0)) <= math.ceil(int(A)*1.0/(int(D)*1.0)):
  print("Yes")
else:
  print("No")

Buggy submission (verdict: Runtime Error):
import math
A, B, C, D = input().split()
 
if math.ceil(int(C)*1.0/(int(B)*1.0)) >= math.ceil(int(A)*1.0/(int(D)*1.0))
  print("Yes")
else:
  print("No")

Buggy submission (verdict: Runtime Error):
A, B, C, D = input().split()

if math.ceil(int(C)*1.0/(int(B)*1.0)) >= math.ceil(int(A)*1.0/(int(D)*1.0))
  print("Yes")
else:
  print("No")