qyliang/CodeNanoFix huggingface dataset:
Buggy code:
N, K = map(int, input().split())
S = list(input())

ans = 0
c = 0

pre = ''
for s in S:
    if s == 'L':
        if pre == 'L':
            ans += 1
        else:
            pre = s
            c += 1
    else:
        if pre == 'R':
            ans += 1
        else:
            pre = s

cc = 0
if S[0] == 'L':
    cc += 1
if S[-1] == 'R':
    cc += 1

if c <= K:
    ans += 2 * c
    K - c
else:
    ans += 2 * K
    K = 0
if cc <= K:
    ans += cc
else:
    ans += K

print(ans)



Fixed code:
N, K = map(int, input().split())
S = list(input())

ans = 0
c = 0

pre = ''
for s in S:
    if s == 'L':
        if pre == 'L':
            ans += 1
        else:
            pre = s
            c += 1
    else:
        if pre == 'R':
            ans += 1
        else:
            pre = s

cc = 0
if S[0] == 'L':
    cc += 1
if S[-1] == 'R':
    cc += 1

if c <= K:
    ans += 2 * c
    K -= c
    c = 0
else:
    ans += 2 * K
    c -= K
    K = 0

print(min(ans, N - 1))
Buggy code:
n,k = map(int,input().split())
s = list(input())

ans  = 0
tran = 0

for i in range(n):
    chk = s[i] + s[i+1]

    if chk == 'LR' or chk == 'RL':
        tran += 1
    else:
        ans += 1

if k*2 >= tran:
    print(n-1)
else:
    print(tran+(k*2))

Fixed code:
n,k = map(int,input().split())
s = list(input())

ans  = 0
tran = 0

for i in range(n-1):
    chk = s[i] + s[i+1]

    if chk == 'LR' or chk == 'RL':
        tran += 1
    else:
        ans += 1

if k*2 >= tran:
    print(n-1)
else:
    print(ans+(k*2))
Buggy code:
n,k = map(int,input().split())
s = input()
lr_cnt = 0
rl_cnt = 0
mnt = 0
for i in range(len(s)-1):
    if s[i] == 'L' and s[i+1] == 'R':
        lr_cnt += 1
        
    if s[i] == 'R' and s[i+1] == 'L':
        rl_cnt += 1
mnt  = rl_cnt + lr_cnt+1
mnt = np.max([1,mnt-2*k])
if mnt == 1:
    print(n-1)
else:
    print(n-rl_cnt-lr_cnt+2*k-1)

Fixed code:
import numpy as np
n,k = map(int,input().split())
s = input()
lr_cnt = 0
rl_cnt = 0
mnt = 0
for i in range(len(s)-1):
    if s[i] == 'L' and s[i+1] == 'R':
        lr_cnt += 1
        
    if s[i] == 'R' and s[i+1] == 'L':
        rl_cnt += 1
mnt  = rl_cnt + lr_cnt+1
mnt = np.max([1,mnt-2*k])
if mnt == 1:
    print(n-1)
else:
    print(n-rl_cnt-lr_cnt+2*k-1)
Buggy code:
N, K = map(int, input().split())
S = input()
cnt =0
for i in range(N-1):
    p = S[i]+S[i+1] 
    if p =='RL':
        cnt += 1
cnt2 = 0
if S[0] == 'L':
    cnt2 += 1
if S[-1] == 'R':
    cnt2 += 1
N -= cnt *2+cnt2
if cnt - 1 >= K:
    print(N+2*K)
else:
    print(N-1)

Fixed code:
N, K = map(int, input().split())
S = input()
cnt =0
for i in range(N-1):
    p = S[i]+S[i+1] 
    if p =='RL':
        cnt += 1
cnt2 = 0
if S[0] == 'L':
    cnt2 += 1
if S[-1] == 'R':
    cnt2 += 1
n =N- cnt *2-cnt2
if cnt - 1 >= K:
    print(n+2*K)
elif cnt + cnt2 - 2 >= K:
    print(N-2)
