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

Fixed submission:
A, B = map(int, input().split())
 
if B % A == 0:
    print(A + B)
else:
    print(B - A)

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

if B % A == 0：
    print(A + B)
else:
    print(B - A)

Buggy submission (verdict: Runtime Error):
A, B = map(int, input().split())
 
if B % A == 0：
    print(A + B)
else:
    print(B - A)

Buggy submission (verdict: Runtime Error):
A, B = map(int, input().split())
 
if B % A == 0：
    print(A + B)
else:
    print(B - A)

Buggy submission (verdict: Runtime Error):
A, B = map(int, input().split())
 
if B % A == 0：
    print(A+B)
else:
    print(B-A)

Buggy submission (verdict: Runtime Error):
A, B = map(int, input().split())
 
if A % B == 0：
    print(A+B)
else:
    print(B-A)

Buggy submission (verdict: Runtime Error):
A, B = map(int, input().split())
 
if A % B == 0：
    print(A+B)
else:
    print(A-B)

Buggy submission (verdict: Runtime Error):
A, B = map(int, input().split())
1 <= B <= A <= 20
 
if A % B == 0：
    print(A+B)
else:
    print(B-A)

Buggy submission (verdict: Runtime Error):
A, B = map(int, input().split())
1 <= B <= A <= 20
 
if A % B == 0：
    print(A+B)
else:
    print(A-B)

Buggy submission (verdict: Runtime Error):
A, B = (int(i) for i in input().split())
1 <= B <= A <= 20
 
if A % B == 0：
    print(A+B)
else:
    print(A-B)

Buggy submission (verdict: Runtime Error):
A, B = (int(i) for i in input().split())
1 <= B <= A <= 20
 
if B % A == 0：
    print(A+B)
else:
    print(A-B)

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

 
if B%A==0：
    ptint(A+B)
else:
    print(A-B)

Buggy submission (verdict: Runtime Error):
A, B = (int(i) for i in input().split())
1 <= B <= A <= 20

if B%A==0：
    ptint(A+B)
else:
    print(A-B)
Problem p03240 (python)

Fixed submission:
n=int(input())
zahyo=[list(map(int,input().split())) for i in range(n)]

zahyo.sort(key=lambda x:x[2], reverse = 1)
mx,my,mh=zahyo[0]
for Cx in range(101):
    for Cy in range(101):
        H = mh+abs(mx-Cx)+abs(my-Cy)
        if all(h == max(H-abs(x-Cx)-abs(y-Cy),0) for x,y,h in zahyo):
            print(Cx,Cy,H)
            break

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

zahyo.sort(key=lambda x:x[2], reverse = 1)
mx,my,mh=zahyo[0]
for Cx in range(101):
    for Cy in range(101):
        H = mh+abs(mx-Cx)+abs(my-Cy)
        if all(h == max(H-abs(x-Cx)+abs(y-Cy),0) for x,y,h in zahyo):
            print(Cx,Cy,h)
            break
Problem p02608 (python)

Fixed submission:
import math




N=int(input())

anslist=[0]*(N+1)
ma=int(math.sqrt(N))+1
for x in range(1,ma):
    for y in range(x,ma):
        for z in range(y,ma):
            n=x**2+y**2+z**2+x*y+y*z+z*x
            if n <=N:
                if x==y and y==z:
                    anslist[n]+=1
                elif x==y or y==z or z==x:
                    anslist[n]+=3
                else:
                    anslist[n]+=6

            
for i in range(1,N+1):
    print(anslist[i])

Buggy submission (verdict: Runtime Error):
import math




N=int(input())

anslist=[0]*(N+1)
ma=int(math.sqrt(N/2))+1
for x in range(1,ma):
    for y in range(x,ma):
        for z in range(y,ma):
            n=x**2+y**2+z**2+x*y+y*z+z*x
            if n <=N:
                if x==y and y==z:
                    anslist[n+1]+=1
                elif x==y or y==z or z==x:
                    anslist[n+1]+=3
                else:
                    anslist[n+1]+=6

            

for i in range(1,N+1):
    print(anslist[i])

Buggy submission (verdict: Runtime Error):
import math




N=int(input())

