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

Fixed submission:
print("ABC" if int(input())<1200 else "ARC")

Buggy submission (verdict: Runtime Error):
print("A"+"RB"[input()<1200]+"C")
Problem p03838 (python)

Fixed submission:
a,b=map(int,input().split())
ans=0
if a==b:
  print(0)
  exit()  
if b>0:
  if abs(a)<abs(b):
    if a<0:
      ans+=1
      ans+=b+a  
    else:
      ans+=b-a  
  else:
    if a<0:
      ans+=abs(a)-b+1
    else:
      ans+=a-b+2
else:
  if abs(a)<abs(b):
    if a<0:  
      ans+=2
      ans+=a-b
    else:
      ans+=abs(b)-a
      ans+=1 
  else:
    if a<0:
      ans+=b-a
    else:
      ans+=a+b+1
print(ans)

Buggy submission (verdict: Runtime Error):
a,b=map(int,input().split())
ans=0
if a==b:
  print(0)
  exit()  
if b>0:
  if abs(a)<abs(b):
    if a<0:
      ans+=1
      ans+=b+a  
    else:
      ans+=b-a  
  else:
    if a<0:
      raise "eerot"
      ans+=abs(a)-b+1  #正
    else:
      ans+=a-b+1 #正
else:
  if abs(a)<abs(b):
    if a<0:  
      ans+=2
      ans+=a-b
    else:
      ans+=abs(b)-a
      ans+=1 
  else:
    if a<0:  #正
      ans+=b-a
    else:
      ans+=a+b+1  #正
print(ans)

Buggy submission (verdict: Runtime Error):
a,b=map(int,input().split())
ans=0
if a==b:
  print(0)
  exit()  
if b>0:
  if abs(a)<abs(b):
    if a<0:
      ans+=1
      ans+=b+a  
    else:
      ans+=b-a  
  else:
    raise "eerot"
    if a<0:
      ans+=abs(a)-b+1  #正
    else:
      ans+=a-b+1 #正
else:
  if abs(a)<abs(b):
    if a<0:  
      ans+=2
      ans+=a-b
    else:
      ans+=abs(b)-a
      ans+=1 
  else:
    if a<0:  #正
      ans+=b-a
    else:
      ans+=a+b+1  #正
print(ans)

Buggy submission (verdict: Runtime Error):
a,b=map(int,input().split())
ans=0
if a==b:
  print(0)
  exit()  
if b>0:
  if abs(a)<abs(b):
    raise "eerot"
    if a<0:
      ans+=1
      ans+=b+a  
    else:
      ans+=b-a  
  else:
    if a<0:
      ans+=abs(a)-b+1  #正
    else:
      ans+=a-b+1 #正
else:
  if abs(a)<abs(b):
    if a<0:  
      ans+=2
      ans+=a-b
    else:
      ans+=abs(b)-a
      ans+=1 
  else:
    if a<0:  #正
      ans+=b-a
    else:
      ans+=a+b+1  #正
print(ans)

Buggy submission (verdict: Runtime Error):
a,b=map(int,input().split())
ans=0
if a==b:
  print(0)
  exit()  
if b>0:
  raise "eerot"
  if abs(a)<abs(b):
    if a<0:
      ans+=1
      ans+=b+a  
    else:
      ans+=b-a  
  else:
    if a<0:
      ans+=abs(a)-b+1  #正
    else:
      ans+=a-b+1 #正
else:
  if abs(a)<abs(b):
    if a<0:  
      ans+=2
      ans+=a-b
    else:
      ans+=abs(b)-a
      ans+=1 
  else:
    if a<0:  #正
      ans+=b-a
    else:
      ans+=a+b+1  #正
print(ans)
Problem p03860 (python)

Fixed submission:
a,b,s=input().split()
print(list(a)[0]+list(b)[0]+list(s)[0])