else:
    print(N-1)
Buggy code:
N,K=list(map(int,input().split()))
S=list(input())
sum=0
for i in range(N-1):
    if S[i]==S[i+1]:
        sum+=1
sum+=2*K
print(sum)

Fixed code:
N,K=list(map(int,input().split()))
S=list(input())
sum=0
for i in range(N-1):
    if S[i]==S[i+1]:
        sum+=1
sum+=2*K
if sum>=N:
    sum=N-1
print(sum)
Buggy code:
N, K = map(int, input().split())
S = str(input())
cnt = 0
l = 0
r = 0

for i in range(N-1):
    if i == 0 and S[i] == "L":
        l += 1
    if S[i] == "R" and S[i+1] == "L":
        cnt += 1
if S[N-1] == "R":
    r += 1
if cnt + l + r <= K:
    print(N-1)
elif cnt <= K:
    print(N+(K-cnt)-2)
else:
    print(N-2*(cnt-K)-1)



Fixed code:
N, K = map(int, input().split())
S = str(input())
cnt = 0
l = 0
r = 0

for i in range(N-1):
    if S[i] == "R" and S[i+1] == "L":
        cnt += 1
if S[0] == "L":
    l += 1
if S[N-1] == "R":
    r += 1
    
unhappy = 0
if cnt + max(l,r) <= K:
    unhappy = 1
else:
    unhappy = 2 * (cnt - K) + l + r
print(N - unhappy)
Buggy code:
N, K = map(int, input().split())
S = input()
X = S.count("RL")
Y = 0
if S[0] == "L":
    Y += 1
if S[-1] == "R":
    Y += 1

ans = 0
for a, b in zip(S, S[1:]):
    if a == b:
        ans += 1
ans += 2*max(K, X)
if K > X:
    ans += max(Y, K-X)
print(ans)


Fixed code:
N, K = map(int, input().split())
S = input()
X = S.count("RL")
Y = 0
if S[0] == "L":
    Y += 1
if S[-1] == "R":
    Y += 1

ans = 0
for a, b in zip(S, S[1:]):
    if a == b:
        ans += 1
ans += 2*min(K, X)
if K > X:
    ans += min(Y, K-X)
print(min(N-1, ans))
Buggy code:
S = input()
T = input()
x = 0

for i in range(3):
  if S[i] == T[i]
  	x = x +1
  else:
  	x = x

print(x)



Fixed code:
S = input()
T = input()
x = 0
 
for i in range(3):
  if S[i] == T[i]:
  	x = x + 1
  else:
  	x = x
print(x)
Buggy code:
S = input()
T = input()
count = 0
for i in range(len(3)):
  if S[i] == T[i]:
    count += 1
print(count)

Fixed code:
S = input()
T = input()
count = 0
for i in range(3):
  if S[i] == T[i]:
    count += 1
print(count)
Buggy code:
e=input(S)
r=input(T)
x=0
for i in range(3):
    if e[i]==r[i]:
        x+=1
print(x)

Fixed code:
S=input()
T=input()
x=0
for i in range(3):
    if S[i]==T[i]:
        x += 1
print(x)
Buggy code:
import numpy as np


def main():
	#N, D = [int(x) for x in input().split()]
	S = input()
	T = input()

	print(S, T)
	count = 0
	for s, t in zip(S, T):
		if s == t:
			count += 1
	print(count)
	
if __name__ == "__main__":
	main()


Fixed code:
import numpy as np


def main():
	#N, D = [int(x) for x in input().split()]
	S = input()
	T = input()

	count = 0
	for s, t in zip(S, T):
		if s == t:
			count += 1
	print(count)
	
if __name__ == "__main__":
	main()
Buggy code:
s = input(); a = input(); c = 0
for i in range(4):
  if s[i] == a[i]: c += 1
print(c)	

Fixed code:
s = input(); a = input(); c = 0
for i in range(3):
  if s[i] == a[i]: c += 1
print(c)
Buggy code:
S, T = input().split()