anslist=[0]*(N+1)
ma=int(math.sqrt(N/2))+1
for x in range(1,ma):
    for y in range(x,ma):
        for z in range(y,ma):
            n=x**2+y**2+z**2+x*y+y*z+z*x
            if x==y and y==z:
                anslist[n+1]+=1
            elif x==y or y==z or z==x:
                anslist[n+1]+=3
            else:
                anslist[n+1]+=6

            

for i in range(1,N+1):
    print(anslist[i])
Problem p02618 (python)

Fixed submission:

D=int(input())
C=list(map(int,input().split()))
S=[]
S_max=[]
for i in range(D):
    s=list(map(int,input().split()))
    S_max.append(max(s))
    S.append(s)

minus=365*sum(C)

for i in range(D):
    A=S[i]
    ma=S_max[i]
    print(A.index(ma)+1)

Buggy submission (verdict: Runtime Error):

import numpy as np

D=int(input())
C=np.array(list(map(int,input().split())))
minus_list=C.copy()
S=[]
S_sa=[]
sa=[]
for i in range(D):
    minlis=minus_list.tolist()
    print(minlis.index(max(minlis)+1))
    minus_list[minlis.index(max(minlis))]=0
    minus_list+=C
Problem p02630 (python)

Fixed submission:

import numpy as np

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

npdata = np.arange(10**5+1)

kosuu=np.zeros(10**5+1)
kosuumoto=kosuu
for i in range(N):
    a=A[i]
    kosuu[a]+=1
SUM=sum(A)

BC_list=[]

for i in range (Q):
    bc=list(map(int,input().split()))
    BC_list.append(bc)
S=SUM
for i in range(Q):
    b=BC_list[i][0]
    c=BC_list[i][1]
    minus=b*kosuu[b]
    plus=c*kosuu[b]
    kosuu[c]=kosuu[c]+kosuu[b]
    kosuu[b]=0
    S=S-minus+plus
    print(int(S))

Buggy submission (verdict: Runtime Error):

import numpy as np

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

npdata = np.arange(10**5+1)

kosuu=np.zeros(10)
kosuumoto=kosuu
for i in range(N):
    a=A[i]
    kosuu[a]+=1
SUM=sum(A)

BC_list=[]

for i in range (Q):
    bc=list(map(int,input().split()))
    BC_list.append(bc)
S=SUM

for i in range(Q):
    b=BC_list[i][0]
    c=BC_list[i][1]
    minus=b*kosuu[b]
    kosuu[c]=kosuu[c]+kosuu[b]
    plus=c*kosuu[c]
    kosuu[b]=0
    S=S-minus+plus

    print(int(S))

Buggy submission (verdict: Runtime Error):
port numpy as np

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

npdata = np.arange(10**5+1)

kosuu=np.zeros(10**5+1)
kosuumoto=kosuu
for i in range(N):
    a=A[i]
    kosuu[a]+=1

BC_list=[]

for i in range (Q):
    bc=list(map(int,input().split()))
    BC_list.append(bc)
S=0
for i in range(Q):
    b=BC_list[i][0]
    c=BC_list[i][1]
    kosuu[c]=kosuu[c]+kosuu[b]
    kosuu[b]=0
    S=sum(np.multiply(npdata,kosuu))
    print(int(S))
Problem p02683 (python)

Fixed submission:

import sys
from itertools import combinations

N,M,X = map(int,input().split())
CA = [list(map(int,input().split())) for _ in range(N)]
A=[0]*(M+1)

ans=0

for i in range(N):
    ans+=CA[i][0]
    for j in range(1,M+1):
        A[j]+=CA[i][j]


for i in range(1,M+1):
    if A[i] <X:
        print(-1)
        sys.exit()


for i in range(1,N+1):
    for e in combinations(range(N),i):
        c = 0
        A = [0]*M
        for f in e:
            c += CA[f][0]
            for j in range(M):
                A[j] += CA[f][j+1]
        if min(A) >= X:
            ans = min(ans,c)
        
else:
    print(ans)

Buggy submission (verdict: Runtime Error):

import sys
from itertools import combinations

N,M,X = map(int,input().split())
CA = [list(map(int,input().split())) for _ in range(N)]
A=[0]*(M+1)

for i in range(N):
    for j in range(1,M+1):
        A[j]+=CA[i][j]

for i in range(1,M+1):
    if A[i] <X:
        print(-1)
        sys.exit()

ans=sum(A)

