Problem:


Score : 100 points

Problem Statement

You will be given a string S of length 3 representing the weather forecast for three days in the past.

The i-th character (1 \leq i \leq 3) of S represents the forecast for the i-th day. S, C, and R stand for sunny, cloudy, and rainy, respectively.

You will also be given a string T of length 3 representing the actual weather on those three days.

The i-th character (1 \leq i \leq 3) of S represents the actual weather on the i-th day. S, C, and R stand for sunny, cloudy, and rainy, respectively.

Print the number of days for which the forecast was correct.

Constraints

S and T are strings of length 3 each.

S and T consist of S, C, and R.

Input

Input is given from Standard Input in the following format:

S
T

Output

Print the number of days for which the forecast was correct.

Sample Input 1

CSS
CSR

Sample Output 1

2

For the first day, it was forecast to be cloudy, and it was indeed cloudy.

For the second day, it was forecast to be sunny, and it was indeed sunny.

For the third day, it was forecast to be sunny, but it was rainy.

Thus, the forecast was correct for two days in this case.

Sample Input 2

SSR
SSR

Sample Output 2

3

Sample Input 3

RRR
SSS

Sample Output 3

0



Sample input:
CSS
CSR


Sample output:
2

Submission status: Accepted

Solution code:
s = input()
t = input()
count = 0
if s[0] == t[0]:
    count = count + 1
if s[1] == t[1]:
    count = count +1
if s[2] == t[2]:
    count = count +1

print(count)

Submission status: Accepted

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

count = 0

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

Submission status: Accepted

Solution code:
def main():
    s = input()
    t = input()
    count = 0
    for i in range(3):
        if s[i] == t[i]:
            count += 1
    print(count)


if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
T = input()
S = input()
n=0
for i in range(len(T)):
    if T[i] == S[i]:
        n= n+1;
print(n)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
x = input()
y = input()

success=0
for cnt in range(3):
    if x[cnt]==y[cnt]:
        success+=1
    
print(success)

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
S = input()
T = input()
ret = 0
for x, y in zip(S, T):
    if x == y:
        ret += 1
print(ret)

Submission status: Accepted

Solution code:
S = list(input())
T = list(input())
count = 0

for item_S, item_T in zip(S,T):
  if item_S == item_T:
    count += 1


print(count)

Submission status: Accepted

Solution code:
yosou=input()
result=input()
cnt=0
for i in range(3):
  if yosou[i] == result[i]:
    cnt+=1
print(cnt)

Submission status: Accepted

Solution code:
S = input()
T = input()
ans = 0
for s,t in zip(S, T):
    if s==t:
        ans += 1
print(ans)

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
import sys


def solve(S: str, T: str):
    count = 0
    for i in range(len(S)):
        if S[i] == T[i]:
            count += 1
        else:
            pass
    print(count)

    return


def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word

    tokens = iterate_tokens()
    S = next(tokens)  # type: str
    T = next(tokens)  # type: str
    solve(S, T)


if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
prediction = list(input())
wheather = list(input())

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

Submission status: Accepted

Solution code:
S = input()
T = input()
cnt = 0

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

print(cnt)

Submission status: Accepted

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

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

print(cnt)

Submission status: Accepted

Solution code:
S = list(input())
T = list(input())
print(len([1 for i in range(3) if S[i] == T[i]]))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def input_lines(n):
    line=[]
    for i in range(n):
        s=input()
        line.append(s)
    return line

l=input_lines(2)
n=0

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

print(n)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
S = input()
T = input()
a = 0
if S[0] == T[0]:
  a +=1
if S[1] == T[1]:
  a +=1
if S[2] == T[2]:
  a +=1
print(a)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
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)

Submission status: Accepted

Solution code:
forecast =input()
real =input()
i = 0
atari =0
while  i < 3:
    if forecast[i] == real[i]:
        atari = atari+1
    i = i+1
    
print(atari)

Submission status: Accepted

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

