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

Fixed submission:
import bisect
N=int(input())
a = []
for n in range(N):
    a.append(int(input()))

r = [-1]*N

mind = float("inf")
for n in range(N):
    ind = bisect.bisect_left(r, a[n])
    r[ind-1] = a[n]
    mind = min(mind, ind)

# print(r)
print(N-mind+1)

Buggy submission (verdict: Runtime Error):
import sys
sys.setrecursionlimit(10000)

N=int(input())
A = []
for n in range(N):
    A.append(int(input()))


# N = 2*10**3
# A = [0 for n in range(N)]

# print(A)

visited = [False for n in range(N)]

dp = {}
def search(n,d):
    if n in dp:
        return dp[n]
    maxd = d
    for i in range(n)[::-1]:
        if i in dp:
            maxd = max(dp[i], maxd)
        elif A[i] >= A[n]:
            maxd = max(search(i,d+1), maxd)
    dp[n] = maxd
    return dp[n]

ds = [0 for n in range(N)]
for n in range(N)[::-1]:
    if not n in dp:
        ds[n] = search(n,0)

# print(ds)

print(max(ds)+1)
Problem p02994 (python)

Fixed submission:
N,L = map(int,input().split())
a = [L+i for i in range(N)]
# print(a)

mn = 10**9
for i in range(N):
  if mn > abs(a[i]):
    mn = abs(a[i])
    agmn = i

sm = 0
for i in range(N):
  if i!=agmn:
    sm += a[i]

# print(mn, agmn)
print(sm)

Buggy submission (verdict: Runtime Error):
N,L = map(int,input().split())
a = [L+i for i in range(N)]
# print(a)

mn = 10*9
i = -1
for i in range(N):
  if mn > abs(a[i]):
    mn = abs(a[i])
    agmn = i
sm = 0
for i in range(N):
  if i!=agmn:
    sm += a[i]

# print(mn, agmn)
print(sm)
Problem p03006 (python)

Fixed submission:
import sys
N=int(input())
# N=50

p = []
for n in range(N):
    x,y = map(int,input().split())
    # x,y = n,n
    p.append( (x,y) )

if N == 1:
    print(1)
    exit()

p = list(sorted(p))

diffs = {}
for i,pi in enumerate(p):
    for j,pj in enumerate(p):
        if i < j:
            diff = (pi[0]-pj[0], pi[1]-pj[1])
            if diff not in diffs:
                diffs[diff] = 0
            diffs[diff] += 1

mxdiff = 0
for k in diffs:
    mxdiff = max(mxdiff, diffs[k])
print(N-mxdiff)

Buggy submission (verdict: Runtime Error):
import sys
N=int(input())
# N=50

p = []
for n in range(N):
    x,y = map(int,input().split())
    # x,y = n,n
    p.append( (x,y) )

#空のリストを用意
e = set()  #部分最小木
av = set()  #部分最小木に含まれる頂点
pv = set(p)  #その他の頂点

used = {}
for pp in p:
    used[pp] = 1
used[p[0]] += 1

#始点は任意
av.add(p[0])
pv.remove(p[0])

costs = 0
while 1:
    #比較のための初期値として十分大きい数を用意
    shortestlen = sys.float_info.max
    #部分最小木に追加する辺を為す2点の初期化
    kav = None  #部分最小木に含まれる頂点からの候補
    kpv = None  #その他の頂点からの候補
    for v1 in av:
        for v2 in pv:
            #重みの計算（ここでは距離）
            dist = 1 if (v1[0]==v2[0] or v1[1] == v2[1]) else 0
            # dist = math.sqrt(  (v1[0]-v2[0])**2 + ( v1[1]-v2[1] )**2 )
            if shortestlen > dist and used[v1] > 0:
                shortestlen = dist
                #候補の更新
                kav = v1
                kpv = v2
    if shortestlen >= 0:
        #部分最小木に追加
        costs += shortestlen
        e.add((kav , kpv))
        used[kav] -= 1
    #確定した頂点を移す
    av.add(kpv)
    pv.remove(kpv)
    #全頂点に対する判定を終えたら終了
    if len(pv) == 0:
        break