Buggy submission (verdict: Runtime Error):
a,b,x=map(int,input().split())
print(b//x - (a-1)//x)
Problem p03919 (python)

Fixed submission:
h,w,*a=open(0).read().split();b=a.index("snuke")
print([chr(i)for i in range(65,91)][b%int(w)]+str(b//int(w)+1))

Buggy submission (verdict: Runtime Error):
h,w,*a=open(0).read().split();b=a.index("snuke");print([chr(i)for i in range(65,65+int(h))][b%int(w)]+str(b//int(w)+1))
Problem p03946 (python)

Fixed submission:
from copy import*
from numpy import*
a,b=map(int,input().split())
*c,=map(int,input().split())
c1=deepcopy(c)
c2=deepcopy(c)

for i in range(1,a):
    c1[i]=min(c1[i-1],c1[i])
for i in range(a-1,0,-1):
    c2[i-1]=max(c2[i],c2[i-1])

#print(c1,c2)
d=array(c2)-array(c1)
d2=array(c)-array(c1)
print(list(d2).count(max(d)))

Buggy submission (verdict: Runtime Error):
from copy import*
from collections import*
from numpy import*
from itertools import*
a,b=map(int,input().split())
*c,=map(int,input().split())
c1=deepcopy(c)
c2=deepcopy(c)

for i in range(1,a):
    c1[i]=min(c1[i-1],c1[i])
for i in range(a-1,0,-1):
    c2[i-1]=max(c2[i],c2[i-1])

#print(c1,c2)
d=array([k for k,v in groupby(c2)])-array([k for k,v in groupby(c1)])
#print(d)
#print(list(d).count(max(d)))

Buggy submission (verdict: Runtime Error):
from copy import*
from collections import*
from numpy import*
from itertools import*
a,b=map(int,input().split())
*c,=map(int,input().split())
c1=deepcopy(c)
c2=deepcopy(c)

for i in range(1,a):
    c1[i]=min(c1[i-1],c1[i])
for i in range(a-1,0,-1):
    c2[i-1]=max(c2[i],c2[i-1])

#print(c1,c2)
d=array([k for k,v in groupby(c2)])-array([k for k,v in groupby(c1)])
#print(d)
print(list(d).count(max(d)))
Problem p03951 (python)

Fixed submission:
n=int(input())
s=input()
t=input()
l=0
m=max([i for i in range(n+1)if s[-i:]==t[:i]]or[0])
print(2*n-m)

Buggy submission (verdict: Runtime Error):
input();s=input();t=input();print(2*len(s)-max([i for i in range(n+1)if s[-i:]==t[:i]]or[0]))
Problem p03993 (python)

Fixed submission:
n=int(input());s=input().split();print(n-len(set(tuple(sorted([i+1,int(s[i])]))for i in range(n))))

Buggy submission (verdict: Runtime Error):
n=int(input());s=list(input());print(n-len(set(tuple(sorted((i+1,int(s[i*2]))))for i in range(n))))
Problem p04012 (python)

Fixed submission:
import collections
a=list(input())
d=collections.defaultdict(str)
for s in a:
    if s not in d:
        d[s]=1
    else:
        d[s]+=1
c=0
for t in dict(d).values():
    if t%2!=0:
        print("No")
        exit()
print("Yes")

Buggy submission (verdict: Runtime Error):
d={c:list(input()) for c in "abc"}
s="a"
while d[s]:
  s=d[s].pop(0)
print(s.upper())
Problem p04013 (python)

Fixed submission:
import collections as co
n,a=map(int,input().split())
X=[int(x)-a for x in input().split()]
C=co.Counter([0])
for x in X:
  itiji=co.Counter()
  for i,c in C.items():
    itiji[i+x]+=c
  C+=itiji
print(C[0]-1)

Buggy submission (verdict: Runtime Error):
import collections as c
n,a=map(int,input().split())
X=[int(x)-a for x in input().split()]
C=c.Counter([0])
for x in X:
  itiji=Counter()
  for i,c in C.items():
    itiji[i+x]+=c
  C+=itiji
print(C[0]-1)
Problem p04019 (python)

Fixed submission:
s=set(input())
if len(s)%2==0:
  if s==set("SN") or s==set("WE") or s==set("SENW"):
    print("Yes")
  else:
    print("No")
else:
  print("No")

Buggy submission (verdict: Runtime Error):
s=set(input())
if len(s)%2==0:
  if s==set("SN") or s==set("WE"):
    print("Yes")
else:
    print("No")
else:
  print("No")
Problem p04029 (python)

Fixed submission:
N=int(input())
k=0
for s in range(1,N+1):
    k+=s
print(k)

Buggy submission (verdict: Runtime Error):
print(sum(range(int(input()+1))))
Problem p04039 (python)

Fixed submission:
s=set(range(10))
n,k,*a=map(int,open(0).read().split())
a=s-set(a) #使っていい数字
for t in range(n,100000):
    if set(list(map(int,list(str(t)))))<=a:
        print(t)
        break

Buggy submission (verdict: Runtime Error):
n,_=input().split();s={*input()};n=int(n);print(n+[len(s&set(str(b)))for b in range(n,99999)].index(0))
Problem p04044 (python)

Fixed submission:
n,m=map(int,input().split())
A=sorted([input() for s in range(n)])
print("".join(A))

Buggy submission (verdict: Runtime Error):
n,m=map(int,input().split())
A=[]
B=list(map(int,input().split()))
for t in range(10):
     if t not in B:
         A.append(t)
A=set(list(map(str,A)))
for s in range(n,10001):
    if set(list(str(s)))<=A:
        print(s)
        exit()
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]

ans = n - sum
if ans >= 0:
  print(ans)
else:
  print(-1)

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

sum = 0
for i in m:
  sum += A[i]

ans = n - sum
if ans >= 0:
  print(ans)
else:
  print(-1)
Problem p02983 (python)

Fixed submission:
l,r = map(int,input().split())

a = []
r = min(r,l+2019)
for i in range(l,r):
    for j in range(i+1,r+1):
        a.append(i*j%2019)

print(min(a))

Buggy submission (verdict: Runtime Error):
from itertools import combinations
l,r = map(int,input().split())

sc = list(combinations(range(l%2019,(r+1)%2019),2))

print(min([s[0]*s[1] for s in sc]))

Buggy submission (verdict: Runtime Error):
import itertools
l,r = map(int,input().split())

sc = list(itertools.combinations(range(l%2019,(r+1)%2019),2))

print(min([s[0]*s[1] for s in sc]))

Buggy submission (verdict: Runtime Error):
import itertools
l,r = map(int,input().split())

sc = list(itertools.combinations(range(l,r+1),2))

print(min([s[0]*s[1]%2019 for s in sc]))
Problem p03001 (python)

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

if w/2 == x and h/y == 2:
    print(w*h/2,"1")
else:
    print(w*h/2,"0")

Buggy submission (verdict: Runtime Error):
w,h,x,y = map(int,input().split())

if w//2 == x and h//y == 2:
    print(w*h/2,"1")
else:
    print(w*h/2,"0")
Problem p03086 (python)

Fixed submission:
s = list(input())

cnt = []
c = 0
for i in s:
    if i == "A" or i == "C" or i == "G" or i == "T":
        c += 1
    else:
        cnt.append(c)
        c = 0
cnt.append(c)

print(max(cnt))

Buggy submission (verdict: Runtime Error):
s = list(input())

cnt = []
c = 0
for i in s:
    if i == "A" or i == "C" or i == "G" or i =="T":
        c += 1
    else:
        cnt.append(c)
        c = 0

print(max(cnt))

Buggy submission (verdict: Runtime Error):
s = list(input())

cnt = []
c = 0
for i in s:
    print(i)
    if i == "A" or i == "C" or i == "G" or i =="T":
        c += 1
    else:
        cnt.append(c)
        c = 0

print(max(cnt))
Problem p03262 (python)

Fixed submission:
import fractions

N,X = map(int,input().split())
x = list(map(int,input().split()))

y = [0] * N
for i in range(N):
    y[i] = abs(X-x[i])

ans = y[0]
for i in range(1,N):
    ans = fractions.gcd(ans,y[i])
print(ans)

Buggy submission (verdict: Runtime Error):
import math
from functools import reduce

def gcd_list(numbers):
    return reduce(math.gcd, numbers)

N,X = map(int,input().split())
x = list(map(int,input().split()))

y = [0] * N
for i in range(N):
    y[i] = abs(X-x[i])

print(gcd_list(y))
Problem p03294 (python)

Fixed submission:
import fractions

N = int(input())
a = list(map(int,input().split()))

ans = a[0]
for i in range(1,N):
    ans = ans * a[i] // fractions.gcd(ans, a[i])

cnt = 0
for i in a:
    cnt += (ans-1)%i

print(cnt)

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)

def lcm_list(numbers):
    return reduce(lcm_base, numbers, 1)

N = int(input())
a = list(map(int,input().split()))

j = lcm_list(a)

cnt = 0
for i in a:
    cnt += (j-1)%i

print(cnt)
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:
    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())
if a % d = 0:
    e = a / d
else:
    e = a / d + 1

if c % d == 0:
    f = c / b
else:
    f = a / d + 1
    
if e > f:
    print("Yes")
elif e == f:
    print("Yes")
else:
    print("No")
Problem p02718 (python)

Fixed submission:
x,y = map(int,input().split())
li = list(map(int,input().split()))	
cnt = 0
for i in range(len(li)):
    if li[i] >= sum(li) / (4*y):
        cnt += 1
else:
    pass

if cnt >= y:
    print("Yes")
else:
    print("No")

Buggy submission (verdict: Runtime Error):
x,y = map(int,input().split())
li = list(map(int,input().split()))	
cnt = 0
for i in range(len(li)):
    if li[i] >= sum(li) / (4*y)):
        cnt += 1
else:
    pass

if cnt >= y:
    print("Yes")
else:
    print("No")
Problem p02760 (python)

Fixed submission:
import sys
li = [list(map(int,input().split())) for i in range(3)]
n = int(input())
k = [int(input()) for i in range(n)]
cnt = 0
for i in range(3):
    for j in range(3):
        if li[i][j] in k:
            li[i][j] = -1
        else:
            pass
for a in range(3):
    if li[a][0] == li[a][1] == li[a][2] == -1:
        print("Yes")
        exit()
    else:
        pass
for b in range(3):
    if li[0][b] == li[1][b] == li[2][b] == -1:
        print("Yes")
        exit()
    else:
        pass
if li[0][0] == li[1][1] == li[2][2] == -1:
    print("Yes")
    exit()

elif li[0][2] == li[1][1] == li[2][0] == -1:
    print("Yes")
    exit()
else:
    print("No")

Buggy submission (verdict: Runtime Error):
import sys
li = [list(map(int,input().split())) for i in range(3)]
n = int(input())
cnt = 0
for i in range(2):
    for j in range(2):
        for k in int(input()):
            if li[i][j] == k:
                li[i][j] == -1
            else:
                pass

for a in range(2):
    if li[a][0] == li[a][1] == li[a][2] == -1:
        print("Yes")
        sys.exit()
    else:
        pass
for b in range(2):
    if li[0][[b] == li[1][[b] == li[2][[b] == -1:
        print("Yes")
        sys.exit()
    else:
        pass
if li[0][[0] == li[1][[1] == li[2][[2] == -1:
    print("Yes")
    sys.exit()
else:
    pass
if li[0][[2] == li[1][[1] == li[2][[0] == -1:
    print("Yes")
    sys.exit()
else:
    print("No")
Problem p02812 (python)

Fixed submission:
n = int(input())
lie = input()
li = list(lie)
cnt = 0
for i in range(len(li) - 2):
    if li[i] == "A" and li[i+1] == "B" and li[i+2] == "C":
        cnt += 1
    else:
        pass
print(cnt)

Buggy submission (verdict: Runtime Error):
n = int(input())
lie = input()
li = list(lie)
cnt = 0
for i in range(len(li)):
    if li[i] == "A" and li[i+1] == "B" and li[i+2] == "C":
        cnt += 1
    else:
        pass
print(cnt)
Problem p03161 (python)

Fixed submission:
n,k = map(int,input().split())	
li = tuple(map(int,input().split()))
dp = [0] + [float("inf")]*(n-1)
for i in range(1,n):
    for j in range(max(0, i-k),i):
        dp[i] = min(dp[i], dp[j] + abs(li[i] - li[j]))
print(dp[-1])

Buggy submission (verdict: Runtime Error):
n,k = map(int,input().split())	
li = list(map(int,input().split()))
dp = [0] + [float("inf")]*(n-1)
for i in range(1,n):
    for j in range(max(0, i-k),i):
        dp[i] = min(dp[i], dp[j] + abs(li[i-k] - li[i]))
print(dp[-1])
Problem p02861 (python)

Fixed submission:
import math
n = int(input())
x = []
y = []
sum = 0
for i in range(n):
    x1,y1=[int(i) for i in input().split()]
    x.append(x1)
    y.append(y1)
for i in range(n):
    for j in  range(n):
        sum += math.sqrt((x[i]-x[j])**2+(y[i]-y[j])**2)
average  = (math.factorial(n)/n)*sum/(math.factorial(n))
print(average)

Buggy submission (verdict: Runtime Error):
import math
n = int(input())
x = []
y = []
sum = 0
for i in range(n):
    x1,y1=[int(i) for i in input().split()]
    x.append(x1)
    y.append(y1)
for i in range(3):
    for j in  range(3):
        sum += math.sqrt((x[i]-x[j])**2+(y[i]-y[j])**2)
average  = 2*sum/(math.factorial(n))
print(average)
Problem p02887 (python)

Fixed submission:
n = int(input())
s_list = list(input())
count = 0
for i in range(n-1):
    if s_list[i] != s_list[i+1]:
        count += 1
output = count+1
print(output)

Buggy submission (verdict: Runtime Error):
n = int(input())
s = input()
s_list = list(s)
count = 0
for i in range(n):
    while s_list[i] != s_list[i+1]:
        count += 1
output = count+1
print(output)
Problem p02789 (python)

Fixed submission:
n, m = map(int,input().split())
print("Yes") if n == m else print("No")

Buggy submission (verdict: Runtime Error):
def gcd(a, b):
    while b != 0:
        a, b = b, a % b
    return a


def lcm(a, b):
    return a * b // gcd(a, b)


n = int(input())
a = list(map(int, input().split()))
lcm_a = a[0]

for i in range(1, n):
    lcm_a = lcm(lcm_a, a[i])

ans = 0

for i in a:
    ans += lcm_a // i

print(ans%1000000007)
Problem p02945 (python)

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

print(max(a+b,a-b,a*b))

Buggy submission (verdict: Runtime Error):
K,X = map(int,input().split())

list = []

for i in range(X-K+1,X+K):
    list.append(i)

print(" ".join(map(str,list))

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

print(max(a+b,a-b,a*b))

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

print(max(a+b,a-b,a*b))
Problem p02946 (python)

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

list = []

for i in range(X-K+1,X+K):
    list.append(i)

print(" ".join(map(str,list)))

Buggy submission (verdict: Runtime Error):
K,X = map(int,input().split())

list = []

for i in range(X-K+1,X+K):
    list.append(i)

print(" ".join(map(int,list))
Problem p02957 (python)

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

if (a+b)%2 == 0:
    print(int((a+b)/2))
else:
    print("IMPOSSIBLE")

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

if (a+b)%2 == 0:
    print((a+b)/2)
else:
    print("IMPOSSIBLE")
Problem p03282 (python)

Fixed submission:
S = input()
K = int(input())

def check_one(sgn,arr):
    cnt = 0
    for i in range(sgn):
        if S[i] == '1':
            cnt += 1
    if cnt == sgn:
        return True

def first_num(arr):
    list = []
    for i in range(len(arr)):
        if arr[i] != '1':
            list.append(int(arr[i]))
    return list[0]
            

if len(S) >= K and check_one(K,S):
        print(1)
else:
    print(first_num(S))

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

def check_one(sgn,arr):
    cnt = 0
    for i in range(sgn):
        if S[i] == '1':
            cnt += 1
    if cnt == sgn:
        return True

def first_num(arr):
    list = []
    for i in range(len(arr)):
        if arr[i] != '1':
            list.append(int(arr[i]))
    return list[0]
            

if len(S) > K:
    if check_one(K,S):
        print(1)
else:
    print(first_num(S))
Problem p02705 (python)

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

Buggy submission (verdict: Runtime Error):
r=int(input())
print(2r*3.14)
Problem p02708 (python)

Fixed submission:
n, k = map(int, input().split())
s_1 = 0
s_2 = 0
s_3 = 0
mod = 1000000007
ans = 0
for i in range(k, n + 2):
    s_1 = (n + n + 1 - i) * i // 2
    s_2 = (0 + i - 1) * i // 2
    s_3 += s_1 + 1 - s_2
ans = s_3 % 1000000007
print(ans)

Buggy submission (verdict: Runtime Error):
s_1 = 0
s_2 = 0
s_3 = 0
mod = 1000000007
ans = 0
for i in range(k, n + 2):
    s_1 = (n + n + 1 - i) * i / 2
    s_2 = (0 + i - 1) * i / 2
    s_3 += s_1 + 1 - s_2
ans = s_3 % 1000000007
print('{:g}'.format(ans))
Problem p02705 (python)

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

Buggy submission (verdict: Runtime Error):
# summer vacations, number of assignments
N, M = list(map(int, input().split()))
# each entry in A represents number of days to do the assignment
A = list(map(int, input().split()))

number_of_days_required = sum(A)
maximum_hangout_days = N - number_of_days_required
if maximum_hangout_days >= 0:
    print(maximum_hangout_days)
else:
    print(-1)
Problem p02706 (python)

Fixed submission:
# summer vacations, number of assignments
N, M = list(map(int, input().split()))
# each entry in A represents number of days to do the assignment
A = list(map(int, input().split()))

number_of_days_required = sum(A)
maximum_hangout_days = N - number_of_days_required
if maximum_hangout_days >= 0:
    print(maximum_hangout_days)
else:
    print(-1)

Buggy submission (verdict: Runtime Error):
# summer vacations, number of assignments
N, M = list(map(int, input().split()))
# each entry in A represents number of days to do the assignment
A = list(map(int, input().split()))

number_of_days_required = sum(A)
maximum_hangout_days = N - number_of_days_required
if maximum_hangout_days >= 0:
  	print(maximum_hangout_days)
  else:
    print(-1)

Buggy submission (verdict: Runtime Error):
# summer vacations, number of assignments
N, M = list(map(int, input().split()))
# each entry in A represents number of days to do the assignment
A = list(map(int, input().split()))

number_of_days_required = sum(A)
maximum_hangout_days = N - number_of_days_required
if maximum_hangout_days >= 0:
  print(maximum_hangout_days)
  else:
    print(-1)
Problem p02717 (python)

Fixed submission:

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

if (a == b == c):
    print(str(a) + ' ' + str(b) + ' ' + str(c))
else:
    a, b = b, a
    a, c = c, a
    print(str(a) + ' ' + str(b) + ' ' + str(c))

Buggy submission (verdict: Runtime Error):
T

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

if (a == b == c):
    print(f'{a} {b} {c}')
else:
    a, b = b, a
    a, c = c, a
    print(f'{a} {b} {c}')
Problem p02718 (python)

Fixed submission:
# number of items, number of popular items to select
n, m = list(map(int, input().split()))

item_votes = list(map(int, input().split()))

total_item_votes = sum(item_votes)

item_vote_percentages = [item_votes/total_item_votes for item_votes in item_votes]

required_vote_percentage = 1/(4*m)

can_select = 0
for vote_percentage in item_vote_percentages:
    if vote_percentage >= required_vote_percentage:
        can_select += 1

if can_select >= m:
    print('Yes')
else:
    print('No')

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

item_votes = list(map(int, input().split()))

total_item_votes = sum(item_votes)

item_vote_percentages = [item_votes/total_item_votes for item_votes in item_votes]

required_vote_percentage = 1/(4*m)

can_select = 0
for vote_percentage in item_vote_percentages:
  if vote_percentage > required_vote_percentage:
    can_select += 1

    if can_select >= m:
      print('Yes')
      else:
        print('No')
Problem p02705 (python)

Fixed submission:
R=int(input())
print(R*6.28)

Buggy submission (verdict: Runtime Error):
R=int(input)
print(R*6.28)
Problem p02765 (python)

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

Buggy submission (verdict: Runtime Error):
a,b=map(int,input().split())
count=1
for i in range(1,100):
    if a/(b**i)>=1:
        count+=1
    else:
        break
print(count)

Buggy submission (verdict: Runtime Error):
a,b=map(int,input().split())
count=1
for i in range(1,100):
    if a/(b**i)>1:
        count+=1
    else:
        break
print(count)

Buggy submission (verdict: Runtime Error):
a,b=map(int,input().split())
i=1
while a//b>=b:
    a=a//b
    i+=1
if i != 1:
    i+=1
print(i)
Problem p02789 (python)

Fixed submission:
a,b=map(int,input().split())
if a==b:
    print("Yes")
else:
    print("No")

Buggy submission (verdict: Runtime Error):
a,b=map(int,input().split())
if a==b
    print("Yes")
else:
    print("No")
Problem p02969 (python)

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

Buggy submission (verdict: Runtime Error):
r=int(input())
print(3*a**2)
Problem p03071 (python)

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

if a==b:
    print(a+b)
else:
    c=max(a,b)
    print(c+(c-1))

Buggy submission (verdict: Runtime Error):
a,b=map(int,input().split())
if a==b:
    print(a+b)
else:
    c=max(a,b)
print(c+(c-1))
Problem p03351 (python)

Fixed submission:
a,b,c,d=map(int,input().split())
if abs(a-c)<= d: 
    print("Yes")
elif abs(a-b)<=d and abs(b-c)<=d:
    print("Yes")
else:
    print("No")

Buggy submission (verdict: Runtime Error):
a,b,c,d=map(int,input().split())
if abs(a-c)<= d 
    print("Yes")
elif abs(a-b)<=d and abs(b-c)<=d:
    print("Yes")
else:
    print("No")
Problem p03377 (python)

Fixed submission:
a,b,c=map(int,input().split())
if a<=c and a+b>=c:
    print("YES")
else:
    print("NO")

Buggy submission (verdict: Runtime Error):
a,b,c=map(int,input().split())
if a<=c and a+b<=c
    print("YES")
else:
    print("NO")
Problem p03005 (python)

Fixed submission:
n,k= map(int,input().split())
if k==1:
    ans=0
else:
    ans=n-k
print(ans)

Buggy submission (verdict: Runtime Error):
n,k＝ map(int,input().split())
if k=1:
    print(0)
else:
    print(n-k)
Problem p03068 (python)

Fixed submission:
n=int(input())
s=list(input())
k=int(input())
ans=''
for i in range(n):
    if s[i]!=s[k-1]:
        ans+='*'
    else:
        ans+=s[i]
print(ans)

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)