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

Fixed submission:
import math
a, b = (int(_) for _ in input().split())  
res = float(sum([(1/2 ** (math.ceil(math.log2(b/i)))) if i < b else 1 for i in range(1,a+1)]) / a)
print(res)

Buggy submission (verdict: Runtime Error):
a, b = (int(_) for _ in input().split())  
res = float(sum([(1/2 ** (math.ceil(int(b/i)**(1/2)))) if i < b else 1 for i in range(1,a+1)]) / a)
print(res)
Problem p03079 (python)

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

if max(a) == min(a):
  print("Yes")
else:
  print("No")

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

if max(a) == min(a):
  print("Yes")
else:
  print("No")
Problem p03080 (python)

Fixed submission:
n = int(input())
l = list(input())
if l.count("R") > int(n/2):
  print("Yes")
else:
  print("No")

Buggy submission (verdict: Runtime Error):
n = num(input())
l = list(input())
if l.count("R") > int(n/2):
  print("Yes")
else:
  print("No")
Problem p03085 (python)

Fixed submission:
print("ACGT"["TGCA".find(input())])

Buggy submission (verdict: Runtime Error):
print(["ACGT"]["CATG".find(input())])
Problem p03149 (python)

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

if 1 in a and 9 in a and 7 in a and 4 in a:
  print("YES")
else:
  print("NO")

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

if a in 1 and a in 9 and a in 7 and a in 4:
  print(YES)
else:
  print(NO)
Problem p03151 (python)

Fixed submission:
n = int(input())
a = list(map(int, input().split()))
b = list(map(int, input().split()))
res = 0
d = 0

if sum(a) < sum(b):
    res = -1
else:
    c = [a[i] - b[i] for i in range(n)]
    c1 = [i if i > 0 else 0 for i in c]
    c2 = sum([i if i < 0 else 0 for i in c])
    c3 = sum([1 if i < 0 else 0 for i in c])
    if c2 < 0:
        c4 = sorted(c1, reverse=True)
        for i in range(n):
            d = d + c4[i]
            if d + c2 > 0:
                res = c3 + i + 1
                break

print(res)

Buggy submission (verdict: Runtime Error):
n = int(input())
a = list(map(int, input().split()))
b = list(map(int, input().split()))
res = 0
d = 0

if sum(a) < sum(b):
    res = -1
else:
    c = [a[i] - b[i] for i in range(n)]
    c1 = [i if i > 0 else 0 for i in c]
    c2 = sum([i if i < 0 else 0 for i in c])
    c3 = sum([1 if i < 0 else 0 for i in c])
    if c2 < 0:
      	c4 = sorted(c1, reverse=True)
        for i in range(n):
            d = d + c4[i]
            if d + c2 > 0:
                res = c3 + i
                break

print(res)
Problem p03211 (python)

Fixed submission:
a = input()
b = 753
res = float("inf")
l = len(a)

for i in range(0,l-2):
    n = abs(b-int(a[i:i+3]))
    if res > n:
        res = n
        
print(int(res))

Buggy submission (verdict: Runtime Error):
a = input()
b = 753
res = float("inf")
l = len(a)

for i in range(1,l-3):
    n = abs(b-int(a[i:i+3]))
    if res > n:
        res = n
        
print(n)
Problem p03238 (python)

Fixed submission:
n = int(input())
 
if n == 1:
  print("Hello World")
else:
  print(int(input())+int(input()))

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

if n = 1:
  print("Hello World")
else:
  print(int(input())+int(input()))
Problem p03264 (python)

Fixed submission:
x = int(input())

