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

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

a_b = ((a*b)%2)

if a_b == 0:
    print("Even")
else:
    print("Odd")

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

t = []
cordinate = []

#　リストtに時間の情報、二次元配列のcordinateにx,y座標を入れる
for i in range(N):
    time,x,y = map(int, input().split())
    t.append(time)
    cordinate.append([x,y])

# 初期の時間と初期座標
time = 0
x,y = 0,0


for i in range(len(t)):
    
    # 移動先への移動にかけて良い時間
    time = abs(time - t[i])
    
    #移動先のx,y座標
    objx = cordinate[i][0]
    objy = cordinate[i][1]
    

    
    #移動できる時間より距離が長い場合はアウト
    if time < abs((objx - x) + (objy - y)):
        print("No")
        sys.exit()
    
    #偶奇の判定
    if (abs((objx - x) + (objy - y)))%2 != time % 2:
        print("No")
        sys.exit()

    x,y = objx,objy
    time = t[i]

print("Yes")

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

t = []
cordinate = []

#　リストtに時間の情報、二次元配列のcordinateにx,y座標を入れる
for i in range(N):
    time,x,y = map(int, input().split())
    t.append(time)
    cordinate.append([x,y])

# 初期の時間と初期座標
time = 0
x,y = 0,0


for i in range(len(t)):
    
    # 移動先への移動にかけて良い時間
    time = abs(time - t[i])
    
    #移動先のx,y座標
    objx = cordinate[i][0]
    objy = cordinate[i][1]
    

    
    #移動できる時間より距離が長い場合はアウト
    if time < abs((objx - x) + (objy - y)):
        print("No")
        sys.exit()
    
    #偶奇の判定
    if (abs((objx - x) + (objy - y)))%2 != time % 2:
        print("No")
        sys.exit()

    x,y = objx,objy

print("Yes")
Problem p03456 (python)

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

abint = int(a+b)

ans = 0

for i in range(1,1001):
    for j in range(1,1001):
        if i*j == abint and i == j:
            ans = ans + 1

if ans == 0:
    print("No")
else:
    print("Yes")

Buggy submission (verdict: Runtime Error):
N = int(input())
x = [0] * N
u = [0] * N
for i in range(N):
    x[i],u[i] = map(int, input().split())







ans = []

btc_1 = 380000.0

for i  in range(N):
    if u[i] == "JPY":
        ans.append(x[i])
    else:
        yen = ((x[i])*(btc_1))
        ans.append(yen)

print(sum(ans))
Problem p03469 (python)

Fixed submission:
s=input()
print("2018"+s[4:])

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

S2 = S.replace(7,8,1)

print(S2)
Problem p03473 (python)

Fixed submission:
M = int(input())

print(48-M)

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

S =  input()


if  S[A] == "-" and S.count("-") == 1:
    ans = "Yes"
else:
    ans = "No"

print(ans)
Problem p03474 (python)

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

S =  input()


if  S[A] == "-" and S.count("-") == 1:
    ans = "Yes"
else:
    ans = "No"

print(ans)

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

S =  input()


if S.count("-") == 1 and S[A] == "-":
    ans = "Yes"
else:
    ans = "No"

print(ans)

Buggy submission (verdict: Runtime Error):
A,B = map(str, input().split())
S =  input()

ans = 0

if S.count("-") == 1 and S[A] == "-":
    ans = ans + 1

if ans == 0:
    print("No")
else:
    print("Yes")
Problem p03485 (python)

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