ans = 0
for i in range(3):
    if S[i]==T[i]:
        ans += 1
    else:
        pass
print(ans)

Fixed code:
S, T = input(), input()
ans = 0
for i in range(3):
    if S[i]==T[i]:
        ans += 1
    else:
        pass
print(ans)
Buggy code:
S = input()
T = input()
count = 0
for n in range(3):
  if S[n] = T[n]:
    count += 1
print(count)


Fixed code:
S = input()
T = input()
count = 0
for n in range(3):
  if S[n] == T[n]:
    count += 1
print(count)
Buggy code:
s=input()
t=input()
cnt=0
for i in rage(len(s)):
  if s[i]==t[i]:
    cnt+=1

print(cnt)

Fixed code:
s=input()
t=input()
cnt=0
for i in range(len(s)):
  if s[i]==t[i]:
    cnt+=1
 
print(cnt)
Buggy code:
import sys

S = [x for x in sys.stdin.readline()]
T = [x for x in sys.stdin.readline()]

result = 0
for (s, t) in zip(S, T):
    if s == t:
        result += 1

print(result)


Fixed code:
import sys

S = [x for x in sys.stdin.readline().strip()]
T = [x for x in sys.stdin.readline().strip()]

result = 0
for (s, t) in zip(S, T):
    if s == t:
        result = result + 1

print(result)
Buggy code:
S=input()
T=input()

ans=0

for in in range(3):
    if S[i]==T[i]:
        ans+=1

print(ans)

Fixed code:
S = input()
T = input()
hit = 0

for i in range(3):
  if S[i] == T[i]:
    hit += 1
    
print(hit)
Buggy code:
s = input()
t = input()


for i in range 3:
  if s[i] == t[i]:
    count += 1
    print(count)

Fixed code:
s = input()
t = input()
count = 0

for i in range(3):
  if s[i] == t[i]:
    count += 1

print(count)
Buggy code:
S = input()
N = input()
A =int(0)
if S[0] == N[0]:
    A += 1
if S[1] == N[1]:
    A += 1
if S[2] == [2]:
    A += 1
print(A)

Fixed code:
S = input()
N = input()
A =int(0)
if S[0] == N[0]:
    A += 1
if S[1] == N[1]:
    A += 1
if S[2] == N[2]:
    A += 1
print(A)
Buggy code:
S = [i for i in input()]
t = [i for i in input()]

a = 0
for i,j in zip(s,t):
  if i == j:
    a += 1
    
print(a)

Fixed code:
s = [i for i in input()]
t = [i for i in input()]

a = 0
for i,j in zip(s,t):
  if i == j:
    a += 1
    
print(a)
Buggy code:
s=input()
t=input()

x=0
for i in renge(3):
  if s[i]==t[i]:
    x+=1
    
print(x)    


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

x=0

for i in range(3):
  if s[i]==t[i]:
    x+=1
    
print(x)
Buggy code:
S=input()
T=input()
c=0
for i in range(3):
    if s[i]==t[i]:
        c+=1

print(c)


Fixed code:
s = input()
t = input()
c = 0

for i in range(3):
    if(s[i] == t[i]):
        c += 1

print(c)
Buggy code:
S_list = list(input())
print(S_list)

T_list = list(input())
print(T_list)

l = 0
for i in range(2):
  if S_list[i] == T_list[i]:
    l = l + 1

print(l)

Fixed code:
S_list = list(input())

T_list = list(input())

l = 0
for i in range(3):
  if S_list[i] == T_list[i]:
    l = l + 1

print(l)
Buggy code:
def main(s, t):
    s = list(input())
    t = list(input())
    assert len(s) == len(t)
    res = 0
    for i, ss in enumerate(s):
        if ss == t[i]:
            res += 1
    return res


if __name__ == "__main__":
    main()


Fixed code:
def main():
    s = list(input())
    t = list(input())
    assert len(s) == len(t)
    res = 0
    for i, ss in enumerate(s):
        if ss == t[i]:
            res += 1
    print(res)


if __name__ == "__main__":
    main()