for i in range(1,N+1):
    for e in combinations(range(N),i):
        c = 0
        A = [0]*(M+1)
        for f in e:
            c += CA[f][0]
            for j in range(M):
                A[i] += CA[f][j+1]
        if min(A) >= X:
            ans = min(ans,c)
else:
    print(ans)
Problem p02696 (python)

Fixed submission:
import math

def floor(A,B,t):
    return(math.floor(A*t/B)-A*math.floor(t/B))

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


ans=floor(A,B,min(B-1,N))

print(ans)

Buggy submission (verdict: Runtime Error):
import math

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

a=N//B

if a==0:
    x=N
    

elif N%B==0:
    x=a*B-1
else:
    x=B*a-1

while math.floor(A*x/B)==math.floor(A*(x-1)/B):
    x=x-1
    if x==1:
        break
ans=math.floor(A*x/B)-A*math.floor(x/B)
ans=max(ans)

print(ans)
Problem p02702 (python)

Fixed submission:
S=str(input())
l=len(S)
ans=0
dig=1
mod=[0]*2019
mod[0]=1
t=0
for i in range(l):
    t=(t+int(S[-i-1])*dig)%2019
    mod[t]+=1
    dig=(dig*10)%2019
    
for j in mod:
    ans=ans+(j*(j-1))//2
print(ans)

Buggy submission (verdict: Runtime Error):

S=str(input())
l=len(S)
ans=0

mod=[0]*2019
mod[0]+=1
t=0
for i in range(l):
    t=int(S[l-i:-1:-1])*pow(10,i,2019)
    mod[t%2019]+=1
    
for j in range(len(mod)):
    m=mod[j]
    ans=ans+m*(m-1)//2
print(ans)
Problem p02717 (python)

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

print(Z,X,Y)

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

print(Z,X,Y)X,Y,Z=map(int,input().split())

print(Z,X,Y)
Problem p02730 (python)

Fixed submission:
import sys

S=list(str(input()))
N=len(S)

N1=int((N-1)/2)
N2=int((N+3)/2-1)

S1=list(S[:N1])
S2=list(S[N2:])


S3=list(reversed(S1))
S4=list(reversed(S2))
Sr=list(reversed(S))

if S==Sr:
    if S1==S3:
        if S2==S4:
            print("Yes")
            sys.exit()
print("No")

Buggy submission (verdict: Runtime Error):
S=list(str(input()))
N=len(S)

N1=int((N-1)/2)
N2=int((N+3)/2-1)

S1=list(S[:N1])
S2=list(S[N2:])


S3=list(reversed(S1))
S4=list(reversed(S2))
Sr=list(reversed(S))

if S==Sr:
    if S1==S3:
        if S2==S4:
            print("Yes")
            sys.exit()
print("No")
Problem p02756 (python)

Fixed submission:
S=str(input())
S_list=list(S)

Q=int(input())

q=[]
right=[]
left=[]

rev=1

for i in range(Q):
    q.append(input().split())
    if q[i][0]=="1":
        rev=rev*(-1)
    elif q[i][0]=="2":
        if q[i][1]=="1":
            if rev==1:
                right.append(q[i][2])
            else:
                left.append(q[i][2])
        elif q[i][1]=="2":
            if rev==1:
                left.append(q[i][2])
            else:
                right.append(q[i][2])
right.reverse()
if rev==1:
    S_list=right+S_list+left
else:
    S_list=right+S_list+left
    S_list.reverse()

S=''.join(S_list)
print(S)

Buggy submission (verdict: Runtime Error):
S=str(input())
S_list=list(S)

Q=int(input())

q=[]
right=[]
left=[]

rev=1

for i in range(Q):
    q.append(input().split())
    if q[i][0]=="1":
        rev=rev*(-1)
    elif q[i][0]=="2":
        if q[i][1]=="1":
            if rev==1:
                right.insert(0,q[i][2])
            else:
                left.append(q[i][2])
        elif q[i][1]=="2":
            if rev==1:
                left.append(q[i][2])
            else:
                right.insert(0,q[i][2])
if rev==1:
    S_list.append(left)
    S_list.insert(0,right)
else:
    S_list.reverse()
    S_list.append(left)
    S_list.insert(0,right)
    
S=''.join(S_list)
print(S)
Problem p02780 (python)