if x % 2 == 0:
  print(int((x//2)**2))
else:
  print(int((x//2)*((x//2)+1)))

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

if x % 2 == 0:
  print(int((x//2)**2))
else:
  print(int((x//2)*((x//2)+1))
Problem p03352 (python)

Fixed submission:
x = int(input())
print(max([i**ii for i in range(1,34) for ii in range(2,11) if i**ii <= x]))

Buggy submission (verdict: Runtime Error):
x = int(input())
print(max([i**ii for i in range(2,34) for ii in range(2,11) if i**ii <= x]))

Buggy submission (verdict: Runtime Error):
x = int(input())
print(max([int(x**(1/i))**i for i in range(10)]))

Buggy submission (verdict: Runtime Error):
x = int(input())
print(max([int(x**(1/i))**i for i in range(100)]))
Problem p03485 (python)

Fixed submission:
import math
print(math.ceil(sum([int(i) for i in input().split()] )/ 2))

Buggy submission (verdict: Runtime Error):
print(round(mean([int(i) for i in input().split()] )))
Problem p03623 (python)

Fixed submission:
x, a, b = (int(i) for i in input().split())
if abs(a-x) > abs(b-x):
  print("B")
else:
  print("A")

Buggy submission (verdict: Runtime Error):
x = int(input())
a, b = (abs(int(i)-x) for i in input().split())
if a > b:
  print("B")
else:
  print("A")
Problem p03697 (python)

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

if sum(a) > 9:
  print("error")
else:
  print(sum(a))

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

if sum(a,b) > 9:
  print("error")
else:
  print(sum(a,b))
Problem p03760 (python)

Fixed submission:
# 文字列の入力
O = input()
E = input() + " "

L = len(O)
TMP = ""

for i in range(L):
    TMP = TMP+O[i]+E[i]

print(TMP.strip())

Buggy submission (verdict: Runtime Error):
# 文字列の入力
O = input()
E = input()

L = len(O)
TMP = ""

for i in range(L):
    TMP = TMP+O[i]+E[i]

print(TMP)

Buggy submission (verdict: Runtime Error):
# 文字列の入力
O = char(input())
E = char(input())

L = len(O)
TMP = ""

for i in range(L):
    TMP = TMP+O[i]+E[i]

print(TMP)

Buggy submission (verdict: Runtime Error):
# 文字列の入力
O = char(input())
E = char(input())

L = len(O)
TMP = ""

for i in range(L):
    TMP = str(TMP+O[i]+E[i])

print(TMP)

Buggy submission (verdict: Runtime Error):
# 文字列の入力
O = char(input())
E = char(input())

L = len(O)
TMP = ""

for i in 0:L:
    TMP = str(TMP+O[i]+E[i])

print(TMP)
Problem p03761 (python)

Fixed submission:

a = int(input())
b = []
c = []
ans = ""

for i in range(a):
    b.append(input())
    c.append(len(b[i]))

alpha = [chr(i) for i in range(97,97+26)]

for ii in range(26):
    d = []
    for i in range(a):
        d.append(b[i].count(alpha[ii]))
    ans = ans + (alpha[ii] * min(d))
           
print(ans)

Buggy submission (verdict: Runtime Error):

a = int(input())
b = []
c = []
ans = ""

for i in range(a):
    b.append(input())
    c.append(len(b[i]))

print(b[1])
print(min(c))

alpha = [chr(i) for i in range(97,97+26)]
print(alpha)

if min(c) >= a:
    for ii in range(26):
        d = []
        for i in range(a):
            d.append(b[i].count(alpha[ii]))
        ans = ans + (alpha[ii] * min(d))
        if len(ans) > a:
            break

if len(ans) < a:
    ans = ""
else:
    ans[0:a-1]
            
print(ans)

Buggy submission (verdict: Runtime Error):

a = int(input())
b = []
c = []
ans = ""

for i in range(a):
    b.append(input())
    c.append(len(b[i]))

print(b[1])
print(min(c))

alpha = [chr(i) for i in range(97,97+26)]
print(alpha)

if min(c) >= a:
    for ii in range(26):
        d = []
        for i in range(a):
            d.append(b[i].count(alpha[ii]))
        ans = ans + (alpha[ii] * min(d))
        if len(ans) > a:
            break

if len(ans) < a:
    ans = ""
else:
    ans[0:a-1]
            
print(ans)

Buggy submission (verdict: Runtime Error):
from goto import goto, label

a = int(input())

for i in range(a):
    b[i] = input()
    c[i] = len(b[i])

alpha = [chr(i) for i in range(97,97+26)]

if min(c) < a:
    ans = ""
else:
    for ii in range(25):
        for i in range(a):
            d[i] = b[i].count(alpha[ii])
            ans = ans + alpha[ii] * min(d)
            if len(ans) > a:
                goto .END
label .END

Buggy submission (verdict: Runtime Error):
from goto import goto, label

a = int(input())

for i in range(a):
    b[i] = input()
    c[i] = len(b[i])

alpha = [chr(i) for i in range(97,97+26)]

if min(c) < a:
    ans = ""
else
    for ii in range(25):
        for i in range(a):
            d[i] = b[i].count(alpha[ii])
            ans = ans + alpha[ii] * min(d)
            if len(ans) > a:
                goto .END
label .END
Problem p03762 (python)

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

x = 0
y = 0

for i in range(1,a[0]):
    x = x + b[i] - b[0]
    
xx = x
for i in range(1,a[0]-1):
    xx = xx - ((b[i] - b[i - 1]) * (a[0] - i))
    x = x + xx

for i in range(1,a[1]):
    y = y + c[i] - c[0]
    
yy = y
for i in range(1,a[1]-1):
    yy = yy - ((c[i] - c[i - 1]) * (a[1] - i))
    y = y + yy

ans = x * y
ans = ans % (10**9 + 7)

print(ans)

Buggy submission (verdict: Runtime Error):
a = map(int,input().split(" "))
b = map(int,input().split(" "))
c = map(int,input().split(" "))
bs = sorted(b)
cs = sorted(c)

x = 0

f = range(a[0])
g = range(a[1])

for i in range(a[0]):
    for ii in range(i,a[0]):
        for j in range(a[1]):
            for jj in range(j,a[1]):
                x = x + ((bs[ii] - bs[i]) * (cs[jj] - cs[j]))
                if x > (10**9 + 7):
                    x = x % (10**9 + 7)

ans = x

print(ans)

Buggy submission (verdict: Runtime Error):
a = map(int,input().split(" "))
b = map(int,input().split(" "))
c = map(int,input().split(" "))
bs = sorted(b)
cs = sorted(c)

x = 0

f = range(a[0])
g = range(a[1])

for i in range(a[0]):
    for ii in range(i,a[0]):
        for j in range(a[1]):
            for jj in range(j,a[1]):
                x = x + ((bs[ii] - bs[i]) * (cs[jj] - cs[j]))
                print(bs[ii] , bs[i] , cs[jj] , cs[j] , x)
                if x > (10**9 + 7):
                    x = x % (10**9 + 7)

ans = x


print(ans)

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

d = max(b)- min(b)
e = max(c)- min(c)

f = sum(range(a[0]))
g = sum(range(a[1]))

ans = (d * e * f * g) % (10**9 + 7)

print(ans)

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

d = max(b)- min(b)
e = max(c)- min(c)

f = sum(range(a[0]))
g = sum(range(a[1]))

ans = (d * e * f * g) % (10**9 + 7)

print(ans)

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

d = max(b)- min(b)
e = max(c)- min(c)

f = sum(range(a[0]))
g = sum(range(a[1]))

ans = (d * e * f * g) % (10**9 + 7)



print( (10**9 + 7))

print(ans)
Problem p03844 (python)

Fixed submission:
a, b, c = (i for i in input().split())  
if b == "+":
  print(int(a) + int(c))
else:
  print(int(a) - int(c))

Buggy submission (verdict: Runtime Error):
a, b, c = (int(i) for i in input().split())  
if b == "+":
  print(int(a) + int(c))
else:
  print(int(a) - int(c))
Problem p03944 (python)

Fixed submission:
W,H,N = (int(i) for i in input().split())

l = [list(map(int, input().split())) for i in range(N)] 

x_max = max([i[0] if i[2] == 1 else 0 for i in l])
x_min = min([i[0] if i[2] == 2 else W for i in l])
y_max = max([i[1] if i[2] == 3 else 0 for i in l])
y_min = min([i[1] if i[2] == 4 else H for i in l])

x = min(x_max+(W-x_min),W)
y = min(y_max+(H-y_min),H)

print(W*H - x*H - y*W + x*y)

Buggy submission (verdict: Runtime Error):
W,H,N = (int(i) for i in input().split())

l = [list(map(int, input().split())) for i in range(N)] 

x_max = max([i[0] for i in l if i[2] == 1])
x_min = min([i[0] for i in l if i[2] == 2])
y_max = max([i[1] for i in l if i[2] == 3])
y_min = min([i[1] for i in l if i[2] == 4])

x = min(x_max+(W-x_min),W)
y = min(y_max+(H-y_min),H)

print(W*H - x*H - y*W + x*y)

Buggy submission (verdict: Runtime Error):
W,H,N = (int(i) for i in input().split())

l = [list(map(int, input().split())) for i in range(N)] 

x_min = min([i[0] for i in l if i[2] == 1])
x_max = max([i[0] for i in l if i[2] == 2])
y_min = min([i[1] for i in l if i[2] == 3])
y_max = max([i[1] for i in l if i[2] == 4])

print((W - max(0,x_max-x_min)) * (H - max(0,y_max-y_min)))
Problem p04012 (python)

Fixed submission:
x = input()
s = set(list(x))
f = 0
for i in s:
  if x.count(i) % 2 == 1:
    f = 1
    break
  
if f == 1:
  print("No")
else:
  print("Yes")

Buggy submission (verdict: Runtime Error):
x = input()
s = set(list(x))
f = 0
for i in s:
  x.count(i) % 2 == 1:
    f = 1
    break
  
if f == 1:
  print("No")
else:
  print("Yes")
Problem p02780 (python)

Fixed submission:
n, k = map(int, input().split())
p_list = list(map(int, input().split()))

for i in range(n):
    p_list[i] = (1 + p_list[i]) / 2

wa = sum(p_list[0:k])
ans = wa

for j in range(n-k):
    wa = wa + p_list[j+k] - p_list[j]
    ans = max(ans, wa)
    
print(ans)

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

for i in range(n):
    p_list[i] = (1 + p_list[i]) * 0.5

wa = sum(p_list[0:k])

for j in range(n-k):
    wa = wa + p_list[j+k] - p_list[j]
    ans = max(ans, wa)
    
print(ans)
Problem p02909 (python)

Fixed submission:
S = input()
if S == "Sunny":
    print("Cloudy")
if S == "Cloudy":
    print("Rainy")
if S == "Rainy":
    print("Sunny")

Buggy submission (verdict: Runtime Error):
S = input()
if S == "Sunny":
    print("Cloudy")
if S == "Cloudy":
    pirnt("Rainy")
if S == "Rainy":
    print("Sunny")

Buggy submission (verdict: Runtime Error):
S = input()
if S = "Sunny":
    print("Cloudy")
if S = "Cloudy":
    pirnt("Rainy")
if S = "Rainy":
    print("Sunny")
Problem p02921 (python)

Fixed submission:
s = input()
t = input()
count = 0
if s[0] == t[0]:
    count = count + 1
if s[1] == t[1]:
    count = count +1
if s[2] == t[2]:
    count = count +1

print(count)

Buggy submission (verdict: Runtime Error):
s = input()
t = input()
count = 0
if s[0] == t[0]:
    count = count + 1
if s[1] == t[1]:
    count = count +1
if s[2] == t[2]:
    count = coiunt +1

print(count)
Problem p02995 (python)

Fixed submission:
#最大公約数
def gcd(a, b):
    while b:
        a, b = b, a%b
    return a

#最小公倍数
def lcm(a, b):
    return a * b // gcd(a, b)

A, B, C, D = map(int, input().split())

A = A -1
c_num = B//C - A//C
d_num = B//D - A//D
    
lcm_num = lcm(C, D)

cd_num = B//lcm_num - A//lcm_num
    
print(B - A - c_num - d_num + cd_num)

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

if A%C==0:
    c_num = B//C - A//C + 1
else:
    c_num = B//C - A//C

if A%D==0:
    d_num = B//D - A//D + 1
else:
    d_num = B//D - A//D

print(B - A + 1 - c_num - d_num + cd_num)
Problem p03029 (python)

Fixed submission:
#りんごの数とかけらの数
A, P = map(int, input().split())
#合計のかけらの数
sum_p = A*3 + P
print(sum_p // 2)

Buggy submission (verdict: Runtime Error):
#りんごの数
A = int(input())
#かけらの数
P = int(input())
#合計のかけらの数
sum_p = A*3 + P
print(sum_p // 2)
Problem p03102 (python)

Fixed submission:
import numpy as np
n, m, c = map(int, input().split())
#listを作成
B = list(map(int, input().split()))
count = 0
#Aの値を受け取る
for i in range(n):
    a = list(map(int, input().split()))
    s = np.dot(a, B) + c
    if s > 0:
        count = count + 1
    else:
        pass

print(count)

Buggy submission (verdict: Runtime Error):
n, m, c = map(int, input().split())
#listを作成
B = list(map(int, input().split()))
count = 0
#Aの値を受け取る
for i in range(n):
    a = list(map(int, input().split()))
    s = a[0] * B[0] + a[1] * B[1] + a[2] * B[2] + c
    if s > 0:
        count = count + 1
    else:
        pass

print(count)
Problem p03433 (python)

Fixed submission:
N = int(input())
A = int(input())
if N % 500 <= A:
    print("Yes")
else:
    print("No")

Buggy submission (verdict: Runtime Error):
N = input()
A = input()
if N % 500 <= A:
    print("YES")
else:
    print("NO")

Buggy submission (verdict: Runtime Error):
N, A = map(int, input().split())
if N % 500 <= A:
    print("YES")
else:
    print("NO")
Problem p03323 (python)

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

if a < 9 and b < 9:
  print("Yay!")
else:
  print(":(")

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

if a <9 and b < 9:
  print("Yay")
else:
  print(":(")
Problem p03324 (python)

Fixed submission:
d, n = map(int,input().split())

result = 0
for i in range(1,n+1):
  if i // 100 == 0:
    result = i*(100**d)
  else:  
    j = 1
    result = (i+j)*(100**d)

print(result)

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

result = 0
for i in range(1,n+1):
  if i // 100 == 0:
    result = i*(100**d)
  else:  
    result = (i+j)*(100**d)

print(result)
Problem p03351 (python)

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

if abs(a-c) <= d or (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,inout().split())

if a-c >= d or (a-b >= d and b-c >= d):
  print("Yes")
else:
  print("No")

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

if a-c >= d or (a-b >= d and b-c >= d):
  print("Yes")
else:
  print("No")
Problem p03359 (python)

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

if a <= b:
  print(a)
else:
  print(a-1)

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

if a <= b:
  print(a)
else:
  print(b%a)
Problem p03377 (python)

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

if a+b >= x:
  if a > x:
    print("NO")
  else:
    print("YES")
else:
  print("NO")

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

if a+b > b:
  print("YES")
else;
  print("NO")
Problem p03407 (python)

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

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

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

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

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

if a+b >= c:
  print("yes")
else:
  print("no")

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

if a+b > c:
  print("Yes")
else:
  print("No")
Problem p03455 (python)

Fixed submission:
a, b = map(int, input().split())
if (a * b)%2 == 0:
  print('Even')
else:
  print('Odd')

Buggy submission (verdict: Runtime Error):
 a, b = map(int, input.split())↲
  2 ↲
  3 if (a + b)%2 == 0:↲
  4   print('even')↲
  5 else:↲
  6   print('odd')↲                                                                                                                                                                            
~
Problem p03485 (python)

Fixed submission:
import math

a, b = map(float, input().split())

print(math.ceil((a+b)/2))

Buggy submission (verdict: Runtime Error):
))

print("{:.0f}".format((a+b)/2))
Problem p03486 (python)

Fixed submission:
s = input()
t = input()

s_sort = sorted(s)
t_sort = sorted(t,reverse= True)

if s_sort < t_sort:
    print('Yes')
else:
    print('No')

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

s_sort = sorted(s,reverse=True)
t_sort = sorted(t,reverse= True)

if s_sort < t_sort:
    print('Yes')
else:
    print('No
Problem p03547 (python)

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

if x < y:
  print("<")
elif x > y:
  print(">")
else:
  print("=")

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

hx = hex(x)
hy = hex(y)

if hx < hy:
  print("<")
elif hx > hy:
  print(">")
else:
  print("=")

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

hx = hex(x)
hy = hex(y)

if hx < hy:
  print("<")
elif hy > hx:
  print(">")
else:
  print("=")

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


if x < y:
  print("<")
elif y > x:
  print(">")
else:
  print("=")
Problem p03597 (python)

Fixed submission:
n = int(input())
a = int(input())

print(abs(n**2-a))

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

print(abs(n**2-a)
Problem p03609 (python)

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

if x <= t:
  print(0)
else:
  print(x-t)

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

if x <= t:
  print(0)
else;
  print(x-t)
Problem p03635 (python)

Fixed submission:
n, m = map(int,input().split())

print((n-1)*(m-1))

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

print((n-1)*(m-1))
Problem p03719 (python)

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

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

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

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

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

for i in range(a,b*a+1,a):
  if i % b == c:
    print("YES")
    exit(0)
print("NO")

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

for i in range(a,ba+1,a):
  if i % b == c:
    print("YES")
    exit(0)
print("NO")

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

aj = a%2
bj = b%2
cj = c%2

if aj == bj == cj == 1 or aj == bj == cj ==0 or (aj == bj ==1 and cj ==0 ) or (aj == cj == 1 and bj == 0) or (aj == 0 and bj==cj==1):
  print("YES")
else:
  p
Problem p03797 (python)

Fixed submission:
n,m = map(int,input().split())

if 2*n <= m:
  print(n+(m-2*n)//4)
elif 2*n > m:
  print(m//2)

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

if 2*n <= m:
  print(n+(m-2*n)//4)
elif 2*n > m:
  print(c//2)
Problem p03813 (python)

Fixed submission:
x = int(input())

if x< 1200:
  print("ABC")
else:
  print("ARC")

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

if x< 1200
  print("ABC")
else:
  print("ARC")

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

if x< 1200;
  print("ABC")
else:
  print("ARC")
Problem p03852 (python)

Fixed submission:
s = input()

if 'a' == s or 'i' == s or 'u' == s or 'e' == s or 'o' == s:
  print("vowel")
else:
  print("consonant")

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

if a == s or i == s or u == s or e == s or o == s:
  print("vowel")
else:
  print("consonant")
Problem p02772 (python)

Fixed submission:
n = int(input())
ais = list(map(int, input().split()))
evens = []
for a in ais:
  if a % 2 == 0:
    evens.append(a)
if len(evens) == 0:
  print("APPROVED")
  quit()
m = 0
for e in evens:
  if e % 3 == 0 or e % 5 == 0:
    pass
  else:
    m += 1
if m == 0:
  print("APPROVED")
else:
  print("DENIED")

Buggy submission (verdict: Runtime Error):
n = int(input())
ais = list(map(int, input().split()))
evens = []
for a in ais:
  if a % 2 == 0:
    evens.append(a)
if len(evens) == 0:
  print("DENIED")
  puit()
m = 0
for e in evens:
  if e % 3 == 0 or e % 5 == 0:
    pass
  else:
    m += 1
if m == 0:
  print("APPROVED")
else:
  print("DENIED")
Problem p02802 (python)

Fixed submission:
n, m = map(int, input().split())
acs = [0]*n
was = [0]*n
ac = 0
wa = 0
for i in range(m):
  p, s = input().split()
  p = int(p) - 1
  if s == "AC" and acs[p]==0:
    acs[p] += 1
    ac += 1
    wa += was[p]
  elif s == "WA":
    was[p] += 1
print(ac, wa)

Buggy submission (verdict: Runtime Error):
n, m = map(int, input().split())
submits = []
for i in range(m):
  submit = input().split()
  submits.append(submit)
wa = 0
ac = 0
l = [submits[0]]
for i in range(1, m):
  if submits[i] == submits[i-1]:
    l.append(submits[i])
  else:
    l = []
    l.append(submits[i])
  if i != m-1 and submits[i] != submits[i+1]:
    for j in range(len(l)):
      if l[j][1] == "WA":
        wa += 1
      else:
        ac += 1
        break
  elif i == m-1:
    for j in range(len(l)):
      if l[j][1] == "WA":
        wa += 1
      else:
        ac += 1
        break
print(ac, wa)
Problem p02818 (python)

Fixed submission:
a,b,k = map(int, input().split())
if a <= k:
  k = k - a
  a = 0
  b = b - k
  if b < 0:
    b = 0
  else:
    pass
else:
  a -= k
print(a, b)

Buggy submission (verdict: Runtime Error):
a,b,k = map(int, input().split())
if a <= K:
  a = 0
  k = k - a
  b -= k
  if b < 0:
    b = 0
  else:
    pass
else:
  a -= k
print(a, b)
Problem p02898 (python)

Fixed submission:
n, k = map(int, input().split())
hs = input().split()
num = 0
for i in range(n):
  if int(hs[i]) >= k:
    num += 1
print(num)

Buggy submission (verdict: Runtime Error):
n, k = map(int, input().split())
hs = input().split()
num = 0
for i in range(len(n)):
  if int(hs[i]) >= k:
    num += 1
print(num)