Buggy code:
s = list(input())
t = list(input())
ing_total = 0

for x in range(2):
    if s[x] == t[x]:
        ing_total+=1
    else:
        ing_total+=0
     print(ing_total)



Fixed code:
s = list(input())
t = list(input())
ing_total = 0

for x in range(3):
    if s[x] == t[x]:
        ing_total+=1
    else:
        ing_total+=0
print(ing_total)
Buggy code:
S = input()
T = input()

result = 0

for i in range(0,3):
    if S == T:
        result += 1

print (result)

Fixed code:
S = input()
T = input()

result = 0
for i in range(0,3):
    if S[i] == T[i]:
        result += 1

print (result)
Buggy code:
A=input()
B=input()
c=0

for i in range(0,2):
  if A[i]==B[i]:
    c+=1
    
print(c)
  

Fixed code:
A=input()
B=input()
c=0

for i in range(0,3):
  if A[i]==B[i]:
    c+=1
    
print(c)
Buggy code:
S = input()
T = input()

count = None

for i in range(3):
    if(S[i] == T[i]):
        count += 1
        
if(count == 0):
    print(0)
elif(count == 1):
    print(1)
elif(count == 2):
    print(2)
else:
    print(3)

Fixed code:
S = input()
T = input()

count = 0

for i in range(3):
    if(S[i] == T[i]):
        count += 1
        
if(count == 0):
    print(0)
elif(count == 1):
    print(1)
elif(count == 2):
    print(2)
else:
    print(3)
Buggy code:
s = int(input())
t = int(input())
a = 0
if s[0] == t[0]: a = a + 1
if s[1] == t[1]: a = a + 1
if s[2] == t[2]: a = a + 1
print(a)

Fixed code:
s = input()
t = input()
a = 0
if s[0] == t[0]: a = a + 1
if s[1] == t[1]: a = a + 1
if s[2] == t[2]: a = a + 1
print(a)
Buggy code:
S = input()
T = input()
counter = 0
for i in range(2):
    if S[i] == T[i]:
        counter += 1
        
print(counter)


Fixed code:
S = input()
T = input()
counter = 0
for i in range(3):
    if S[i] == T[i]:
        counter += 1
        
print(counter)
Buggy code:
s = str(input())
t = str(input())
p = 0
res = 0
for a in s:
  if a == s[p]:
    res = res + 1
  p = p + 1
print(res)
  

Fixed code:
s = str(input())
t = str(input())
p = 0
res = 0
for a in s:
  if a == t[p]:
    res = res + 1
  p = p + 1
print(res)
Buggy code:
s=input()
t=input()
print(s[0]==t[0]+s[2]==t[2]+s[1]==t[1])

Fixed code:
s=input()
t=input()
print(int(s[0]==t[0])+int(s[2]==t[2])+int(s[1]==t[1]))
Buggy code:
s = input()
t = input()
ans = 0
for i in range(len(s)):
    if s[i] == t[i]:
        ans += 1
print(ans/len(s))


Fixed code:
s = input()
t = input()
ans = 0

length = len(s)

for i in range(length):
    if s[i] == t[i]:
        ans = ans + 1

print(ans)
Buggy code:
s=input()
t=input()

count=0
for i in range(3):
  if t[i]!=s[i]:
    count+=1
    
print(count)

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

count=0

for i in range(3):
    if t[i]==s[i]:count+=1

print(count)
Buggy code:
S = input()
T = input()

ans = S[0] ==T[0] + S[1] ==T[1] +S[2] ==T[2]
print(ans)

Fixed code:
S = input()
T = input()

ans = (S[0] ==T[0])*1 + (S[1] ==T[1])*1 +(S[2] ==T[2])*1
print(ans)
Buggy code:
S=input()
T=input()
count=0

if S[0]==T[0]:
    count+=1

if S[1]==T[1]:
    count+=1

if S[1]==T[1]:
    count+=1

print(count)

Fixed code:
S=input()
T=input()
count=0

