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

Fixed submission:
N = int(input())
def dfs(s):
    if int(s) > N:
        return 0
    else:
        if '7' in s and '5' in s and '3' in s:
            ret = 1
        else:
            ret = 0
        for i in '357':
            ret += dfs(s + i)
        return ret
print(dfs("0"))

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

def f(x):
    if int(x) > N:
        return 0
    else:
        if all(x.count(j) >= 1 for j in [3, 5, 7]):
            ans = 1
        for i in [3, 5, 7]:
            ans += f(x+i)    
        return ans        

print(f("0"))

Buggy submission (verdict: Runtime Error):
from itertools import product

N = int(input())
ans = 0
for i in product("357", repeat=N):
    x = "".join(i)
    if 357 <= int(x) <= N and len(set(x)) = 3:
        ans += 1
print(ans)

Buggy submission (verdict: Runtime Error):
N = int(input())
def dfs(s):
    if int(s) > N:
        return 0
    else:
        if '7' in s and '5' in s and '3' in s:
            ret = 1
        else:
            ret = 0
        for c in '357':
            ret += dfs(s + c)
        return ret
print(def("0"))
Problem p03213 (python)

Fixed submission:
N = int(input())

n = [0]*(N+1)
for i in range(2, N+1):
    for j in range(2, i+1):
        while i%j == 0:
            i//=j
            n[j] += 1

def num(m):
    return len(list(filter(lambda x: x>=m-1, n)))