print(costs+1)
# print(e)
Problem p03014 (python)

Fixed submission:
H,W = map(int,input().split())
# H,W = 2000,2000

S = [[0 for w in range(W)] for h in range(H)]
for h in range(H):
    l = input()
    for w in range(W):
        if l[w]=="#":
            S[h][w] = 0
        else:
            S[h][w] = 1

Sh = [[0 for w in range(W)] for h in range(H)]

for h in range(H):
    se = []
    cnt = 0
    for w,val in enumerate(S[h]):
        if val == 1:
            cnt += 1
            se.append(w)
        else:
            for ww in se:
                Sh[h][ww] = cnt
            cnt = 0
            se = []
    for ww in se:
        Sh[h][ww] = cnt

Sw = [[0 for w in range(W)] for h in range(H)]

for w in range(W):
    se = []
    cnt = 0
    for h in range(H):
        val = S[h][w]
        if val == 1:
            cnt += 1
            se.append(h)
        else:
            for hh in se:
                Sw[hh][w] = cnt
            cnt = 0
            se = []
    for hh in se:
        Sw[hh][w] = cnt


mx = 0
for h in range(H):
    for w in range(W):
        mx = max(Sh[h][w] + Sw[h][w], mx)

print(max((mx-1,0)))

Buggy submission (verdict: Runtime Error):
import numpy as np
H,W = map(int,input().split())
# H,W = 2000,2000

S = np.zeros((H,W),dtype=np.int)
for h in range(H):
    l = input()
    for w in range(W):
        if l[w]=="#":
            S[h,w] = 0
        else:
            S[h,w] = 1

Sh = np.zeros((H,W),dtype=np.int)


for h in range(H):
    se = []
    cnt = 0
    for w,val in enumerate(S[h]):
        if val == 1:
            cnt += 1
            se.append(w)
        else:
            for ww in se:
                Sh[h,ww] = cnt
            cnt = 0
            se = []
    for ww in se:
        Sh[h,ww] = cnt

Sw = np.zeros((H,W),dtype=np.int)

for w in range(W):
    se = []
    cnt = 0
    for h,val in enumerate(S[:,w]):
        if val == 1:
            cnt += 1
            se.append(h)
        else:
            for hh in se:
                Sw[hh,w] = cnt
            cnt = 0
            se = []
    for hh in se:
        Sw[hh,w] = cnt


print(max((Sh+Sw).max()-1,0))
Problem p03032 (python)

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

sumval = 0
for l in range(min(K+1,N+1)):
    for r in range(min(K+1-l,N-l+1)):
        sV = sorted(V[:l]+ V[N-r:])
        # i_div = 0
        # for i_div in range(len(sV)):
        #     if sV[i_div] > 0:
        #         break
        # for sute in range(min(K-r-l+1,len(sV),i_div+1)):
        for sute in range(min(K-r-l+1,len(sV))):
            c = sum(sV[sute:])
            sumval = max(c,sumval)

print(sumval)

Buggy submission (verdict: Runtime Error):
import numpy as np
import copy
N,K = map(int,input().split())
V = list(map(int,input().split()))
# N = 17
# K = 100
# V = [i for i in range(N)]


V = [0 for i in range(N)] + V + [0 for i in range(N)] 


dp = {}

# discardフラグを立てて，一度捨てると取れないように．
def search(start, end, k, own, discard=False):
    if k==K:
        return sum(own)
    key = tuple(own)
    if key in dp:
        return dp[key]
    val_Default = sum(own)
    val_A,val_B = 0,0
    if end-start >= 0 and not discard:
        val_A = search(start+1, end, k+1, own + [V[start]])
        val_B = search(start, end-1, k+1, own + [V[end]])
    if len(own) == 0 and discard:
        return val_Default
    val_Cs = []
    val_Ds = []
    for i,o in enumerate(own):
        own_new = copy.copy(own)
        own_new.pop(i)
        val_Cs.append(search(-1, -1, k+1, own_new, discard=True) )
        # val_Cs.append(search(start-1, end, k+1, own_new, discard=True) )
        # val_Ds.append(search(start, end+1, k+1, own_new, discard=True) )
    # print([val_Default, val_A, val_B], val_Cs , val_Ds)
    # dp[key] = max([val_Default, val_A, val_B] + val_Cs + val_Ds)
    dp[key] = max([val_Default, val_A, val_B] + val_Cs)
    # print(own, [val_Default, val_A, val_B], val_Cs, val_Ds)
    return dp[key]