Fixed submission:
M=[]
for i in range(1001):
   m=(i+1)/2
   M.append(m) 

N,K=map(int,input().split())
P=list(map(int,input().split()))
S=[]
s=0
for i in range(N):
    a=P[i]
    s=s+M[a]
    S.append(s)
Q=[]
Q.append(S[K-1])
q=0
for i in range(N-K):
    q=S[i+K]-S[i] 
    Q.append(q)
    q=0
print(max(Q))

Buggy submission (verdict: Runtime Error):
M=[]
for i in range(1001):
   m=(i+1)/2
   M.append(m) 

N,K=map(int,input().split())
P=list(map(int,input().split()))
S=[]
s=0
for i in range(N):
    a=P[i]
    s=s+M[a]
    S.append(s)
Q=[]
q=0
for i in range(N-K+1):
    if i ==0:
        q=S[K-1]
    else:
        q=S[i+K]-S[i] 
    Q.append(q)
    q=0
print(max(Q))

Buggy submission (verdict: Runtime Error):
import math

M=[]
for i in range(1001):
   m=(i+1)/2
   M.append(m) 

N,K=map(int,input().split())
P=list(map(int,input().split()))
S=[]
s=0
for i in range(N):
    a=P[i]
    s=s+M[a]
    S.append(s)
Q=[]
q=0
for i in range(N-K):
    if i ==0:
        q=S[K]
    else:
        q=S[i+K]-S[i] 
    Q.append(q)
    q=0
print(max(Q))
Problem p02789 (python)

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

if N==M:
  print("Yes")
else:
  print("No")

Buggy submission (verdict: Runtime Error):
N,M=int(input().split())

if N==M:
  print("Yes")
else:
  print("No")
Problem p02802 (python)

Fixed submission:
N,M=map(int,input().split())
AC=[0]*N
WA=[0]*N

for i in range(M):
    p,s=input().split()
    p=int(p)-1
    if AC[p]==0:
        if s=='AC':
            AC[p]+=1
        else:
            WA[p]+=1

for i in range(N):
    if AC[i]==0:
        WA[i]=0
    
print(sum(AC),sum(WA))

Buggy submission (verdict: Runtime Error):
N,M=map(int,input().split())
AC=[0]*N
WA=[0]*M

for i in range(M):
    s,p=input().split()
    s=int(s)-1
    if AC[s]==0:
        if p=='AC':
            AC[s]+=1
        else:
            WA[s]+=1
        
    
    
print(sum(AC),sum(WA))
Problem p03060 (python)

Fixed submission:
# -*- coding: utf-8 -*-
"""
Created on Thu May 30 18:10:37 2019

@author: またの
"""

N = int(input())
V = list(map(int,input().split()))
C = list(map(int,input().split()))
ans = 0

for i in range(N):
    if V[i]-C[i]>0:
        ans += V[i]-C[i]
print(ans)

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