if S[0]==T[0]:
    count+=1

if S[1]==T[1]:
    count+=1

if S[2]==T[2]:
    count+=1

print(count)
Buggy code:
S=input
print(sum(u==v for u,v in zip(S(),T())))

Fixed code:
S=input
print(sum(u==v for u,v in zip(S(),S())))
Buggy code:
be=str(input())
af=str(input())
ans=0
for i in range 3:
  	if be[i]==af[i]:
    	ans+=1
print(ans)


Fixed code:
be=input()
af=input()
ans=0
for i in range (3):
    if be[i]==af[i]:
        ans+=1
print(ans)
Buggy code:
S=input()
T=input()
ans=0
for i in range(3):
  if(S[i]==T[i])ans+=1
print(ans)

Fixed code:
S = input()
T = input()
ans = 0
for i in range(3):
    if S[i] == T[i]:
       ans += 1
print(ans)
Buggy code:
s=input()
t=input()
sum=0;

for i in range(2):
	if s[i]==t[i]:
		sum+=1
print(sum) 

Fixed code:
s=input()
t=input()
sum=0;

for i in range(3):
	if s[i]==t[i]:
		sum+=1
print(sum)
Buggy code:
# -*- coding: utf-8 -*-
 
pred = list(input())
res = list(input())

count = 0
for i in range(2):
	if pred[i] == res[i]:
		count += 1

print(count)

Fixed code:
# -*- coding: utf-8 -*-
 
pred = list(input())
res = list(input())

count = 0
for i in range(3):
	if pred[i] == res[i]:
		count += 1

print(count)
Buggy code:
S = str(input())
T = str(input())

count = 0
for _, s, t in enumerate(zip(S,T)):
    if s == t:
        count += 1

print(count)

Fixed code:
S = str(input())
T = str(input())

count = 0
for _, (s, t) in enumerate(zip(S,T)):
    if s == t:
        count += 1

print(count)
Buggy code:
s = input().split()
t = input().split()

ans = 0
for i in range(3):
    if s[i] == t[i]:
        ans += 1

print(ans)


Fixed code:
s = input()
t = input()
ans = 0
for i in range(3):
    if s[i:i+1] == t[i:i+1]:
        ans += 1
print(ans)
Buggy code:
s = str(input())
t = str(input())

ans = 0

for in range(3):
  if s[i]==t[i]:
    ans += 1
print(ans)

Fixed code:
s = str(input())
t = str(input())
 
ans = 0
 
for i in range(3):
  if s[i]==t[i]:
    ans += 1
print(ans)
Buggy code:
S = input()
T = input()

cnt = 0

for i in range(3)

if S[i] == T[i]:
  cnt += 1
print(cnt)

Fixed code:
S = input()
T = input()

cnt = 0

for i in range(3):
  if S[i] == T[i]:
    cnt += 1
print(cnt)
Buggy code:
#copy

s = chr(input())
t = chr(input())

ans = 0

for i in range(3):
    if s[i] == t[i]:
        ans += 1
print(ans)

Fixed code:
#copy

s = input()
t = input()

ans = 0

for i in range(3):
    if s[i] == t[i]:
        ans += 1
print(ans)
Buggy code:
s = input()
t = input()
count = 0
for i in range(len(s) - 1):
  if s[i:i+1] == t[i:i+1]:
    count += 1
print(count)

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

count = 0

for i in range(len(s)):
  if s[i] == t[i]:
    count += 1
    
print(count)
Buggy code:
#ABC090
s = input()
t = input()
ans = 0
if s[0]=t[0]:
    ans+=1
if s[1]=t[1]:
    ans+=1
if s[2]=t[2]:
    ans+=1
print(ans)    

Fixed code:
#ABC090
s = input()
t = input()
ans = 0
if s[0]==t[0]:
    ans+=1
if s[1]==t[1]:
    ans+=1
if s[2]==t[2]:
    ans+=1
print(ans)
Buggy code:
s = list(input())
t = list(input())
p = []

for i in range(0,3):
    p.append(s[i] == t[1])
    