print(num(75)+num(25)*(num(3)-1)+num(15)*(num(5)-1)+num(5)*(num(5)-1)*(num(3)-2)//2)

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

n = [0]*(N+1)
for i in range(2, N+1):
    for j in range(2, i+1):
        while i%j == 0:
            i//=j
            n[j] += 1

def num(m):
    return len(list(filter(lambda x: x>=m-1, n)))

print(num(75)+num(25)*(num(3)-1)+num(15)*(num(5)-1)14+num(5)*(num(5)-1)*(num(3)-2)//2)

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

n = [0]*(N+1)
for i in range(2, N+1):
    x = i
    for j in range(2, i+1):
        while x%j == 0:
            x//=j
            n[j] += 1

def num(m):
return len(list(filter(lambda x: x>=m-1, n)))

print(num(75)+num(25)*(num(3)-1)+num(15)*(num(5)-1)14+num(5)*(num(5)-1)*(num(3)-2)//2)

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

n = [0]*(N+1)
for i in range(2, N+1):
    for j in range(2, i+1):
        while i%j == 0:
            i//=j
            n[j] += 1

def num(m):
return len(list(filter(lambda x: x>=m-1, n)))

print(num(75)+num(25)*(num(3)-1)+num(15)*(num(5)-1)14+num(5)*(num(5)-1)*(num(3)-2)//2)

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

n = [0]*(N+1)
for i in range(2, N+1):
    for j in range(2, i+1):
        while i%j == 0:
            i//=j
            n[j] += 1

def num(m):
return len(list(filter(lambda x: x>=m-1, e)))

print(num(75)+num(25)*(num(3)-1)+num(15)*(num(5)-1)14+num(5)*(num(5)-1)*(num(3)-2)//2)
Problem p03231 (python)

Fixed submission:
from fractions import gcd
N,M=map(int,input().split())
S=list(input())
T=list(input())
L=gcd(N,M)
print(N*M//L if all([S[i*N//L]==T[i*M//L] for i in range(L)]) else "-1")

Buggy submission (verdict: Runtime Error):
from fractions import gcd

N, M = map(int,input().split())
S = list(input())
T = list(input())

gc = gcd(N, M)

ans = N*M//gc

for i in range(lcm//max(N, M)):
    if S[N//gc*i] != T[M//gc*i]:
        ans = -1
        break
                
print(ans)

Buggy submission (verdict: Runtime Error):
from fractions import gcd

N, M = map(int,input().split())
S = input()
T = input()

lcm = N*M//math.gcd(N, M)

ans = lcm

for i in range(lcm):
    if S[N//lcm*i] != T[M//lcm*i]:
        ans = -1
        break
                
print(ans)

Buggy submission (verdict: Runtime Error):
from fractions import gcd

N, M = map(int,input().split())
S = input()
T = input()

lcm = N*M//math.gcd(N, M)

ans = lcm

for n in range(N):
    for m in range(M):
        if (lcm//N)*n  == (lcm//M)*m:
            if S[n] != T[m]:
                ans = -1
                break
                
print(ans)

Buggy submission (verdict: Runtime Error):
import math

N, M = map(int,input().split())
S = input()
T = input()

lcm = N*M//math.gcd(N, M)

ans = lcm

for n in range(N):
    for m in range(M):
        if (lcm//N)*n  == (lcm//M)*m:
            if S[n] != T[m]:
                ans = -1
                break
                
print(ans)
Problem p03238 (python)

Fixed submission:
N = int(input())
if N == 1:
    print("Hello World")
elif N ==2:
    A = int(input())
    B = int(input())
    print(A+B)

Buggy submission (verdict: Runtime Error):
N = int(input())
A = int(input())
B = int(input())
if N == 1:
    print("Hello World")
elif N ==2:
    print(A+B)

Buggy submission (verdict: Runtime Error):
N = int(input())
A = int(input())
B = int(input())
if N ==1:
    print("Hello World")
else:
    print(A+B)
Problem p03239 (python)

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

cost = float("inf")
for i in range(N):
    c, t = map(int, input().split())
    if t <= T:
        cost = min(cost, c) 

print("TLE" if cost == float("inf") else cost)

Buggy submission (verdict: Runtime Error):
N, T = map(int, input().split())
for i in range(N):
  c, t = map(int, input().split())
  if t<=T:
    x=min(c, 1001)
print('TLE' if x=1001 else c)

Buggy submission (verdict: Runtime Error):
N, T = map(int, input().split())
for i in range(N):
  c, t = map(int, input().split())
  if t<=T:
    min=min(c, 1001)
print('TLE' if min=1001 else c)

Buggy submission (verdict: Runtime Error):
N, T = map(int, input().split())
z=1001
for i in range(N):
  c, t = map(int, input().split())
  if t<=T:
    min=(c, z)
print('TLE' if min=1001 else c)

Buggy submission (verdict: Runtime Error):
N, T = map(int, input().split())
for i in range(N):
  c, t = map(int, input().split())
  if t<=T:
    min=(c, 1001)
print('TLE' if min=1001 else c)

Buggy submission (verdict: Runtime Error):
N, T = map(int, input().split())
for i in range(N):
  c, t = map(int, input().split())
  if t<=T:
    print(min(c))
  else:
    print('TLE')

Buggy submission (verdict: Runtime Error):
N, T = map(int, input().split())
for i in range(N):
  c, t = map(int, input().split())
  if t<=T:
    print(min(c))
  else:
    print('TLE')
Problem p03240 (python)

Fixed submission:
N = int(input())

A=[]
for i in range(N):
    a, b, c = map(int, input().split())
    A.append([a, b, c])

A.sort(key=lambda x:-x[2])

for x in range(0, 101):
    for y in range(0, 101):
        H = A[0][2]+abs(A[0][0]-x)+abs(A[0][1]-y)
        Flag = True
        for i in range(1, N):
            if A[i][2] > 0:
                    if H != A[i][2]+abs(A[i][0]-x)+abs(A[i][1]-y):
                        Flag = False
                        break
            else:
                if H > abs(A[i][0]-x)+abs(A[i][1]-y):
                    Flag = False
                    break
        if Flag == True:
            print(x, y, H)

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

A=[]
for i in range(N):
    a, b, c = map(int, input().split())
    A.append([a, b, c])

A.sort(key=lambda x:-x[2])

for x in range(0, 101):
    for y in range(0, 101):
        H = A[0][2]+abs(A[0][0]-x)+abs(A[0][1]-y)
        Flag = True
        for i in range(1, N):
            if A[i][2] > 0:
                    if H != A[i][2]+abs(A[i][0]-x)+abs(A[i][1]-y):
                        Flag = False
                        break
            else:
                if H > abs(A[i][0]-x)+abs(A[i][1]-y):
                    Flag = False
                    break
        if Flag == True:
            print(x, y, h)
Problem p03243 (python)

Fixed submission:
x=int(input())
for i in range(1, 10):
  a=100*i+10*i+i
  if a>=x:
    print(a)
    break

Buggy submission (verdict: Runtime Error):
print(100*x+10*x+x)

Buggy submission (verdict: Runtime Error):
N=int(input())
x=-(-N//111)
print(100x+10x+x)
Problem p03251 (python)

Fixed submission:
N, M, X, Y = map(int, input().split())
x = list(map(int, input().split()))
y = list(map(int, input().split()))
ans = False
for i in range(X+1, Y+1):
    if i > max(x) and i <= min(y):
        ans = True
        break

print("War" if ans == False else "No War")

Buggy submission (verdict: Runtime Error):
N, M, X, Y = map(int, input().split())
x = list(map(int, input().split())
y = list(map(int, input().split())
ans = False
for i in range(X+1, Y+1):
    if i > max(x) and i <= min(y):
        ans = True
        break

print("War" if ans True else "No War")
Problem p03260 (python)

Fixed submission:
C = map(str, input().split())
if "2" in C:
    print("No")
else:
    print("Yes")

Buggy submission (verdict: Runtime Error):
C = map(str, input().split())
if "2" in c:
    print("No")
else:
    print("Yes")

Buggy submission (verdict: Runtime Error):
C = input().replace(" ", "")
if "2" in c:
    print("No")
else:
    print("Yes")

Buggy submission (verdict: Runtime Error):
C = map(str, input().split())
if "2" in c:
    print("No")
else:
    print("Yes")

Buggy submission (verdict: Runtime Error):
C = map(str, input().replace(" ", ""))
if "2" in c:
    print("No")
else:
    print("Yes")
Problem p03261 (python)

Fixed submission:
N = int(input())
ans = 1
A=[]
for i in range(N): 
    A.append(input())

for i in range(1, N):
    if A[i-1][-1] == A[i][0]:
        ans *= 1
    else:
        ans *= 0    
    
if all(A.count(i) == 1 for i in A):
    ans *= 1
else:
    ans *= 0  
    
print("Yes" if ans == 1 else "No")

Buggy submission (verdict: Runtime Error):
N = int(input())
ans = 1
A=[]
for i in rage(N): 
    A.append(input())

for i in range(1, N):
    if A[i-1][-1] == A[i][0]:
        ans *= 1
    else:
        ans *= 0    
    
if all(A.count(i) == 1 for i in A):
    ans *= 1
else:
    ans *= 0
Problem p03262 (python)

Fixed submission:
from functools import reduce
from fractions import gcd
N,X=map(int,input().split())
x=[abs(X-int(i)) for i in input().split()]
print(reduce(gcd,x))

Buggy submission (verdict: Runtime Error):
N, X = map(int, input().split())
l = list(map(int, input().split()))
m=[]
from functools import reduce
from math import gcd
for i in l:
    m.append(abs(i-X))
print(reduce(gcd,m))

Buggy submission (verdict: Runtime Error):
N, X = map(int, input().split())
l = list(map(int, input().split()))
m=[]
from functools import reduce
from math import gcd
for i in l:
    m.append(abs(i-X))
print(reduce(gcd,m))

Buggy submission (verdict: Runtime Error):
N, X = map(int, input().split())
l = list(map(int, input().split()))
m=[]
from functools import reduce
from math import gcd
for i in l:
    m.append(abs(i-N))
print(reduce(gcd,m))

Buggy submission (verdict: Runtime Error):
xN, X = map(int, input().split())
l = list(map(int, input().split()))
m=[]
from functools import reduce
from fractions import gcd
for i in l:
    m.append(abs(i-N))
print(reduce(gcd,m))
Problem p03264 (python)

Fixed submission:
N=int(input())
if N%2==0:
  print((N//2)**2)
elif N%2!=0:
  print((N//2)*(N-(N//2)))

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

print(K//2*(K-K//2))

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

print(K//2*(K-K//2))

Buggy submission (verdict: Runtime Error):
N = int(input())
if K%2==0:
    print(K//2*(K//2-1))
else:
    print(-(-K//2)*((K-1)//2))

Buggy submission (verdict: Runtime Error):
N = int(input())
if K%2==0:
    print(K//2*(K//2-1))
else:
    print(-(-K//2)*(K-1)//2)

Buggy submission (verdict: Runtime Error):
N=int(input())
if N%2==0:
  print(int((N/2)**2)
elif N%2!=0:
  print((N//2)*(N-(N//2)))

Buggy submission (verdict: Runtime Error):
N=int(input())
if N%2==0:
  print((N/2)**2)
else:
  print((N//2)*(N-(N//2))

Buggy submission (verdict: Runtime Error):
N=int(input())
if N%2==0:
  print(N/2**2)
else:
  print()(N//2)*((N//2)+1))
Problem p03273 (python)

Fixed submission:
H, W = map(int, input().split())
a = [list(input()) for i in range(H)]
a = list(zip(*[i for i in a if "#" in i]))
a = list(zip(*[i for i in a if "#" in i]))
for i in range(len(a)):
    print("".join(a[i]))

Buggy submission (verdict: Runtime Error):
H, W = map(int, input().split())
a = [list(input()) for i in range(H)]
a = zip(*[i for i in a if "#" in a])
a = zip(*[i for i in a if "#" in a])
for i in range(len(a)):
    print("".join(a[i]))
Problem p03280 (python)

Fixed submission:
X, t = map(int, input().split())
print((X-1)*(t-1))

Buggy submission (verdict: Runtime Error):
S, T = map(int, input().split())
print(~-S*~-T)

Buggy submission (verdict: Runtime Error):
S, T = map(int, input().split())
print(˜-S*˜-T)

Buggy submission (verdict: Runtime Error):
S, T = map(int, input().split())
print(-˜S*-˜T)

Buggy submission (verdict: Runtime Error):
print((int(input())-1)*(int(input())-1))

Buggy submission (verdict: Runtime Error):
print((int(input())-1)*(int(input())-1))

Buggy submission (verdict: Runtime Error):
print((int(input)-1)*(int(input)-1))
Problem p03282 (python)

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

for i in range(K):
    if S[i] != "1":
        print(S[i])
        break
else:
    print(1)

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

if S[0] == 1:
    if K >= 2:
        print(S[1])
    else:
        print(1)
else:
    print(S[1])

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

if S[0] == 1:
    if K >= 2:
        print(S[1])
    else:
        print(1)
else:
    print)S[1]
Problem p03288 (python)

Fixed submission:
R = int(input())
if R < 1200:
    print("ABC")
elif R < 2800:
    print("ARC")
else:
    print("AGC")

Buggy submission (verdict: Runtime Error):
R = int(input())
if R < 1200:
    print("ABC")
eif R < 2800:
    print("ARC")
else:
    print("AGC")
Problem p03289 (python)

Fixed submission:
S = list(input())
C = S[2:-1]
if S[0] == "A" and "C" in C and C.count("C") == 1:
    S.remove("A")
    S.remove("C")
    T="".join(S)
    Y=T.lower()
    if T == Y:
        print("AC")
    else:
        print("WA")
else:
    print("WA")

Buggy submission (verdict: Runtime Error):
import re
ans=re.match("^A[a-z]+C[a-z]$+",input())
print("AC" if ans else "WA")
Problem p03292 (python)

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

Buggy submission (verdict: Runtime Error):
c= list(map(int, input().split()))
print(max(list)-min(list))
Problem p03294 (python)

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

print(sum(A)-N)

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

saidai = 0
for i in range(min(A), Max(A)*2):
    cnt = 0
    for j in range(N):
        cnt += i%A[j]
    saidai = max(saidai, cnt)

print(saidai)
Problem p03308 (python)

Fixed submission:
N = int(input())
list=list(map(int, input().split()))
list.sort()
print(list[-1]-list[0])

Buggy submission (verdict: Runtime Error):
N = int(input())
list=list(max(int, input().split()))
list.sort()
print(list[-1]-list[0])
Problem p03309 (python)

Fixed submission:
import statistics  
N = int(input())
A=list(map(int, input().split()))
B=[]
for number, i in enumerate(A, 1):
    B.append(i-number)
median = int(statistics.median(B))
ans2 = 0
for i in B:
    ans2 += abs(i-median)
print(ans2)

Buggy submission (verdict: Runtime Error):
import statistics  import median
N = int(input())
A=list(map(int, input().split()))
B=[]
for number, i in enumerate(A, 1):
    B.append(i-number)
median = int(median(B))
ans2 = 0
for i in B:
    ans2 += abs(i-median)
print(ans2)

Buggy submission (verdict: Runtime Error):
from statistics import median

n = int(input())
a = [int(i) for i in input().split()]

b = int(median([v-i for i, v in enumerate(a, 1)]))
res = 0
for i, v in enumerate(a, 1):
    res += abs(v-(b+i))

print(res)

Buggy submission (verdict: Runtime Error):
from statistics import median

n = int(input())
a = [int(i) for i in input().split()]

b = int(median([v-i for i, v in enumerate(a, 1)]))
res = 0
print(b)
for i, v in enumerate(a, 1):
    res += abs(v-(b+i))

print(res)

Buggy submission (verdict: Runtime Error):
import statistics  
N = int(input())
A=list(map(int, input().split()))
B=[]
for number, i in enumerate(A, 1):
    B.append(i-number)
median = int(statistics.median(B))
ans2 = 0
for i in B:
    ans2 += abs(i-median)
print(ans2)

Buggy submission (verdict: Runtime Error):
import statistics  import median
N = int(input())
A=list(map(int, input().split()))
B=[]
for number, i in enumerate(A, 1):
    B.append(i-number)
median = int(median(B))
ans2 = 0
for i in B:
    ans2 += abs(i-median)
print(ans2)

Buggy submission (verdict: Runtime Error):
import statistics  import median
N = int(input())
A=list(map(int, input().split()))
B=[]
for number, i in enumerate(A, 1):
    B.append(i-number)
median = round(median(B))
ans2 = 0
for i in B:
    ans2 += abs(i-median)
print(ans2)

Buggy submission (verdict: Runtime Error):
import statistics
N = int(input())
A=list(map(int, input().split()))
B=[]
for number, i in enumerate(A, 1):
    B.append(i-number)
median = round(statistics.median(B))
ans2 = 0
for i in B:
    ans2 += abs(i-median)
print(ans2)
Problem p03328 (python)

Fixed submission:
a, b = map(int, input().split())
            
print((b-a)*(b-a+1)//2-b)

Buggy submission (verdict: Runtime Error):
a, b = int(input())
            
print((b-a)*(b-a+1)//2-b)
Problem p03338 (python)

Fixed submission:
N= int(input())
S = list(input())
count=0
saidai=0
for i in range(1, N-1):
    count = len(set(S[:i]) & set(S[i:]))
    saidai=max(saidai, count) 
print(saidai)

Buggy submission (verdict: Runtime Error):
S = list(input())
N = int(input())
ma=0
for i in range(N-1):
    ma=max(len(set(S[:i]) & set(S[i:])), ma)
print(ma)

Buggy submission (verdict: Runtime Error):
S = list(input()
N = int(input())
ma=0
for i in range(N-1):
    ma=max(len(set(S[:i]) & set(S[i:])), ma)
print(ma)
Problem p03352 (python)

Fixed submission:
X=int(input())
list=[1]
for i in range(1, X):
  for j in range(2, X):
    if (i**j)<=X:
      list.append(i**j)
    else:break
print(max(list))

Buggy submission (verdict: Runtime Error):
X=int(input())
list=[]
for i in range(1, X):
  for j in range(2, X):
    if (i**j)<=X:
      list.append(i**j)
print(max(list))

Buggy submission (verdict: Runtime Error):
X=int(input())
list=[]
for i in range(1, X):
  for j in range(2, X):
    if i**j<=X:
      list.append(i**j)
print(max(list))

Buggy submission (verdict: Runtime Error):
X=int(input())
max=1
else:
  for i in range(1, X):
    for j in range(2, X):
      if i**j<=X:
        if max>1:
          max=i**j
        else:
          break
print(max)

Buggy submission (verdict: Runtime Error):
X=int(input())
for i in range(1, X):
	for j in range(2, X):
      if i**j<=X:
        max=i**j
      else:
        break
print(max(1, max))

Buggy submission (verdict: Runtime Error):
X=int(input())
max=1
else:
  for i in range(1, X):
    for j in range(2, X):
      if i**j<=X:
        max=i**j
      else:
        break
print(max(1, max))

Buggy submission (verdict: Runtime Error):
X=int(input())
If X==1:
  max=1
else:
  for i in range(1, X):
    for j in range(2, X):
      if i**j<=X:
        max=i**j
print(max)

Buggy submission (verdict: Runtime Error):
X=int(input())
If X==1:
  max=1
else:
  for i in range(1, X):
    for j in range(2, X):
      if i**j<=X:
        max=i**j
print(max)

Buggy submission (verdict: Runtime Error):
=int(input())
for i in range(1, X):
  for j in range(2, X):
    if i**j<=X:
      max=i**j
print(max)
Problem p03361 (python)

Fixed submission:
H,W=map(int,input().split())
S=["."+input()+"." for i in range(H)]
S=["."*(W+2)]+S+["."*(W+2)]
flag=0
for i in range(H):
    for j in range(W):
        if S[i][j]=="#":
            if S[i-1][j]=="." and S[i+1][j]=="." and S[i][j-1]=="." and S[i][j+1]==".":
                flag=1
print("Yes" if flag==0 else "No")

Buggy submission (verdict: Runtime Error):
h, w = map(int, input().split())
list=["."+input()+"." for i in range(h)]
list=["."*(w+2)]+list+["."*(w+2)]
a=0
for h in range(H):
    for w in range(w):
        if list[h][w] == "#":
            if list[h+1][w] == "#" or list[h-1][w] == "#" or list[h][w-1] == "#" or list[h][w+1] == "#":
                a=0
            else:
                a=1
                break
print("Yes" if a==0 else "No")

Buggy submission (verdict: Runtime Error):
h, w = map(int, input().split())
list=["."+input()+"." for i in range(h)]
list=["."*(w+2)]+list+["."*(w+2)]
a=0
for h in range(H):
  for w in range(w):
        if list[h][w] == "#":
            if list[h+1][w] == "#" or list[h-1][w] == "#" or list[h][w-1] == "#" or list[h][w+1] == "#":
                a=0
            else:
                a=1
                break
print("Yes" if a==0 else "No")

Buggy submission (verdict: Runtime Error):
h, w = map(int, input().split())
list=["."+input()+"." for i in range(h)]
list=["."*(w+2)]+list+["."*(w+2)]
a=0
for h in range(H):
    for w in range(w):
        if list[h][w] == "#":
            if list[h+1][w] == "#" or list[h-1][w] == "#" or list[h][w-1] == "#" or list[h][w+1] == "#":
                a=0
            else:
                a=1
                break
print("Yes" if a==0 else "No")
Problem p03370 (python)

Fixed submission:
N, X = map(int, input().split())
list=[]
for i in range(N):
  m=int(input())
  list.append(m)
print(((X-sum(list))//min(list))+N)

Buggy submission (verdict: Runtime Error):
N, X = map(int, input().split())
list=[]
for i in range(N):
  m=input().split()
  list.append(m)
print(((X-sum(list))//min(list))+N)

Buggy submission (verdict: Runtime Error):
N, X = map(int, input().split())
list=[]
for i in range(N):
  m=input().split()
  list.append(m)
print(((X-sum(list))//min(list))+N)
Problem p03371 (python)

Fixed submission:
A, B, C, X, Y = map(int, input().split())

ans = float("inf")
for c in range(0, max(X, Y)*2+1, 2):
    ans = min(A*max(X-c//2, 0) + B*max(Y-c//2, 0) + C*c, ans) 

print(ans)

Buggy submission (verdict: Runtime Error):
A, B, C, X, Y = map(int, input().spllit())

ans = float("inf")
for c in range(0, max(X, Y)*2+1, 2):
    ans = min(A*max(X-c//2, 0) + B*max(Y-c//2, 0) + C*c, ans) 

print(ans)
Problem p03377 (python)

Fixed submission:
A, B, X = map(int, input().split())
print("YES" if A <= X <= A+B else "NO")

Buggy submission (verdict: Runtime Error):
A, B, X = map(int, input().split())
print("YES" A <= X <= A+B else "NO")

Buggy submission (verdict: Runtime Error):
A, B, X = map(int, input().split())
print("YES" A+B <= X else "NO")
Problem p03378 (python)

Fixed submission:
N, M, X=map(int, input().split())
sum=sum(int(i)<X for i in input().split())
print(min(sum, M-sum))

Buggy submission (verdict: Runtime Error):
N, M, X = map(int, input().splist())
list=list(map(int, input().splist()))
a, b = 0,0
for i in list:
    if i<X:
        a+=1
    else:
        b+=1
print(min(a, b))

Buggy submission (verdict: Runtime Error):
N, M, X=map(int, input().split())
list=[0]*(N+1)
m=list(int() for i in input().split())
for i in m:
  list[i]=1

Buggy submission (verdict: Runtime Error):
N, M, X=map(int, input().split())
list=[0]*(N+1)
m=list(int() for i in input().split())
for i in m:
  list[i]=1
min(sum(list.loc[0:X]), sum(list.loc(X+1:N+1)))

Buggy submission (verdict: Runtime Error):
N, M, X=map(int, input().split())
list=[0]*(N+1)
m=list[int() for i in input().split()]
for i in m:
  list[i]=1

Buggy submission (verdict: Runtime Error):
for i in range(M):
    list[map(int, input().split())]=1

Buggy submission (verdict: Runtime Error):
N, M, X=map(int, input().split())
list=[0]*(N+1)
for i in range(M):
    list[map(int, input().split())]=1

Buggy submission (verdict: Runtime Error):
N, M, X=map(int, input().split())
list=[0]*(N+1)
for i in range(M):
    list[map(int, input().split())]=1
min(sum(list.loc[0:X]), sum(list.loc(X+1:N+1)))
Problem p03386 (python)

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

Buggy submission (verdict: Runtime Error):
A, B, K = map(int, input().split())
a=[]
b=[]
for i in range(A, A+K):
    a.append(i)
for i range(B-K+1, B+1):
    b.append(i)
print(set(a)|set(b))