s1 = s[0]
s2 = s[1]
s3 = s[2]

t1 = t[0]
t2 = t[1]
t3 = t[2]

count = 0
if s1 == t1:
    count = count + 1
if s2 == t2:
    count = count +1
if s3 == t3:
    count = count +1

print(count)

Submission status: Accepted

Solution code:
S = list(input())
T = list(input())
ans = 0
for i in range(3):
  if(S[i]==T[i]):ans += 1
print(ans)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
s=list(input())
t=list(input())
i=0
ans=0
while i!=3:
    if s[i]==t[i]:
        ans+=1
    i+=1
print(ans)

Submission status: Accepted

Solution code:
a = input()
b = input()
c = 0
for i in range(len(a)):
    if a[i] == b[i]:
        c += 1
print(c)

Submission status: Accepted

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

print(sum([S[i]==T[i] for i in range(3)]))

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
import sys
sys.setrecursionlimit(100000)

def ii(): return int(input())
def iil(): return list(map(int, input().split()))
def ins(): return input().split()
def lin(): return list(input())

a = lin()
b = lin()
t = map(lambda x,y:x==y,a,b)
print(sum(t))

Submission status: Accepted

Solution code:
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)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
S = list(input())
T = list(input())

c = 0
for s, t in zip(S, T):
  c += s == t

print(c)

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
# Sを入力する
S = list(input())
# Lを入力する
L = list(input())
 
# 3つの要素に定義しなおす
S1 = S[0]
S2 = S[1]
S3 = S[2]
L1 = L[0]
L2 = L[1]
L3 = L[2]
 
# 全部同じ
if S1 == L1 and S2 == L2 and S3 == L3:
  print(3)
# 全部違う
elif S1 != L1 and S2 != L2 and S3 != L3:
  print(0)
# 一つだけ
elif (S1 == L1 and S2 != L2 and S3 != L3) or (S1 != L1 and S2 == L2 and S3 != L3) or (S1 != L1 and S2 != L2 and S3 == L3):
  print(1)
# その他
else:
  print(2)

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

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

a=0
if s[0] == t[0]:
  a += 1
if s[1] == t[1]:
  a += 1
if s[2] == t[2]:
  a += 1

print(a)

Submission status: Accepted

Solution code:
s = list(input())
t = list(input())

count = 0

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
s, t = [input() for _ in range(2)]

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

print(count)

Submission status: Accepted

Solution 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)

Submission status: Accepted

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

point = 0

if a[0] == b[0] :
  point = point + 1
  
if a[1] == b[1] :
  point = point + 1
  
if a[2] == b[2] :
  point = point + 1

print(point)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
s1 = list(input())
s2 = list(input())

hit =0
for i in range(len(s1)):
    if s1[i]==s2[i]:
        hit+=1

print(hit)

Submission status: Accepted

Solution code:
x = 0
s = input()
n = input()
for i in range(3):
    if s[i] == n[i] :
        x+=1
print(x)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
S = list(input())
T = list(input())
count = 0

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

print(count)

Submission status: Accepted

Solution code:
s=input()
t=input()
cnt=0
for i in range(3):
  cnt += s[i]==t[i]
print(cnt)

Submission status: Accepted

Solution code:
S = input()
T = input()
cnt = 0
for i in range(0, 3):
    if S[i] == T[i]:
        cnt += 1
print(cnt)

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
forecast = input()
real = input()

a = 0

for i in range(0,3):
  if forecast[i] == real[i]:
    a += 1
    
print(a)

Submission status: Accepted

Solution code:
a = input()
b = input()
c = 0
for i,j in zip(list(a),list(b)):
  if i == j :
    c+=1
print(c)

Submission status: Accepted

Solution code:
s=list(input())
t=list(input())
g=0
for c in range(3):
    if s[c]==t[c]:
        g=g+1
print(g)

Submission status: Accepted