print(p.count(True))

Fixed code:
s = list(input())
t = list(input())
p = []

for i in range(0,3):
    p.append(s[i] == t[i])
    
print(p.count(True))
Buggy code:
S = list(map(input()))
T = list(map(input()))
ctr = 0
for i in range (3):
  if S[i] == T[i]:
    ctr += 1
print(ctr)

Fixed code:
S = list(input())
T = list(input())
ctr = 0
for i in range (3):
  if S[i] == T[i]:
    ctr += 1
print(ctr)
Buggy code:
S,T = input(),input()

print(sum(int(a==b) for a,b zip(S,T)))

Fixed code:
S,T = input(),input()

print(sum(int(a==b) for a,b in zip(S,T)))
Buggy code:
a = input()
b = input()
j = 0
for i in range(3):
  if a[i] = b[i]:
    j+=1
print(j)
    

Fixed code:
a = input()
b = input()

x =0

for i in range(3):
    if a[i] == b[i]:
        x += 1

print(x)
Buggy code:
# your code goes here
s,t = input(), input()

c = 1
for i in range(len(s)):
	if s[i] == t[i]:c+=1
	
print(c)

Fixed code:
# your code goes here
s,t = input(), input()

c = 0
for i in range(len(s)):
	if s[i] == t[i]:c+=1
	
print(c)
Buggy code:
X = input()
Y = input()

count = 0
for i in range(0,3):
    if X[i] == Y[i]:
        count += 1
        print(count)







Fixed code:
X = input()
Y = input()

count = 0
for i in range(0,3):
    if X[i] == Y[i]:
        count += 1

print(count)
Buggy code:
A = str(input())
B = str(input())
C = 0
for i in range(3):
  if A[i] == B[i]:
    C += 0
print(c)
    


Fixed code:
A = str(input())
B = str(input())
C = 0
for i in range(3):
  if A[i] == B[i]:
    C += 1
print(C)
Buggy code:
s = input()
t = input()

ans = 1
for i,j in zip(s,t):
    if i == j:
        ans += 1
        
print(ans)

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

ans = 0
for i,j in zip(s,t):
  if i == j:
    ans += 1
print(ans)
Buggy code:
s = input()
t = input()
cnt = 0
if s[0]==t[0]: cnt+=1
elif s[1]==t[1]: cnt+=1
elif s[2]==t[2]: cnt+=1
print(cnt)

Fixed code:
s = input()
t = input()
cnt = 0
if s[0]==t[0]: cnt+=1
if s[1]==t[1]: cnt+=1
if s[2]==t[2]: cnt+=1
print(cnt)
Buggy code:
S = input()
T = input()

count = 0
for i in range(1000):
    if S[i] == T[i]:
        count += 1
print(count)

Fixed code:
S = input()
T = input()

count = 0
for i in range(3):
    if S[i] == T[i]:
        count =count + 1
print(count)
Buggy code:
#Tenki

S = input()
T = input()
ctr = 0

for i in range(len(S)):
    if S[i] == T[i]:
        ctr = ctr+1

Fixed code:
#Tenki

S = input()
T = input()
ctr = 0

for i in range(len(S)):
    if S[i] == T[i]:
        ctr = ctr+1

print(ctr)
Buggy code:
a = str(input())
b = str(input())

count = 0

for i,j in zip(a,b):
  if a == b:
    count+=1
    
print(count)

Fixed code:
a = str(input())
b = str(input())

count = 0

for i,j in zip(a,b):
  if i==j:
    count+=1
    
print(count)
Buggy code:
import sys
inputs = sys.stdin.readlines()

S, T = inputs[0], inputs[1]
c = 0
for s, t in zip(S, T):
    if s == t:
        c += 1
print(c)

Fixed code:
import sys
inputs = sys.stdin.readlines()

S, T = inputs[0].strip(), inputs[1].strip()
c = 0
for s, t in zip(S, T):
    if s == t:
        c += 1