r = search(N, 2*N-1, 0, [])
print(r)
Problem p02789 (python)

Fixed submission:
N, M = map(int, input().split())
print('Yes' if N == M else 'No')

Buggy submission (verdict: Runtime Error):
N, M = map(int, input.split())
print('Yes' if N == M else 'No)
Problem p02841 (python)

Fixed submission:
M1, D1 = map(int, input().split())
M2, D2 = map(int, input().split())
if M1 == M2:
  print(0)
else:
  print(1)

Buggy submission (verdict: Runtime Error):
M1, D1 = map(int, input())
M2, D2 = map(int, input())
if M1 == M2:
  print(0)
else:
  print(1)
Problem p02848 (python)

Fixed submission:
N = int(input())
S = input()
hoge=[]
Alphas='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
 
for a in S:
  for i, Alpha in enumerate(Alphas):
    if Alpha == a:
      hoge.append(Alphas[(i+N)%26])
      break
mojiretsu=''
for x in hoge:
    mojiretsu += x
print(mojiretsu)

Buggy submission (verdict: Runtime Error):
N = input()
S= input()
hoge=[]
Alphas='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
 
for a in S:
  for i, Alpha in enumerate(Alphas):
    if Alpha == a:
      hoge.append(Alphas[(i+N)%26])
      break
mojiretsu=''
for x in hoge:
    mojiretsu += x
print(mojiretsu)

Buggy submission (verdict: Runtime Error):
N=input()
S=input()
hoge=[]
Alphas='ABCDEFGHIJKLMNOPQRSTUVWXYZ'

for a in S:
  for i, Alpha in enumerate(Alphas):
    if Alpha == a:
      hoge.append(Alphas[(i+N)%26])
      break
print(hoge)
Problem p02861 (python)

Fixed submission:
import numpy as np
from itertools import combinations
 
z = []
N = int(input())
for i in range(N):
    temp_x, temp_y = map(int, input().split())
    z = z + [temp_x] + [temp_y]
z = np.array(z).reshape(N,2)
 
d = 0
count = 0
for j, k in combinations(range(N),2):
    temp_d = np.sqrt((z[j,0] - z[k,0])**2 + (z[j,1] - z[k,1])**2)
    d += temp_d
    count += 1
print(d*(N-1)/count)

Buggy submission (verdict: Runtime Error):
import pandas as pd
import numpy as np
from itertools import combinations

z = []
N = int(input())
for i in range(N):
    temp_x, temp_y = map(int, input().split())
    z = z + [temp_x] + [temp_y]
z = np.array(z).reshape(N,2)
print(z)

d = 0
count = 0
for j, k in combinations(range(N),2):
    temp_d = np.sqrt((z[j,0] - z[k,0])**2 + (z[j,1] - z[k,1])**2)
    d += temp_d
    count += 1
print(d*(N-1)/count)
Problem p02885 (python)

Fixed submission:
A, B = map(int, input().split())
print(A - 2*B if A - 2*B > 0 else 0)

Buggy submission (verdict: Runtime Error):
A, B = map(int, input().split())
print(A - 2*B if A - 2*B > 0 else: 0)
Problem p02899 (python)

Fixed submission:
#142
import numpy as np
N = int(input())
S = list(map(int,input().split()))

l = []
for i, j in enumerate(S,1):
    l_tem = [i,j]
    l += l_tem
l = np.array(l).reshape(N,2)
l = list(l[np.argsort(l[:,1])][:,0])

print(' '.join(list(map(str,l))))

Buggy submission (verdict: Runtime Error):
#142
import pandas as pd
N = int(input())
S = list(map(int,input().split()))
df = pd.DataFrame()
for i, j in enumerate(S,1):
    df_tem = pd.DataFrame([i, j]).T
    df = pd.concat([df, df_tem], axis=0)
df.columns = ['x', 'y']
df = df.sort_values(by='y')

print(' '.join(list(map(str,df['x'].tolist()))))
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 = map(int, input())
if (A+B)%2==0:
  print((A+B)/2)
else:
  print('IMPPOSSIBLE')
Problem p02982 (python)

Fixed submission:
from itertools import combinations
N, D = map(int, input().split())
X = []
for _ in range(N):
  X += list(map(int, input().split()))
cnt = 0
for i, j in combinations(range(N),2):
  d = 0
  for k in range(D):
    d += (X[i*D + k] - X[j*D + k])**2
  if int(d**0.5)**2 == d: cnt += 1
print(cnt)

Buggy submission (verdict: Runtime Error):
from itertools import combinations
N, D = map(int, input().split())
X = []
cnt = 0
for _ in range(N):
  X += list(map(int, input().split()))
print(combinations(N,2))
Problem p02988 (python)

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

cnt = 0
for i in range(1,n-1):
  if (p[i] > p[i-1]) and (p[i] < p[i+1]): cnt += 1
  if (p[i] < p[i-1]) and (p[i] > p[i+1]): cnt += 1
print(cnt)

Buggy submission (verdict: Runtime Error):
n = int(input())
p = list(map(int, input().split()))
cnt = 0
for i in range(1,n-1):
  if (p[n] > p[n-1]) and (p[n] < [n+1]): cnt += 1
print(cnt)
Problem p02999 (python)

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

Buggy submission (verdict: Runtime Error):
X, A = map(int, input(),split())
print(0 if X < A else 10)
Problem p03161 (python)

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

dp = [1e+09]*N
dp[0] = 0
for i in range(1,N):
  for j in range(1,K+1):
    if i >= j: dp[i] = min(dp[i],dp[i-j]+abs(h[i] - h[i-j]))
print(int(dp[-1]))

Buggy submission (verdict: Runtime Error):
import numpy as np
N, K = map(int,input().split())
h = list(map(int, input().split()))

dp = np.full(N, np.inf)
dp[0] = 0
for i in range(1,N):
  for j in range(1,K+1):
    if i >= j: dp[i] = np.min(dp[i],dp[i-j]+np.abs(h[i] - h[i-j]))
print(int(dp[-1]))

Buggy submission (verdict: Runtime Error):
import numpy as np
N, K = map(int,input().split())
h = list(map(int, input().split()))

dp = np.full(N, np.inf)
dp[0] = 0
for i in range(1,N):
  for j in range(1,K+1):
    if i >= j: dp[i] = np.min(dp[i],dp[i-j]+np.abs(h[i] - h[i-j]))
print(int(dp[-1]))
Problem p03219 (python)

Fixed submission:
#input one int
#a = int(input())

#input some val
#a, b, c = (int(i) for i in input().split())
#val = [[int(i) for i in input().split()] for i in range(N)]

#input matrix
#a = [input().split() for i in range()]

x, y = (int(i) for i in input().split())
res = x + (y/2)
print(int(res))

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

#input some val
#a, b, c = (int(i) for i in input().split())
#val = [[int(i) for i in input().split()] for i in range(N)]

#input matrix
#a = [input().split() for i in range()]

x, y = (int(i for i in input().split()))
print(x+(y/2))
Problem p02614 (python)

Fixed submission:
h0, w0, k0 = [ int(x) for x in input().split() ]
found, buf = 0, {}
for i in range(h0): buf[1 << i] = { 1 << j for j,x in enumerate(input()) if x == '#' }
for i in range(1, 1 << h0):
  idx = {}
  for k,vs in buf.items():
    if k & i == 0: continue
    for v in vs: idx[v] = idx.get(v, 0) + 1
  for j in range(1, 1 << w0):
    n = sum([ v for k,v in idx.items() if k & j ])
    if n == k0: found += 1
print(found)

Buggy submission (verdict: Runtime Error):
        h0, w0, k0 = [ int(x) for x in input().split() ]
        buf = {}
        for i in range(h0):
          buf[1 << i] = { 1 << j for j,x in enumerate(input()) if x == '#' }
        found = 0
        for i in range(1, 1 << h0):
          idx = {}
          for k,v in buf.items():
            if k & i == 0: continue
            for v in vs: idx[v] = idx.get(v, 0) + 1
          for j in range(1, 1 << w0):
            n = sum([ v for k,v in idx.items() if k & j ])
            if n == k0: found += 1
        print(found)

Buggy submission (verdict: Runtime Error):
    h0, w0, k0 = [ int(x) for x in input().split() ]
    buf = {}
    for i in range(h0):
      buf[1 << w0] = { 1 << j for j,x in enumerate(input()) if x == '#' }
    found = 0
    for i in range(1, 1 << h0):
      idx = {}
      for k,v in buf.items():
        if k & i == 0: continue
        for v in vs: idx[v] = idx.get(v, 0) + 1
      for j in range(1, 1 << w0):
        n = sum([ v for k,v in idx.items() if k & j ])
        if n == k0: found += 1
    print(found)

Buggy submission (verdict: Runtime Error):
h0, w0, k0 = [ int(x) for x in input().split() ]
buf = 1
for i in range(h0):
  buf[1 << w0] = { 1 << j for j,x in enumerate(input()) if x == '#' }
found = 0
for i in range(1, 1 << h0):
  idx = {}
  for k,v in buf.items():
    if k & i == 0: continue
    for v in vs: idx[v] = idx.get(v, 0) + 1
  for j in range(1, 1 << w0):
    n = sum([ v for k,v in idx.items() if k & j ])
    if n == k0: found += 1
print(found)
Problem p03316 (python)

Fixed submission:
x = input()
s = sum([ int(i) for i in x ])
print('No' if int(x) % s else 'Yes')

Buggy submission (verdict: Runtime Error):
x = input()
s = sum([ int(i) for i in x ])
return 'No' if int(x) % s else 'Yes'
Problem p02612 (python)

Fixed submission:
import sys
N = int(input())

ans = 0
if N % 1000 == 0:
  ans = 0
else:
  ans = 1000 - (N % 1000)

print(ans)

Buggy submission (verdict: Runtime Error):
import sys

N = int(input())

if N % 1000 == 0:
  ans = 0
elif:
  ans = N % 1000
  
print(ans)
Problem p03399 (python)

Fixed submission:
a = int(input())
b = int(input())
c = int(input())
d = int(input())
print(min(a+c,a+d,b+c,b+d))

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

Fixed submission:
a = input()
b = input()
c = input()
print(a[0]+b[1]+c[2])

Buggy submission (verdict: Runtime Error):
a,b,c = map(str,input().split())
print(a[0]+b[1]+c[2])

Buggy submission (verdict: Runtime Error):
l = list(input().split())
print(l[0][0]+l[1][1]+l[2][2])
Problem p03433 (python)

Fixed submission:
n = int(input())
a = int(input())
if n%500 > a:
  print("No")
else:
  print("Yes")

Buggy submission (verdict: Runtime Error):
n,a = map(int,input().split())
if n%500 > a:
  print("No")
else:
  print("Yes")
Problem p03485 (python)

Fixed submission:
import math

a,b = map(int,input().split())
print(math.ceil((a+b)/2))

Buggy submission (verdict: Runtime Error):
import math

a,b = map(int,input().split())
print(math.ciel((a+b)/2))
Problem p03547 (python)

Fixed submission:
x,y = input().split()
if x == "A":
  if y == "A":
    print("=")
  else:
    print("<")
elif x == "B":
  if y == "A":
    print(">")
  elif y == "B":
    print("=")
  else:
    print("<")
elif x == "C":
  if y == "A" or y == "B":
    print(">")
  elif y == "C":
    print("=")
  else:
    print("<")
elif x == "D":
  if y == "E" or y == "F":
    print("<")
  elif y == "D":
    print("=")
  else:
    print(">")
elif x == "E":
  if y == "F":
    print("<")
  elif y == "E":
    print("=")
  else:
    print(">")
else:
  if y == "F":
    print("=")
  else:
    print(">")

Buggy submission (verdict: Runtime Error):
x,y = input().split()
l = [A,B,C,D,E,F]
if l.index(x) < l.index(y):
  print("<")
elif l.index(x) > l.index(y):
  print(">")
else:
  print("=")
Problem p03555 (python)

Fixed submission:
a = input()
b = input()
if a == b[::-1]:
  print("YES")
else:
  print("NO")

Buggy submission (verdict: Runtime Error):
l = list(input().split())
if l[0] == l[1][::-1]:
  print("YES")
else:
  print("NO")

Buggy submission (verdict: Runtime Error):
l = list(input().split())
if l[0][0] == l[1][2] and l[0][1] == l[1][1] and l[0][2] == l[1][0]:
  print("YES")
else:
  print("NO")
Problem p03563 (python)

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

Buggy submission (verdict: Runtime Error):
r,g = map(int,input().split())
print(g*2-r)
Problem p03573 (python)

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

Buggy submission (verdict: Runtime Error):
a,b,c = map(int,inout().split())
if a == b:
  print(c)
elif b == c:
  print(a)
else:
  print(b)
Problem p03597 (python)

Fixed submission:
n = int(input())
a = int(input())
print(n*n-a)

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

Buggy submission (verdict: Runtime Error):
n,a = map(int,input().split())
print(n**2-a)
Problem p03697 (python)

Fixed submission:
a,b = map(int, input().split())
if a+b >= 10:
  print("error")
else:
  print(a+b)

Buggy submission (verdict: Runtime Error):
a,b = map(int, input().split())
if (a+b) <= 9:
  print(a+b)
else;
  print("error")

Buggy submission (verdict: Runtime Error):
a,b = map(int, input().split())
if (a+b) <= 9:
  print(a+b)
else;
  print("error")

Buggy submission (verdict: Runtime Error):
a,b = map(int, input().split())
if (a+b) <= 9:
  print(a+b)
else;
print("error")

Buggy submission (verdict: Runtime Error):
a,b = map(int, input().split())
if a+b <= 9:
  print(a+b)
else;
print("error")
Problem p03737 (python)

Fixed submission:
l = list(input().split())
print(l[0][0].upper() + l[1][0].upper() + l[2][0].upper())

Buggy submission (verdict: Runtime Error):
a,b,c = map(str,input(),split())
A = a[0].upper()
B = b[0].upper()
C = c[0].upper()
X = A+B+C
X = X.strip()
print(X)
Problem p03777 (python)

Fixed submission:
a,b = input().split()
if a == "H":
  if b == "H":
    print("H")
  else:
    print("D")
else:
  if b == "H":
    print("D")
  else:
    print("H")

Buggy submission (verdict: Runtime Error):
a,b = map(str,input().split())
if a == H:
  if b == H:
    print("H")
  else:
    print("D")
else if a == D:
  if b == H:
    print("D")
  else:
    print("H")

Buggy submission (verdict: Runtime Error):
a,b = input().split()
if a == H:
  if b == H:
    print("H")
  else:
    print("D")
else if a == D:
  if b == H:
    print("D")
  else:
    print("H")
Problem p03844 (python)

Fixed submission:
l = list(input().split())
if l[1] == "+":
  print(int(l[0])+int(l[2]))
else:
  print(int(l[0])-int(l[2]))

Buggy submission (verdict: Runtime Error):
a,b,op = input().split()
a = int(a)
b = int(b)
if op == '+':
  print(a+b)
else:
  print(a-b)

Buggy submission (verdict: Runtime Error):
a,b = map(int,input().split())
op = input()
if op == "+":
  print(a+b)
else:
  print(a-b)

Buggy submission (verdict: Runtime Error):
a,b = map(int,input().split())
op = input()
if op == "+":
  print(int(a+b))
else:
  print((a-b))

Buggy submission (verdict: Runtime Error):
a,b = map(int,input().split())
if op == "+":
  print(int(a+b))
else:
  print((a-b))

Buggy submission (verdict: Runtime Error):
a,b = map(int,input().split())
if op == "+":
  print(a+b)
else:
  print(a-b)
Problem p03852 (python)

Fixed submission:
c = input()
l = ["a","e","i","o","u"]
if c in l:
  print("vowel")
else:
  print("consonant")

Buggy submission (verdict: Runtime Error):
c = input()
l = [a,e,i,o,u]
if c in l:
  print("vowel")
else:
  print("consonant")

Buggy submission (verdict: Runtime Error):
c = map(str,input().split())
if c == "a" or c == "e" or c == "i" or c == "o" or c == "u":
  print(vowel)
else:
  print(consonant)

Buggy submission (verdict: Runtime Error):
c = map(str,input().split())
if c == a or c == e or c == i or c == o or c == u:
  print(vowel)
else:
  print(consonant)
Problem p03860 (python)

Fixed submission:
l = list(input().split())
print(l[0][0]+l[1][0]+l[2][0])

Buggy submission (verdict: Runtime Error):
s = input()
s1 = s[1]
name = []
name.append("A")
name.appemd(s1)
name.append("C")
print("".join(name))
Problem p03943 (python)

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

Buggy submission (verdict: Runtime Error):
a,b,c = map(int,input().spliy())
if a+b == c or b+c == a or c+a == b:
  print("YES")
else:
  print("NO")

Buggy submission (verdict: Runtime Error):
a = int(input())
b = int(input())
c = int(input())
n = [a,b,c]
d = (a+b+c)/2
if n.count(int(d)) == 1:
  print("YES")
else:
  print("NO")

Buggy submission (verdict: Runtime Error):
a = int(input())
b = int(input())
c = int(input())
n = [a,b,c]
d = int ((a+b+c)/2)
if n.count(d) == 1:
  print("YES")
else:
  print("NO")

Buggy submission (verdict: Runtime Error):
a,b,c = map(int,input())
ave = int((a+b+c)/2)
if a == ave or b == ave or c == ave:
  print("Yes")
else:
  print("No")

Buggy submission (verdict: Runtime Error):
a,b,c = map(int,input())
ave = (a+b+c)/2
if a == ave or b == ave or c == ave:
  print("Yes")
else:
  print("No")
Problem p03962 (python)

Fixed submission:
n = list(map(int, input().split()))
N = list(set(n))
print(len(N))

Buggy submission (verdict: Runtime Error):
color = []
color.append(int(input(),range(3)))
x = count(color[0])
y = count(color[1])
if x == 1 and y == 1:
  print("3")
else if x == 1 and y == 2:
  print("2")
else if x == 2:
  print("2")
else:
  print("1")
Problem p04011 (python)

Fixed submission:
N = int(input())
K = int(input())
X = int(input())
Y = int(input())
if N >= K:
  print(K*X+(N-K)*Y)
else:
  print(N*X)

Buggy submission (verdict: Runtime Error):
n,k,x,y = map(int, input())
if n > k:
  print(k*x+(n-k)*y)
else:
  print(n*x)

Buggy submission (verdict: Runtime Error):
n,k,x,y = map(int, input())
if n > k:
  sum = k*x+(n-k)*y
else:
  sum = n*x
print(sum)

Buggy submission (verdict: Runtime Error):
n,k,x,y = map(int, input())
if n > k:
  sum = k*x+(n-k)*y
else:
  sum = n*x
print(int(sum))
Problem p04029 (python)

Fixed submission:
n = int(input())
N = int(n*(n+1)/2)
print(N)

Buggy submission (verdict: Runtime Error):
N = int(input())
print(sum(1,N))

Buggy submission (verdict: Runtime Error):
S = 0
for i in range(N)
   S += i
print(N)