Solution code:
i=input()
j=input()
count_num=0
for k in range(3):
  if i[k]==j[k]:
    count_num+=1
print(count_num)

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
forecast = input()
real = input()

ans = 0
for i,f in enumerate(forecast):
  if(f == real[i]):
    ans +=1

print(ans)

Submission status: Accepted

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

ans =0

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

Submission status: Accepted

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

c=0

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

print(c)

Submission status: Accepted

Solution code:
S = list(input())
T = list(input())
print(sum([1 for i in range(3) if S[i] == T[i]]))

Submission status: Accepted

Solution code:
S = list(input())
T = list(input())
a = [1 for i in range(3) if S[i] == T[i]]
print(sum(a))

Submission status: Accepted

Solution code:
S = list(input())
T = list(input())
a = 0
for  i in range(3):
    if S[i] == T[i]:
        a += 1
print(a)

Submission status: Accepted

Solution code:
weather_report = input()
actual_weather = input()

res = 0

for i,j in enumerate(weather_report):
    if actual_weather[i] == j:
        res += 1

print(res)

Submission status: Accepted

Solution code:
S=input()
T=input()
counter=0
for i in range(0,3):
  if S[i]==T[i]:
    counter= counter+1
print(counter)

Submission status: Accepted

Solution code:
predict_weather = list(input())
actual_weather = list(input())
 
count = 0
for i in range(len(predict_weather)):
  if predict_weather[i] == actual_weather[i]:
    count += 1
 
print(count)

Submission status: Accepted

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

a=0
for i ,n in zip(S,T):
	if i==n:
		a+=1
print(a)

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
S=list(input())
T=list(input())

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

print(ans)

Submission status: Accepted

Solution code:
a,b,c = input()
d,e,f = input()
if a == d:
  x = int( 1 )
else:
  x = int( 0 )

if b == e:
  y = int( 1 )
else:
  y = int( 0 )
  
if c == f:
  z = int( 1 )
else:
  z = int( 0 )
  
print( x+y+z )

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
l1 = input()
l2 = input()
res = 0
for i in range(len(l1)):
    if l1[i] == l2[i]:
        res += 1
print(res)

Submission status: Accepted

Solution code:
s1=input()
s2=input()
print(sum(s1[i]==s2[i] for i in range(len(s1))))

Submission status: Accepted

Solution code:
S = input()
T = input()
c = 0
for i in range(len(S)):
    if S[i] == T[i]:
        c = c+1
    else:
        c = c
print(c)

Submission status: Accepted

Solution code:
pred = [item for item in input()]
act = [item for item in input()]

res = 0
for i, weather in enumerate(pred):
    if weather == act[i]:
       res += 1

print(res)

Submission status: Accepted

Solution code:
#abc139A
S = str(input())
T = str(input())

ans=0

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

print(ans)

Submission status: Accepted

Solution code:
a = input()
b = input()
print(len([i for i in range(3) if a[i] == b[i]]))

Submission status: Accepted

Solution code:
s = str(input())
t = str(input())
x = 0
for i in range(0,3):
  if s[i] == t[i]:
    x = x + 1
print(x)

Submission status: Accepted

Solution code:
s = input()
t = input()
total = 0

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

Submission status: Accepted

Solution code:
S = input()
T = input()
counter = 0
if S[0] == T[0]:
 counter = counter + 1

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

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

print(counter)

Submission status: Accepted

Solution code:
forecast = input()
actual = input()
count = 0
 
for i in range(len(forecast)):
  if forecast[i] == actual[i]:
    count += 1
print(count)

Submission status: Accepted

Solution code:
s = [si for si in input()]
t = [ti for ti in input()]


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

print(cnt)

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
S=input()
T=input()
count=0
for _ in range(3):
    if S[_]==T[_]:
        count+=1
print(count)

Submission status: Accepted

Solution code:
#n = input()
#a = list(map(int, input().split()))
#b = list(map(int, input().split()))
#c = list(map(int, input().split()))
a = input()
b = input()
r = 0
for i,j in zip(a, b):
    r += i == j