adivb =((a+b)//2) 
addition = ((a+b)%2)

print((adivb)+(addition))

Buggy submission (verdict: Runtime Error):
s = input()
s1 = sorted(s)
s2 = input()


ans = 0
ans2 = 0



for i in s2:
    if s == s2:
        break
    if s1[0] <= i:
        ans = ans + 1
        for k in range(0,len(s1)):
            if s1[k] <= i:
                ans2 = ans2 + 1
    
if ans != 0 and ans2 != 0:
    print("Yes")
else:
    print("No")
Problem p03486 (python)

Fixed submission:
scara = input()
s= sorted(scara)
tcar = input()
t= sorted(tcar, reverse=True)

for i, j in zip(s, t):
  if i < j:
    print("Yes")
    break
  elif i > j:
    print("No")
    break
else:
        if len(s) < len(t):

            print("Yes")
        else:

            print("No")

Buggy submission (verdict: Runtime Error):
b
Problem p03501 (python)

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

N_A = (N*A)

if N_A <= B:
    print(N_A)
else:      
    print(B)

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

NxA = (N*A)

if NxA =< B:
    print(NxA)
else:
    print(B)

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

NxA = (N*B)

if NxA =< B:
    print(NxA)
else:
    print(B)
Problem p03534 (python)

Fixed submission:
s = input()
a = [s.count("a"), s.count("b"), s.count("c")]
a.sort(reverse=True)
if a[0] <= a[2] + 1:
    print("YES")
else:
    print("NO")

Buggy submission (verdict: Runtime Error):
s = input()
c = Counter(s)
v = list(c.values())
if max(v) - min(v) > 1: 
  print("NO")
else:
  print("YES")
Problem p03543 (python)

Fixed submission:
S = input()

if (S[0] == S[1] == S[2]) or (S[1] == S[2] == S[3]):
    print("Yes")
else:
    print("No")

Buggy submission (verdict: Runtime Error):
if (S[0] == S[1] == S[2]) or (S[1] == S[2] == S[3]) or (S[0] == S[1] == S[2] == S[3] == S[4]):
    print("Yes")
else:
    print("No")
Problem p03544 (python)

Fixed submission:
N = int(input())

L = [2, 1]
for i in range(2, N+1):
    L.append(L[i-1] + L[i-2])
    
print(L[N])

Buggy submission (verdict: Runtime Error):
import sympy as sym
N = 5
A = [sym.lucas(x) for x in range(N)]
print(A[N])
Problem p03547 (python)

Fixed submission:
X,Y = map(str, input().split())

A,B,C,D,E,F = 10,11,12,13,14,15

if X > Y:
    print(">")
elif X < Y:
    print("<")
else:
    print("=")

Buggy submission (verdict: Runtime Error):
X,Y = map(str, input().split())

"A" = 1
"B" = 2
"C" = 3
"D" = 4
"E" = 5
"F" = 6

if X > Y:
    print(">")
elif X < Y:
    print("<")
else:
    print("=")
Problem p03555 (python)

Fixed submission:
A = input()
B = input()

REA = (A[0] + A[1] + A[2])
REB = (B[2] + B[1] +B[0])

if REA == REB:
    print("YES")
else:
    print("NO")

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

REA = (A[0] + A[1] + A[2])
REB = (A[2] + A[1] +A[0])

if REA == REB:
    print("YES")
else:
    print("NO")

Buggy submission (verdict: Runtime Error):
A = [input() for _ in range(N)]
B = [input() for _ in range(N)]

REA = (A[0] + A[1] + A[2])
REB = (A[2] + A[1] +A[0])

if REA == REB:
    print("YES")
else:
    print("NO")

Buggy submission (verdict: Runtime Error):
C11,C12,C13 = map(str, input().split())

C21,C22,C23= map(str, input().split())

hoge = (C13 + C12 + C11)
hoge2 =(C21 + C22 + C23)

if hoge == hpge2:
    print("YES")
else:
    print("NO")
Problem p03556 (python)

Fixed submission:
n = int(input())
x = 1
while x * x <= n:
    x += 1

x -= 1
print(x * x)

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

ans1 = []
ans2 = []

for i in range(1,N):
    for j in  range(1,N):
        if i == j and i*j == N:
            ans1.append(i*j)
        elif i == j and i*j <= N:
            ans2.append(i*j) 
            

if ans1 != 0:
    print(max(ans1))
else:
    print(max(ans2))

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

ans1 = []
ans2 = []

for i in range(1,N):
    for j in  range(1,N):
        if i == j and i*j == N:
            ans1.append(i*j)
        elif i == j and i*j <= N:
            ans2.append(i*j) 
            

if ans1 != 0:
    print(max(ans1))
else:
    print(max(ans2))
Problem p03563 (python)

Fixed submission:
R = int(input())
G = int(input())

X = ((2*G)-R)

print(X)

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

X = ((2*G)-R)

print(X)
Problem p03578 (python)

Fixed submission:
from collections import Counter
import sys

N = int(input())
D = list(map(int, input().split()))
D = sorted(D)
D_counter = Counter(D)


M = int(input())
T = list(map(int, input().split()))
T = sorted(T)
T_counter = Counter(T)



D_keylist = (list(D_counter.items()))

T_keylist = (list(T_counter.keys()))
T_Valuelist = (list(T_counter.values()))


ans = 0
T_index = 0

for i in D_keylist:
    D_key = i[0] # N個の問題案の中のi個めの問題案の番号
    D_value = i[1] # N個の問題案の中のi個めの問題案の難易度

    T_key = T_keylist[T_index] # M個の問題案の中のi個めの問題案の番号
    T_value = T_Valuelist[T_index] # M個の問題案の中のi個めの問題案の番号


    if D_key == T_key and (D_value >= T_value): #もしNとMの番号問題が一致しており、なおかつN個の問題の方が難易度が多かったら加算
        T_index = T_index + 1 #もし一致していたら、Mの問題番号を横にひとつずらす
        ans = ans + 1 #加算

        if T_index == M:
            break
    else:
        pass


if len(T_keylist) == ans: #M個の問題を作る事ができればYES,無理ならNO
    print("YES")
else:
    print("NO")

Buggy submission (verdict: Runtime Error):
from collections import Counter
import sys

N = int(input())
D = list(map(int, input().split()))
D = sorted(D)
D_counter = Counter(D)


M = int(input())
T = list(map(int, input().split()))
T = sorted(T)
T_counter = Counter(T)


#一つずつずらしていく、Tのkeyとvalueを取り出す
D_keylist = (list(D_counter.items()))

#一つずつずらしていく、Tのkeyとvalueを取り出す
T_keylist = (list(T_counter.keys()))
T_Valuelist = (list(T_counter.values()))

if N < M:
    print("NO")
    sys.exit()




 
ans = 0
T_index = 0
for i in D_keylist:
    D_key = i[0]
    D_value = i[1]

    T_key = T_keylist[T_index]
    T_value = T_Valuelist[T_index]


    if D_key == T_key and (D_value >= T_value):
        T_index = T_index + 1
        ans = ans + 1
    else:
        pass


if len(T_keylist) == ans:
    print("YES")
else:
    print("NO")

Buggy submission (verdict: Runtime Error):
from collections import Counter
import sys

N = int(input())
D = list(map(int, input().split()))
D = sorted(D)
D_counter = Counter(D)


M = int(input())
T = list(map(int, input().split()))
T = sorted(T)
T_counter = Counter(T)


#一つずつずらしていく、Tのkeyとvalueを取り出す
D_keylist = (list(D_counter.items()))

#一つずつずらしていく、Tのkeyとvalueを取り出す
T_keylist = (list(T_counter.keys()))
T_Valuelist = (list(T_counter.values()))

 
ans = 0
T_index = 0
for i in D_keylist:
    D_key = i[0]
    D_value = i[1]

    T_key = T_keylist[T_index]
    T_value = T_Valuelist[T_index]


    if D_key == T_key and (D_value >= T_value):
        T_index = T_index + 1
        ans = ans + 1
    else:
        pass


if len(T_keylist) == ans:
    print("YES")
else:
    print("NO")
Problem p03605 (python)

Fixed submission:
S = input()

if S[0] == "9" or S[1] == "9":
    print("Yes") 
elif S[0] ==9 and S[1] == "9":
    print("Yes")
else:
    print("No")

Buggy submission (verdict: Runtime Error):
ああ
Problem p03607 (python)

Fixed submission:
import sys
N = int(input())
A = []
for _ in range(N):
    A.append(int(input())) 

# 0の時と、全部が同じ数の時の場合分け。

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

if set(A) == 1:
    print(0)
    sys.exit()

A = sorted(A)


count = 1
ans = 0
firstnum = A[0] 
for i in range(1,N):
    if firstnum == A[i]:
        count = count + 1
    else:
        if count % 2 == 0:
            count = 1
        else:
            ans = ans + 1
            count = 1

    firstnum = A[i]  

if count%2 == 0:
  ans = ans +0
else:
  ans = ans + 1
print(ans)

Buggy submission (verdict: Runtime Error):
import sys
N = int(input())
A = []
for _ in range(N):
    A.append(int(input())) 

checklis = [0]*max(A)

for i in A:
    lisnumber = i-1
    if checklis[lisnumber] == 0:
        checklis[lisnumber] = 1
    elif checklis[lisnumber] == 1:
        checklis[lisnumber] = 0

print(sum(checklis))
Problem p03624 (python)

Fixed submission:
S = input()

hoge = ['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z']

hoge2 = list(S)

differlen = len((set(hoge) ^ set(hoge2)))

differ2 = set(hoge) ^ set(hoge2)
differ3 = sorted(differ2)




if differlen == 0:
    print("None")
else:
    print(differ3[0])

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

hoge = ['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z']

hoge2 = list(S)

differlen = len((set(hoge) ^ set(hoge2)))

differ2 = set(hoge) ^ set(hoge3)
differ3 = sorted(differ2)




if differlen == 0:
    print("None")
else:
    print(differ3[0])
Problem p03644 (python)

Fixed submission:
n = int(input())
ans = 1
for i in range(8):
  if(n >= 2 ** i):
    ans = 2 ** i
print(ans)

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

ans = 1
for i in range(8):
  if(n >= 2 ** i):
    ans = 2 ** i
print(ans)
Problem p03671 (python)

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

a_b = a+b
a_c = a+c
b_c = b+c

print(min(a_b,a_c,b_c))

Buggy submission (verdict: Runtime Error):
import sys 

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


if N == 1:
    print(A[0])
    sys.exit()

mae = []
usiro = []

#0の時に前 1の時に後ろ
Flag = 0

for i in reversed(range(0,N,1)):
    
    if Flag == 0: # 前の時
        mae.append(str(A[i]))
        mae.append(" ")
        Flag = 1
    else:
        usiro.insert(0,str(A[i]))
        #usiro.insert(0,str(" "))
        Flag = 0

moziretu = (mae + usiro)
#del moziretu[((len(moziretu))//2)]
moziretu = ''.join(moziretu)
print(moziretu)
Problem p03673 (python)

Fixed submission:
import sys 
from collections import deque
N = int(input())
A = list(map(int, input().split()))


if N == 1:
    print(A[0])
    sys.exit()

mae = deque()
usiro = deque()

#0の時に前 1の時に後ろ
Flag = 0

for i in reversed(range(0,N,1)):
    
    if Flag == 0: # 前の時
        mae.append(str(A[i]))
        mae.append(" ")
        Flag = 1
    else:
        usiro.insert(0,str(A[i]))
        usiro.appendleft(" ")
        Flag = 0

moziretu = (mae + usiro)
del moziretu[((len(moziretu))//2)]
moziretu = ''.join(moziretu)
print(moziretu)

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

mae = []
usiro = []

#0の時に前 1の時に後ろ
Flag = 0

for i in reversed(range(0,N,1)):
    
    if Flag == 0: # 前の時
        mae.append(A[i])
        Flag = 1
    else:
        usiro.insert(0,A[i])
        Flag = 0

moziretu = (mae + usiro)
moziretu = ''.join(moziretu)
print(' '.join(moziretu))
Problem p03680 (python)

Fixed submission:
N = int(input())
a = list()
for i in range(N):
	a.append(int(input()))

temp = 1
count = 0
while temp != 2 and count <= 100001:
	temp = a[temp - 1]
	count += 1

if count > 100000:
	print(-1)
else:
	print(count)

Buggy submission (verdict: Runtime Error):
あ
Problem p03697 (python)

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

A_B = (A+B)

if A_B >= 10:
    print("error")
else:
    print(A_B)

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

A_B = (A+B)

if A_B < 10:
    print(A_B)
elif A_B > 10:
    print("error")
elif A_B = 10:
    print("error")
Problem p03711 (python)

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

a = [4,6,9,11]
b = [1,3,5,7,8,10,12]

if x in a and y in a:
    print("Yes")
elif x in b and y in b:
    print("Yes")
elif x == y == 2:
    print("Yes")
else:
    print("No")

Buggy submission (verdict: Runtime Error):
x,y = map(int,input().split())
a = [4,6,9,11]
b = [1,3,5,7,8,10,12]

if x in a and y in a:
    print("Yes")
elif x in b and y in b:
    print("Yes")
elif x == y == 2:
    print("Yes"
else:
    print("No")
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
Problem p03720 (python)

Fixed submission:
# -*- coding: utf-8 -*-

import sys
import os
import math

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

A = [0] * N
for i in range(M):
    a, b = map(int, input().split())
    a -= 1
    b -= 1

    A[a] += 1
    A[b] += 1

for i in range(N):
    print(A[i])

Buggy submission (verdict: Runtime Error):
b
Problem p03730 (python)

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

ans = 0

for i in range(1,B+1):
    number = ((A*i) % B )
    if number == C:
        ans = ans + 1

if ans != 0:
    print("YES")
else:
    print("NO")

Buggy submission (verdict: Runtime Error):
a
Problem p03759 (python)

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

b_a = (b-a)
c_b = (c-b)

if b_a == c_b:
    print("YES")
else:
    print("NO")

Buggy submission (verdict: Runtime Error):
O = input()
O_2 = list(O)
OLEN = len(O)

E = input()
E_2 = list(E)
ELEN = len(E)

ans = []

if ELEN >= OLEN:
    N = ELEN
else:
    N = OLEN



if OLEN == ELEN:
    for i in range(N):
        ans.append(O_2[i])
        ans.append(E_2[i])

elif OLEN  != ELEN:
    
    for i in range(N):
        if len(ans) == ((OLEN) + (ELEN) -1):
            if OLEN > ELEN:
                ans.append(O_2[-1])
            else:
                ans.append(E_2[-1])
            break
        ans.append(O_2[i])
        ans.append(E_2[i])


for i in ans:
  print(i,end="")

Buggy submission (verdict: Runtime Error):
O = input()
O_2 = list(O)
OLEN = len(O)

E = input()
E_2 = list(E)
ELEN = len(E)

ans = []

if ELEN >= OLEN:
    N = ELEN
else:
    N = OLEN



if OLEN == ELEN:
    for i in range(N):
        ans.append(O_2[i])
        ans.append(E_2[i])

elif OLEN  != ELEN:
    
    for i in range(N):
        if len(ans) == ((OLEN) + (ELEN) -1):
            if OLEN > ELEN:
                ans.append(O_2[-1])
            else:
                ans.append(E_2[-1])
            break
        ans.append(O_2[i])
        ans.append(E_2[i])


print(ans)
Problem p03773 (python)

Fixed submission:
a, b = map(int, input().split())
if a+b >= 24:
    print(a+b-24)
else:
    print(a+b)

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

if A < B:
    print(A+B)
elif A == 0 and B == 0:
    print(0)
elif A != 0 and B==0:
    print(0)
elif A > B:
    print((A+B-24)
Problem p03795 (python)

Fixed submission:
N = int(input())
sum = 800 * N
otsuri = (N // 15) * 200

print(sum - otsuri)

Buggy submission (verdict: Runtime Error):
from  math import factorial
N = int(input())
N2=math.factorial(N)

print((N2)%(10 ** 9 + 7))

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

ALL = 800 * N

TIMES = (N // 15) * 200

print(All - TIMES)

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

ALL = 800 * N

TIMES = (N // 15) * 200

print(All - TIMES)

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

ALL = 800 * N
TIMES = (N // 15)*200

print(All - TIMES)

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

ALL = 800 * N
TIMES = N //15

print(All - (200*TIMES))

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

ALL = N*800
TIMES = N //15

print(All - (200*TIMES))

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

ALL = N*800
TIMES = N //15


if N < 15:
    print(ALL)
else:
    print(All - (200*TIMES))

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

ALL = N*800
TIMES = N //15


if N < 15:
    print(ALL)
else:
    print(All - (800*TIMES))
Problem p03796 (python)

Fixed submission:
import math
N = int(input())
N2=math.factorial(N)

print((N2)%(10 ** 9 + 7))

Buggy submission (verdict: Runtime Error):
from  math import factorial
N = int(input())
N2=math.factorial(N)

print((N2)%(10 ** 9 + 7))

Buggy submission (verdict: Runtime Error):
N = int(input())
N2=math.factorial(N)

print(N2%1000000007)

Buggy submission (verdict: Runtime Error):
a
Problem p03845 (python)

Fixed submission:
N = int(input())
A = list(map(int, input().split()))
M = int(input())
total = sum(A)
ans = []
for _ in range(M):
  p, x = map(int, input().split())
  ans.append(total+x - A[p-1])
for a in ans:
  print(a)

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

M = int(input())        


ans = T
number = []
for _ in range(M):
    P, X = map(int, input().split())
    ans[P] = X
    number.append(sum(ans))
    ans = T

for i in number:
    print(i)

Buggy submission (verdict: Runtime Error):
a
Problem p03943 (python)

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

A_B = (a+b)
A_C = (a+c)
B_C = (b+c)

if (A_B == c):
    print("Yes")
elif (A_C == b):
    print("Yes")
elif (B_C == a ):
    print("Yes")
else:
    print("No")

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

A_B = (a+b)
A_C = (a+c)
B_C = (b+c)

if (A_B == c) or (A_C == b) or (B_C = a):
    print("Yes")
else:
    print("No")

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

A_B = (A+B)
A_C = (A+C)
B_C = (B+C)

if A_B == C or A_C == B or B_C = A:
    print("Yes")
else:
    print("No")
Problem p03962 (python)

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

if a == b and a == c:
    print(1)
elif a == b and a != c:
    print(2)
elif a == c and a != b:
    print(2)
elif b == c and b != a:
    print(2)
else:
    print(3)

Buggy submission (verdict: Runtime Error):
n,k = map(int,input().split())
 
print(k * (k-1)**(n-1))
Problem p03998 (python)

Fixed submission:
a=list(input())
b=list(input())
c=list(input())
s=a.pop(0)
w=''
while True:
    if(s=='a'):
        if(len(a)==0):
            w='A'
            break
        s=a.pop(0)
    elif(s=='b'):
        if(len(b)==0):
            w='B'
            break
        s=b.pop(0)
    else:
        if(len(c)==0):
            w='C'
            break
        s=c.pop(0)
print(w)

Buggy submission (verdict: Runtime Error):
a
Problem p04011 (python)

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

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

# N泊連続で行う。最初の K 泊まで X 円.　K+1泊以降はY円

if  N <= K:
    print(X*N)
else:
    print(((N-K)*Y) + (X*Y)

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

D = (N-K)*X + (N-(K+1))*Y 

# N泊連続で行う。最初の K 泊まで X 円.　K+1泊以降はY円

if  N <= (K+1):
    print(X*X)
elif  N >= (K+1):
    print(((N-K)*X) + ((N-(K+1))*Y)


#　10泊する　5泊目までX円　6泊目からY円　(((N-K)*X) + ()
Problem p04044 (python)

Fixed submission:
N, L = map(int, input().split())
S = []
for _ in range(N):
    S.append(input())

S1 = sorted(S)

S2 ="".join(S1)

print(S2)

Buggy submission (verdict: Runtime Error):
N, L = map(int, input().split())
S = []
for _ in range(H):
    S.append(input())

S1 = sorted(S)

S2 ="".join(S1)

print(S2)

Buggy submission (verdict: Runtime Error):
a
Problem p03150 (python)

Fixed submission:
u=str(input())
S=u.replace(' ','z')
A=[]
for i in range(len(S)+1):
    for j in range(len(S)+1):
        if i<=j:
            A.append(S.replace(S[i-1:j],'',1))
if 'keyence' in A:
    print('YES')
else:
    print('NO')

Buggy submission (verdict: Runtime Error):
S=list(input())
T=list('keyence')
A=[]
B=[]
C=[]
a=0
for i in range(len(S)):
    if S[i]==T[a]:
        A.append(i)
        a+=1
if len(A)!=7:
    print('NO')
elif A==[0,1,2,3,4,5,6]:
    print('YES')
else:
    for i in range(0,A[len(A)-1]+1):
        B.append(i)
    for i in range(len(B)):
        if B[i] not in A:
            C.append(B[i])
    if C[len(C)-1]-C[0]==len(C)-1:
        print('YES')
    else:
        print('NO')

Buggy submission (verdict: Runtime Error):
S=list(input())
T=list('keyence')
A=[]
B=[]
C=[]
a=0
for i in range(len(S)):
    if S[i]==T[a]:
        A.append(i)
        a+=1
if len(A)!=7:
    print('NO')
elif len(A)==7:
    print('YES')
else:
    for i in range(0,A[len(A)-1]+1):
        B.append(i)
    for i in range(len(B)):
        if B[i] not in A:
            C.append(B[i])
    if C[len(C)-1]-C[0]==len(C)-1:
        print('YES')
    else:
        print('NO')
Problem p03324 (python)

Fixed submission:
D,N=map(int,input().split())
a=100**(D)
A=[]
for i in range(1,101):
    A.append(i*a)
if D==0:
    A.remove(100)
    A.append(101)
elif D==1:
    A.remove(10000)
    A.append(10100)
elif D==2:
    A.remove(1000000)
    A.append(1010000)
print(A[N-1])

Buggy submission (verdict: Runtime Error):
D,N=map(int,input().split())
a=100**(D)
A=[]
for i in range(1,101):
    A.append(i*a)
if D==0:
    A.remove(100)
elif D==1:
    A.remove(10000)
elif D==2:
    A.remove(1000000)
print(A[N-1])
Problem p03456 (python)

Fixed submission:
a,b=map(str,input().split())
c=int(a+b)
if (c**(1/2))%1==0:
    print('Yes')
else:
    print('No')

Buggy submission (verdict: Runtime Error):
import numpy as np
a,b=map(str,input().split())
c=int(a+b)
if np.sqrt(c)%1==0:
    print('Yes')
else:
    print('No')