C = int((T + 1/2)//A)
ans = B*C

print(ans)
Problem p03086 (python)

Fixed submission:
s = input()
t = ''
for i in range(len(s)):
    if s[i] in ('A', 'C', 'G', 'T'):
        t += '1'
    else:
        t += '0'
"""
print(t)
print(t.split('0'))
"""

print(max(map(len, t.split('0'))))

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

l=len(S)

ans=0
ans_list=()

for i in range(l):
    if S[i] in ("A","G","C","T"):
        ans+=1
    else:
        ans_list.append(ans)
        ans=0
ans_list.append(ans)
print(ans)
Problem p03087 (python)

Fixed submission:
from bisect import bisect_left, bisect_right

N,Q = map(int,input().split())
S = input()
A = []
L = []

for i  in range(N-1):
    if S[i]=='A' and S[i+1]=='C':
        A.append(i)
        
for i in range(Q):
    L=list(map(int,input().split()))
    minA=bisect_left(A,L[0]-1)
    maxA=bisect_left(A,L[1]-1)
    print(maxA-minA)

Buggy submission (verdict: Runtime Error):
N,Q = map(int,input().split())
S = input()
A = []
L = []

for i  in range(N-1):
    if S[i]=='A' and S[i+1]=='C':
        A.append(i+2)
for i in range(Q):
    L=list(map(int,input().split()))
    minA=bisect_left(A,L[0])
    maxA=bisect_left(A,L[1])
    print(maxA-minA)
Problem p03220 (python)

Fixed submission:
N = int(input())
T,A = map(int,input().split())
H = list(map(int,input().split()))
B = abs(A-(T-0.006*H[0]))
for i in range(N):
    C = abs(A-(T-0.006*H[i]))
    if B>=C:
        B = C
        ans = i+1
print(ans)

Buggy submission (verdict: Runtime Error):
N = int(input())
T,A = map(int,input().split())
H = list(map(int,input().split()))
B = abs(A-(T-0.006*H[0]))
for i in range(N):
    C = abs(A-(T-0.006*H[i]))
    if B>C:
        B = C
        ans = i+1
print(ans)
Problem p03238 (python)

Fixed submission:
N = int(input())


if N ==1:
    print("Hello World")
else:
    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")
else:
    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 p03281 (python)

Fixed submission:
def yakusu(x):
    A=[]
    for i in range(1,x+1):
        if x%i==0:
            A.append(i)
    return(len(A))
    
n=int(input())
ans=0

for j in range(1,n+1,2):
    if yakusu(j)==8:
        ans+=1
print(ans)

Buggy submission (verdict: Runtime Error):

def yakusu(x):
    A=[]
    for i in range(1,x+1):
        if x%i==0:
            A.append()
    return(len(A))
    
n=int(input())

print(yakusu(n))
Problem p02612 (python)

Fixed submission:
n = int(input()) % 1000
if n == 0:
    print(0)
else:
    print(1000-n)

Buggy submission (verdict: Runtime Error):
print(int(input()%1000)
Problem p02748 (python)

Fixed submission:
A,B,M = map(int, input().split())
a = list(map(int, input().split()))
b = list(map(int, input().split()))
cheapest = min(a) + min(b)
for i in range(M):
    l,m,n = map(int, input().split())
    x = a[l-1] + b[m-1]- n
    if x < cheapest:
        cheapest = x
print(cheapest)

Buggy submission (verdict: Runtime Error):
A,B,M = map(int, input().split())
a = list(map(int, input().split()))
b = list(map(int, input().split()))
x = list()
y = list()
z = list()
cheapest = min(a) + min(b)
for i in range(M):
    l,m,n = map(int, input().split())
    x = a[l-1] + a[m-1]- n
    if x < cheapest:
        cheapest = x
print(cheapest)
Problem p02802 (python)

Fixed submission:
n,m = map(int, input().split())
ac = [False for i in range(n)]
pen = [0 for i in range(n)]
s = list()
p = list()
for i in range(m):
    a,b = input().split()
    a = int(a)
    s.append(a)
    p.append(b)
for i in range(m):
    if ac[s[i]-1] == True:
        pass
    else:
        if p[i] == "AC":
            ac[s[i]-1] = True
        else:
            pen[s[i]-1] += 1
wa = 0
for i in range(n):
    if ac[i] == True:
        wa += pen[i]
print(sum(ac), wa)

Buggy submission (verdict: Runtime Error):
n, m = map(int, input().split())
p = list()
s = list()
for i in range(m):
    a,b = input().split()
    p.append(int(a))
    s.append(b)
toi = set(p)
x = -1
ac = 0
pen = 0
check = False
for i in toi:
    for j in range(p.count(i)):
        x += 12
        if s[x] == "AC":
            if not check:
                check = True
                ac += 1
        else:
            if not check:
                pen += 1
    check = False
print(ac,pen)
Problem p02953 (python)

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

x = -999
h.reverse()
for i in range(n):
    if i == 0:
        continue
    if h[i] > h[i-1]:
        if h[i]-h[i-1] == 1:
            h[i] -= 1
        else:
            print("No")
            quit()
print("Yes")

Buggy submission (verdict: Runtime Error):
n = int(input())
h = list(map(int, input().split()))
for i in range(n-1):
    if h[i] > h[i+1]:
        if i == 0:
            h[i] -= 1
            if h[i] > h[i+1]:
                print("No")
                quit()
        else:
            if h[i-1] >= h[i]:
                print("No")
                quit()
            else:
                h[i] -= 1
                if h[i] > h[i+1]:
                    print(No)
                    quit()

print("Yes")

Buggy submission (verdict: Runtime Error):
n = int(input())
h = list(map(int, input().split()))
if n == 1:
    print("Yes")
    quit()
for i in range(n-1):
    if h[i] > h[i+1]:
        if i == 0:
            h[i] -= 1
            if h[i] > h[i+1]:
                print("No")
                quit()
        else:
            if h[i-1] >= h[i]:
                print("No")
                quit()
            else:
                h[i] -= 1
                if h[i] > h[i+1]:
                    print(No)
                    quit()

print("Yes")
Problem p03030 (python)

Fixed submission:
n = int(input())
s = list()
for i in range(n):
    a,b = input().split()
    b = int(b) * -1
    s.append([a,b])
h = sorted(s)
for i in range(n):
    print(s.index(h[i])+1)

Buggy submission (verdict: Runtime Error):
n = int(input())
w = list(map(int, input().split()))
s = float("inf")
for i in range(1,n):
    x = abs(sum(w[0:i])-sum(w[i:n]))
    if x < s:
        s = x
print(s)
Problem p03161 (python)

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

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

Fixed submission:
a, b = map(int, input().split())
if a%b == 0:
    print(0)
else:
    print(1)

Buggy submission (verdict: Runtime Error):
import math
n = int(input())
for i in range(n):
    for j in range(n):
        if i*4+j*7 == n:
            print("Yes")
            quit()
        if i*4+j*7 >= n:
            break
print("No")
Problem p03289 (python)

Fixed submission:
s = list(input())
if (s[0] == "A") and (s[2:-1].count("C")==1):
    s[0] = "a"
    s[s[2:-1].index("C")+2] = "c"
    l = list()
    for i in range(len(s)):
        l.append(s[i].lower())
    #(s,l)
    if s == l:
        print("AC")
        exit()
print("WA")

Buggy submission (verdict: Runtime Error):
s = list(input())
if (s[0] == "A") and (s[2:-1].count("C")==1):
    s[0] = "a"
    s[s[2:-2].index("C")+2] = "c"
    l = list()
    for i in range(len(s)):
        l.append(s[i].lower())
    #(s,l)
    if s == l:
        print("AC")
        exit()
print("WA")

Buggy submission (verdict: Runtime Error):
s = list(input())
if len(s)
if (s[0] == "A") and (s[2:-2].count("C")==1):
    print("aa")
    s[0] = "a"
    s[s[2:-2].index("C")+2] = "c"
    l = list()
    for i in range(len(s)):
        l.append(s[i].lower())
    #(s,l)
    if s == l:
        print("AC")
        exit()
print("WA")

Buggy submission (verdict: Runtime Error):
s = list(input())
if (s[0] == "A") and (s[2:-1].count("C")):
    print("aa")
    s[0] = "a"
    s[s[2:-2].index("C")+2] = "c"
    l = list()
    for i in range(len(s)):
        l.append(s[i].lower())
    #(s,l)
    if s == l:
        print("AC")
        exit()
print("WA")
Problem p03493 (python)

Fixed submission:
s = input()
print(s.count("1"))

Buggy submission (verdict: Runtime Error):
s = input()
print(s.coumt("1"))
Problem p04012 (python)

Fixed submission:
l = list(input())
s = set(l)
for i in s:
    if l.count(i)%2 != 0:
        print("No")
        exit()
print("Yes")

Buggy submission (verdict: Runtime Error):
l = list(input)
s = set(l)
for i in s:
    if l.count(i)%2 != 0:
        print("No")
        exit()
print("Yes")
Problem p02675 (python)

Fixed submission:
def sol():
  last=int(input()[-1])
  if last in [2,4,5,7,9]:
    return 'hon'
  if last in [0,1,6,8]:
    return 'pon'
  return 'bon'

print(sol())

Buggy submission (verdict: Runtime Error):
def sol()
  last=int(input()[-1])
  if last in [2,4,5,7,9]:
    return 'hon'
  if last in [0,1,6,8]:
    return 'pon'
  return 'bon'

sol()
Problem p02801 (python)

Fixed submission:
import string
chrs=string.ascii_lowercase
nx={c:d for c,d in zip(chrs,chrs[1:])}
print(nx[input()])

Buggy submission (verdict: Runtime Error):
chrs=string.ascii_lowercase
nx={c:d for c,d in zip(chrs,chrs[1:])}
print(nx(input())