print(r)

Submission status: Accepted

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

s = list(s)
t = list(t)

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

print(count)

Submission status: Accepted

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

print(ans)

Submission status: Accepted

Solution code:
S = input()
T = input()
count = 0
for i in range(len(S)):
    if S[i] == T[i]:
        count += 1
        
print(count)

Submission status: Accepted

Solution code:
S = input()
T = input()
print(len([1 for _s, _t in zip(S, T) if _s == _t]))

Submission status: Accepted

Solution code:
S = input()
T = input()
res = 0
for c1,c2 in zip(S,T):
    if c1==c2:
        res +=1
print(res)

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

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

print(count)

Submission status: Accepted

Solution code:
a = input()
b = input()
print(sum(x == y for x,y in zip(a,b)))

Submission status: Accepted

Solution code:
t1 = input()
t2 = input()
r = 0
for i in range(len(t1)) :
  if t1[i] == t2[i] :
    r += 1
print(r)

Submission status: Accepted

Solution code:
F = input()
A = input()
cnt = 0
for i in range(len(F)):
  if F[i] == A[i] :
    cnt +=1 
print(cnt)

Submission status: Accepted

Solution code:
s1, s2, s3 = input()
t1, t2, t3 = input()
ans =0

if s1 == t1:
   ans +=1
if s2 == t2:
   ans +=1
if s3 == t3:
   ans +=1
print(ans)

Submission status: Accepted

Solution code:

S = input()
T = input()

count = 0

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

print(count)

Submission status: Accepted

Solution code:
S=input()
T=input()
S=[i for i in S]
T=[i for i in T]

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

print(count)

Submission status: Accepted

Solution code:
predict = input().strip()
actual = input().strip()

correct = sum([1 if x == y else 0 for x, y in zip(predict, actual)])

print(correct)

Submission status: Accepted

Solution code:
a=input()
b=input()
c=0
for i in range(len(a)):
  if a[i]==b[i]:
    c+=1
print (c)

Submission status: Accepted

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


ans = 0

if a[0] == b[0]:
  ans += 1
if a[1] == b[1]:
  ans += 1
if a[2] == b[2]:
  ans += 1
  
print(ans)

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
s = list(input())
t = list(input())

ct = 0
i = 0

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

print(ct)

Submission status: Accepted

Solution code:
s = list(input())
t = list(input())

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
S = input()
T = input()
ST_list = []

for n in S:
    ST_list.append(n)
for n in T:
    ST_list.append(n)

cnt = 0
for n in range(3):
    if (ST_list[n] == ST_list[n+3]):
        cnt += 1

print(cnt)

Submission status: Accepted

Solution code:
S = input()
T = input()
count = 0
for n in range(3):
  if S[n] == T[n]:
    count += 1
print(count)

Submission status: Accepted

Solution code:
s = list(input())
t = list(input())
cnt = 0
for a,b in zip(s,t):
  if a == b:
    cnt+=1
print(cnt)

Submission status: Accepted

Solution code:
# -*- coding utf-8 -*-

MOD = 10 ** 9 + 7

S = input()
T = input()

ans = sum([S[i] == T[i] for i in range(3)])

print(ans)

Submission status: Accepted

Solution code:
S = input()
T = input()
ans = 0
for i in range(len(S)):
  if S[i] == T[i]:
    ans += 1
    
print(ans)

Submission status: Accepted

Solution code:
S = input()
T = input()
ans = sum(1 for s, t in zip(S, T) if s == t)
print(ans)

Submission status: Accepted

Solution code:
S = list(input())
T = list(input())
count = 0
for i in range(3):
  if S[i] == T[i]:
    count += 1
print(count)

Submission status: Accepted

Solution code:
x = input()
x_list = list(x)
y = input()
y_list = list(y)
count = 0

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

Submission status: Accepted