print(c)
Buggy code:
S = input()
T = input()
ans = 0
for i in range(3):
  is S[i] == T[i]:
    ans += 1
print(ans)

Fixed code:
S = input()
T = input()
ans = 0
for i in range(3):
  if S[i] == T[i]:
    ans += 1
print(ans)
Buggy code:
s1 = input()
s2 = input()
s1_list = list(s1)
s2_list = list(s2)
print(s1_list)
ans = 0
for i in range(3):
    if(s1_list[i] == s2_list[i]):
        ans += 1
print(ans)


Fixed code:
s1 = input()
s2 = input()
s1_list = list(s1)
s2_list = list(s2)
ans = 0
for i in range(3):
    if(s1_list[i] == s2_list[i]):
        ans += 1
print(ans)
Buggy code:
S, T = map(str, open(0).read().split())
count = 0
for i in range(3):
  if S[i] == T[i]:
    count += 1
  else:
    pass

Fixed code:
S, T = map(str, open(0).read().split())
count = 0
for i in range(3):
  if S[i] == T[i]:
    count += 1
  else:
    pass
print(count)
Buggy code:
s=input()
t=input()

ans=0
i=0
while i<len(s):

    if s[i]==t[i]:
        ans+=1

print(ans)

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

ans=0
i=0
while i<len(s):

    if s[i]==t[i]:
        ans+=1

    i+=1
    
print(ans)
Buggy code:
S = str(input())
T = str(input())
print(int(S[0]==T[0])+int(S[1]==T[1])+int(S[2]==S[2]))

Fixed code:
S = str(input())
T = str(input())
print(int(S[0]==T[0])+int(S[1]==T[1])+int(S[2]==T[2]))
Buggy code:
s=input()
t=input()
for i in range(3)
ans=0
if s[i]==t[i]:
  ans+=1
print(ans)

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

ans = 0
for i in range(3):
	if s[i] == t[i]:
		ans += 1
print(ans)
Buggy code:
s = input()
t = input()
cnt = 0
for i in range(3):
  if (s[i] == t[i]): cnt += 1
  print(cnt)

Fixed code:
s=input()
t=input()
count=0
for i in range(3):
  if s[i]==t[i]:
    count+=1
    
print(count)
Buggy code:
S = input()
T = input()
ans = 0
for i in range(2):
  if S[i] == T[i]: ans+=1
print(ans)

Fixed code:
S = input()
T = input()
ans = 0
for i in range(3):
  if S[i] == T[i]: ans+=1
print(ans)
Buggy code:
s = input()
t = input()
print(sum[s[i] == t[i] for i in range(3)])

Fixed code:
s = list(input())
t = list(input())
print(sum(s[i] == t[i] for i in range(3)))
Buggy code:
s = input()
t = input()
ans = 0
for i in range(3):
if s[i] == t[i]:
  ans += 1
print(ans)

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

a = 0
for i in range(3):
    if s[i] == t[i]:
        a += 1
print(a)
Buggy code:
s = input()
t = input()

ans = 0
for i in range(len(s)):
  if s[i] == t[i]:
    ans += 1
print ans


Fixed code:
s=input()
t=input()
ans=0

for i in range(3):
	if s[i]==t[i]:
		ans+=1
	
print(ans)
Buggy code:
a=input().split()
b=input().split()
count=0
for i in range(3):
  if a[i]==b[i]:
    count+=1
print(count)
  

Fixed code:
a=input()
b=input()
count=0
for i in range(3):
  if a[i]==b[i]:
    count+=1
print(count)
Buggy code:
S=list(str(input()))
T=list(str(input()))
ans=0
for i in range(3):
    if S[i+1:i+2]==T[i+1:i+2]:
        ans+=1
    else:
        pass
print(ans)

Fixed code:
S=list(str(input()))
T=list(str(input()))
ans=0
for i in range(3):
    if S[i:i+1]==T[i:i+1]:
        ans+=1
    else:
        pass
print(ans)
Buggy code:
S = input()
T = input()