Solution code:
S=input()
T=input()
a=0
for i in range(len(S)):
  if S[i]==T[i]:
    a=a+1
print(a)

Submission status: Accepted

Solution code:
pre = input()
gen = input()
ans=0
for i,k in zip(pre, gen):
    if i==k:
        ans+=1
print(ans)

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
import sys

str = sys.stdin.readlines()
# print(a)

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

print(count)

Submission status: Accepted

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

print(ans)

Submission status: Accepted

Solution code:
def slove():
    import sys
    input = sys.stdin.readline
    s = str(input().rstrip('\n'))
    t = str(input().rstrip('\n'))
    cnt = 0
    for i in range(3):
        if s[i] == t[i]:
            cnt += 1
    print(cnt)


if __name__ == '__main__':
    slove()

Submission status: Accepted

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

print(count)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
S = list(raw_input())
T = list(raw_input())
res = sum(i == j for i, j in zip(S, T))
print(res)

Submission status: Accepted

Solution code:
hare="S"
kumori="C"
ame="R"
S=input()
T=input()
c=0
for i,s in enumerate(S):
    if s==T[i]:
        c+=1
print(c)

Submission status: Accepted

Solution code:
S = list(input())
T = list(input())

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

Submission status: Accepted

Solution code:
str1=input()
str2=input()
cnt=0

for i in range(3):
  if( str1[i:i+1] == str2[i:i+1] ):
    cnt=cnt+1
    
print(cnt)

Submission status: Accepted

Solution code:
S = input()
T = input()
ans = 0
for s, t in zip(S, T):
  if s == t:
    ans += 1
    
print(ans)

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
import sys


def solve(S: str, T: str):

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

    return


# Generated by 1.1.5 https://github.com/kyuridenamida/atcoder-tools  (tips: You use the default template now. You can remove this line by using your custom template)
def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    S = next(tokens)  # type: str
    T = next(tokens)  # type: str
    solve(S, T)

if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
S = list(input())
T = list(input())
count = 0
for i in range(len(S)):
    if S[i] == T[i]:
        count += 1
print(count)

Submission status: Accepted

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

ans=0
for s,t in zip(S,T):
    ans += (s == t)

print(ans)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
S=list(input())
T=list(input())
a=0
for i in range(3):
    if(S[i]==T[i]):
        a+=1
print(a)

Submission status: Accepted

Solution code:
a=0
b=0
d=0
s=input()
t=input()
if (s[0]) == (t[0]):
   a=1
if (s[1]) == (t[1]):
   b=1
if (s[2]) == (t[2]):
   d=1
print(a+b+d)

Submission status: Accepted

Solution code:
s=input()
t=input()
count=0
for i in range(len(s)):
    if(s[i] == t[i]):
        count+=1
    else:
        continue
print(count)

Submission status: Accepted

Solution code:
S = input()
T = input()
a = list(S)
b = list(T)
c = 0
if a[0] == b[0]:
    c +=1
if a[1] == b[1]:
    c +=1
if a[2] == b[2]:
    c +=1
print(c)

Submission status: Accepted

Solution code:
S = list(i for i in input())
T = list(j for j in input())

cnt = 0

for k in range(len(S)):
    if S[k] == T[k]:
        cnt += 1

print(cnt)

Submission status: Accepted

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

count = 0

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

print(count)

Submission status: Accepted

Solution code:
# https://atcoder.jp/contests/abc139/tasks/abc139_a

l = [input() for i in range(2)]

count = 0
ex = l[0]
ac = l[1]

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

Submission status: Accepted

Solution code:
s = list(input())
t = list(input())
count = 0

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
a = input()
b = input()
cnt = 0
for i in range(3):
    if a[i] == b[i]:
      cnt+=1
print(cnt)

Submission status: Accepted

Solution code:
S = str(input())
T = str(input())
count = 0
for i in range(len(S)):
  if S[i] == T[i]:
    count +=1
print(count)

Submission status: Accepted

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

count=0

for s,t in zip(S,T):
  if s==t:
    count+=1
  else:
    pass
  
print(count)

Submission status: Accepted

Solution code:
s1=input()
s2=input()

counter = 0
for i in range(3):
  if s1[i] == s2[i]:
    counter += 1
print(counter)

Submission status: Accepted

Solution code:
pre = input().rstrip()
sur = input().rstrip()
num = len([n for n in range(len(pre)) if pre[n] == sur[n]])
print(num)

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
A,B,C = input()
a,b,c = input()
count = 0
for x in [[A,a],[B,b],[C,c]]:
    if x[1] == x [0]:
        count += 1
print(count)

Submission status: Accepted

Solution code:
S = raw_input()
T = raw_input()
print sum(1 for s, t in zip(S, T) if s == t)

Submission status: Accepted

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

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

Submission status: Accepted

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

for n in range(3):
    if S[n] == T[n]:
        count += 1

print(count)

Submission status: Accepted

Solution code:
s = list(input())
t = list(input())
c = 0

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

print(c)

Submission status: Accepted

Solution code:

s = input()
t = input()

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

print(n)

Submission status: Accepted

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

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

print(ans)

Submission status: Accepted

Solution code:
a = input()
b = input()
cnt = 0
for i in range(len(a)):
  if a[i]==b[i]:
    cnt += 1
print(cnt)

Submission status: Accepted

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


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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
S = input()
T = input()
n = len(S)

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

print(ans)

Submission status: Accepted

Solution code:
if __name__ == '__main__':
    s = input()
    t = input()
    count = 0
    for i in range(3):
        if s[i] == t[i]:
            count += 1
    print(count)

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
S = input()
T = input()
c = 0
for i in range(len(S)):
  if S[i] == T[i]:
    c = c + 1
print(c)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
s = input()
t = input()
goukei = 0
for i in range(len(s)):
    if s[i] == t[i]:
        goukei += 1

print(str(goukei))

Submission status: Accepted

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

sl = []
tl = []
ans = 0
for s in S:
  sl.append(s)

for t in T:
  tl.append(t)

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

Submission status: Accepted

Solution code:
predict_weather = str(input())
real_weather = str(input())

predict_list = list(predict_weather)
real_list = list(real_weather)

cnt = 0
for i in range(3):
  if predict_list[i] == real_list[i]:
    cnt += 1
    
print(cnt)

Submission status: Accepted

Solution code:
s1,s2,s3=input()
t1,t2,t3=input()
count=0
if s1==t1:
    count+=1
if s2==t2:
    count+=1
if s3==t3:
    count+=1
print(count)

Submission status: Accepted

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

Submission status: Accepted

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

#print(S[0])

count=0

for j in range(3):
  if S[j]==T[j]:
    count=count+1
    
print(count)

Submission status: Accepted

Solution code:
forecast = input()
actual = input()
print(sum(forecast[i] == actual[i] for i in range(3)))

Submission status: Accepted

Solution code:
v1=input()
v2=input()
cont = 0
for i in range(3):
    if v1[i]==v2[i]:
        cont+=1
print(cont)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
pred = input()
result = input()
count = 0
for i in range(0, 3):
  if(pred[i] == result[i]):
    count = count + 1
print(count)

Submission status: Accepted

Solution code:
s1,s2,s3=input()
t1,t2,t3=input()
count=0
if s1==t1:
    count+=1
if s2==t2:
    count+=1
if s3==t3:
    count+=1
print(count)

Submission status: Accepted

Solution 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)

Submission status: Accepted

Solution code:
S=input()
T=input()
c = 1 if S[0]==T[0] else 0
c += 1 if S[1]==T[1] else 0
c += 1 if S[2]==T[2] else 0
print(c)

Submission status: Accepted

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


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

print(cnt)

Submission status: Accepted

Solution code:
s=list(input())
t=list(input())

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