print(sum([s == t for s, t in zip(S, T)])

Fixed code:
S = input()
T = input()

print(sum([s == t for s, t in zip(S, T)]))
Buggy code:
s=input()
t=input()
a=0
for i in range(3)
  if s[i]==t[i]:
    a+=1
print(a)

Fixed code:
s = input()
sum_ans= 0
t= input()
for i in range(3):
    if s[i] == t[i]:
        sum_ans += 1

print(sum_ans)
Buggy code:

a = input()
b = input()

for i in range(3):
  count = 0
  if a[i] == b[i]:
    count += 1
    
print(count) 

Fixed code:
a = input()
b = input()
count = 0
for i in range(3):
  if a[i] == b[i]:
    count += 1
    
print(count)
Buggy code:
S = input()
T = input()

c = 0
for i range(3):
  if S[i] == T[i]:
    c += 1
  else:
    next
    
print(c)

Fixed code:
S = input()
T = input()

c = 0
for i in range(3):
  if S[i] == T[i]:
    c += 1
  else:
    next
    
print(c)
Buggy code:
S = input('S:')
T = input('T:')

s = list(S)
t = list(T)

count = 0
for i, e in enumerate(s):
    if(e==t[i]):
        count += 1
        pass
    pass
print(count)

Fixed code:
S = input()
T = input()

s = list(S)
t = list(T)

count = 0
for i, e in enumerate(s):
    if(e==t[i]):
        count += 1
        pass
    pass
print(count)
Buggy code:
S=input()
T=input()
count=0
for i in range(0,2):
    if S[i]==T[i]:
        count+=1
print(count)

Fixed code:
S=input()
T=input()
count=0
for i in range(0,3):
    if S[i]==T[i]:
        count+=1
print(count)
Buggy code:
S = input()
T = input()
r = 0
for i in range(3):
	if S[i] == T[i]:
    	r += 1
print(r)

Fixed code:
S = input()
T = input()
r = 0
for i in range(3):
    if S[i] == T[i]:
        r += 1
print(r)
Buggy code:
# -*- coding: utf-8 -*-
S = input()
T = input()
c = 0
for i in range(3):
  if S[i] == T[i]:
    c +=1
print(c/3)


Fixed code:
# -*- coding: utf-8 -*-
S = input()
T = input()
c = 0
for i in range(3):
  if S[i] == T[i]:
    c +=1
print(c)
Buggy code:
s = str(input())
t = str(input())
cnt = 0
for i in range(0,2):
  if s[i] == t[i]:
    cnt += 1
print(int(cnt))

Fixed code:
s = str(input())
t = str(input())
cnt = 0
for i in range(0,3):
  if s[i] == t[i]:
    cnt += 1
print(int(cnt))
Buggy code:
s = input()
t = input()

ans = 0
for i in range(3):
    if s[i]==t[i]:
        ans+=1
    i+=
print(ans)

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

ans = 0
for i in range(3):
    if s[i]==t[i]:
        ans+=1
    i+=1
print(ans)
Buggy code:
a = list(input())
b = list(input())

count = 0
for i in range(3):
  if a[i] == b[i]:
    count += 1

ptint(count)

Fixed code:
a = list(input())
b = list(input())

count = 0
for i in range(3):
  if a[i] == b[i]:
    count +=1

print(count)
Buggy code:
a,b,c=input()
d,e,f=input()
list=[1 if a==d else 0,1 if a==d else 0,1 if a==d else 0]
print(list.count(1))

Fixed code:
a,b,c=input()
d,e,f=input()
list=[1 if a==d else 0,1 if b==e else 0,1 if c==f else 0]
print(list.count(1))
Buggy code:
s = input()
t = input()

s = [_ for _ in s]
t = [_ for _ in t]

count = 0
for i in 3:
  if s[i] == t[i]:
    count += 1
print(count)

Fixed code:
s = str(input())
t = str(input())

s = [_ for _ in s]
t = [_ for _ in t]

count = 0
for i in range(3):
  if s[i] == t[i]:
    count += 1
print(count)