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:
# sys.stdin.readline()
import sys
input = sys.stdin.readline

yoho=list(input())
tenki=list(input())
a=0
for i in range(3):
    if yoho[i]==tenki[i]:
        a=a+1

print(a)

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

ans = 0

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

print(ans)

Submission status: Accepted

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

print(H)

Submission status: Accepted

Solution code:
import sys
sys.setrecursionlimit(10000)

import numpy as np

def acinput():
    return list(map(int, input().split(" ")))


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()
ans = 0

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

Submission status: Accepted

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

Submission status: Accepted

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


def calc(S: str, T: str) -> int:
    hit = [s == t for s, t in zip(S, T)]
    return sum(hit)


def main() -> None:
    S = input()
    T = input()
    result = calc(S, T)
    print(result)


main()

Submission status: Accepted

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

for i, s in enumerate(S):
  if s == T[i]:
    cnt += 1

print(cnt)

Submission status: Accepted

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

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

match_day = 0

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

print(match_day)

Submission status: Accepted

Solution code:
s_s = list(input())
t_s = list(input())

count = 0
for s, t in zip(s_s, t_s):
  if s == t:
    count += 1

print(count)

Submission status: Accepted

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

Submission status: Accepted

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


count = 0

for i in range(3):
    if forecast[i] == real[i]:
        count += 1
    else:
        pass

print(count)

Submission status: Accepted

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

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

print(c)

Submission status: Accepted

Solution code:
import sys

if sys.platform =='ios':
    sys.stdin=open('input_file.txt')
    
S=input()
T=input()
cnt=0
l=len(S)

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

Submission status: Accepted

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

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()
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, T = list(input()), 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:
import sys
input = sys.stdin.readline
sys.setrecursionlimit(100000)

def getN():
    return int(input())
def getList():
    return list(map(int, input().split()))
import math

s = input().strip()
t = input().strip()
ans = 0
for i, j in zip(s, t):
    if i == j:
        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=x+1
  else:
    x=x
print(x)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
string_list=[input() for i in range(2)]
list1=list(string_list[0])
list2=list(string_list[1])
count=0
for i in range(3):
    if list1[i]==list2[i]:
        count+=1
print(count)

Submission status: Accepted

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

counter = 0

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

print(counter)

Submission status: Accepted

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

S = input()
T = input()

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

print(eq)

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:
yohou = list(str(input()))
result = list(str(input()))
count = 0

for n in range(len(yohou)):
  count += 1 if yohou[n] == result[n] else 0

print(count)

Submission status: Accepted

Solution code:
S=list(input())
T=list(input())
A=[]
for i in range(3):
  if S[i]==T[i]:
    A.append(1)
  else:
    A.append(0)
b=A.count(1)
print(b)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
S= list(input())
R= list(input())
ans = 0

for i in range(len(S)):
    if(S[i]==R[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
print(cnt)

Submission status: Accepted

Solution code:
Y=input()
S=input()
print(sum([1 for a,b in zip(Y,S) if a==b]))

Submission status: Accepted

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

k = 0
if s[0] == t[0]:
  k += 1
if s[1] == t[1]:
  k += 1
if s[2] == t[2]:
  k += 1
print(k)

Submission status: Accepted

Solution code:
S = input()
T = input()
tl = list(T)
ans = 0
for i, s in enumerate(list(S)):
  if s == tl[i]:
  	ans += 1
print(ans)

Submission status: Accepted

Solution code:
s = list(input())
t = list(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:
s = list(input())
t = list(input())

cnt = 0

for i, j in zip(s, t):

    if i == j:
        cnt += 1

print(cnt)

Submission status: Accepted

Solution code:
S, T = input(), input()
ans = 0
for i in range(3):
    if S[i]==T[i]:
        ans += 1
    else:
        pass
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 = count + 1

print(count)

Submission status: Accepted

Solution code:
s = input().strip()
t = input().strip()
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())
c=0
for i in range(len(S)):
    if S[i]==T[i]:
        c+=1
print(c)

Submission status: Accepted

Solution code:
a = str(input())
b = str(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())
x=0

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

print(x)

Submission status: Accepted

Solution code:

S = input().strip()
T = input().strip()

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
s = list(str(input()))
t = list(str(input()))
x = 0
for s,t in zip(s,t):
    if s == t:
        x += 1
print(x)

Submission status: Accepted

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

c = 0

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

Submission status: Accepted

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

ans = 0

for i in [1, 2, 3]:
    if s[i-1:i] == t[i-1:i]:
        ans += 1

print(ans)

Submission status: Accepted

Solution code:
def main(S, T):
    count = 0

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

    return count


if __name__ == "__main__":
    S = input()
    T = input()
    print(main(S, T))

Submission status: Accepted

Solution code:
import sys

#+++++
		
def main():
	s = input()
	t = input()
	ret=sum([1 for y,r in zip(s,t) if y == r])
	print(ret)
	
	
#+++++


if __name__ == "__main__":
	if sys.platform =='ios':
		sys.stdin=open('inputFile.txt')
	else:
		pass
		#input = sys.stdin.readline
			
	ret = main()
	if ret is not None:
		print(ret)

Submission status: Accepted

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

print(ans)

Submission status: Accepted

Solution code:
s=input()
t=input()
if s[0]==t[0] and s[1]==t[1] and s[2]==t[2]:
    print("3")
elif (s[0]==t[0] and s[1]==t[1])or(s[1]==t[1] and s[2]==t[2])or(s[0]==t[0] and s[2]==t[2]):
    print("2")
elif s[0]==t[0] or s[1]==t[1] or s[2]==t[2]:
    print("1")
else:
    print("0")

Submission status: Accepted

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

Submission status: Accepted

Solution code:
from enum import Enum
from queue import Queue
import collections

import sys
import math

BIG_NUM = 2000000000
MOD = 1000000007
EPS = 0.000000001

S = str(input())
T = str(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 = str(input())
T = str(input())
S1 = list(str(S))
T1 =list(str(T))
count = 0
for i in range(3):
    if S1[i] == T1[i]:
        count += 1
    else:
        count =count
print(count)

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 = input()
t = input()
result = 0
for i in range(0, 3):
    if s[i] == t[i]:
        result += 1
print(result)

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#import pysnooper
#import os,re,sys,operator,math,heapq,string
#from collections import Counter,deque
#from operator import itemgetter
#from itertools import accumulate,combinations,groupby,combinations_with_replacement
from sys import stdin,setrecursionlimit
#from copy import deepcopy

setrecursionlimit(10**6)
input=stdin.readline

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

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
  else : next
    
print(ans)

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 = 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()
n = 0
for i in range(len(s)):
  if s[i] == t[i]:
    n += 1
print(n)

Submission status: Accepted

Solution code:
#coding:utf-8
import sys
sys.setrecursionlimit(10**6)
write = sys.stdout.write
dbg = lambda *something : print(*something) if DEBUG else 0
DEBUG = False
def main(given = sys.stdin.readline):
    input = lambda : given().rstrip()
    LMIIS = lambda : list(map(int,input().split()))
    II = lambda : int(input())
    XLMIIS = lambda x : [LMIIS() for _ in range(x)]


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


if __name__ == '__main__':
    main()

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()
c = 0
for i in range(3):
  if S[i] == T[i]:
    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= a+1
print(a)

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()
c=0
for i in range(len(s)):
    if s[i]==t[i]:c+=1
print(c)

Submission status: Accepted

Solution code:
predict = input()

actual = input()

count = 0

for index in range(0, len(predict)):
    if predict[index] == actual[index]:
        count += 1

print (count)

Submission status: Accepted

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

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:
a = input()
b = input()
c = 0
for i in range(3):
        if a[i] == b[i]:
                c += 1
print(c)

Submission status: Accepted

Solution code:
S = input()
T = input()
count = 0
forecastlist = []
realweatherlist = []
for forecast in S:
  forecastlist.append(forecast)
for weather in T:
  realweatherlist.append(weather)
  
for i in range(3):
  if forecastlist[i] == realweatherlist[i]:
    count += 1
print(count)

Submission status: Accepted

Solution code:
import math

s = input()
t = input()


ret = [1 if si==ti else 0 for si, ti in zip(s, t)]

print(sum(ret))

Submission status: Accepted

Solution code:
yohou= input()
tenki= input()
num=0
x=0
for i in range(3):
    if tenki[x] == yohou[x]:
        num=num+1
    else:
        num=num
    x=x+1
print(num)

Submission status: Accepted

Solution code:
s=list(input())
t=list(input())
cnt = 0
for i,v in enumerate(s):
  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=cnt+1

print(cnt)

Submission status: Accepted

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

print(num)

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
import sys
count = 0
lines = sys.stdin.readlines()
for i in range(3):
  if lines[0][i]==lines[1][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=list(input())
t=list(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:
def calc(a, b):
    if a == b:
        return 1
    else:
        return 0


S = input()
S1, S2, S3 = S[0], S[1], S[2]
S = input()
T1, T2, T3 = S[0], S[1], S[2]

print(calc(S1, T1) + calc(S2, T2) + calc(S3, T3))

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 = input()
T = input()

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

Submission status: Accepted

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

Submission status: Accepted

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

cnt = 0
for i,j in zip(S,T):
  if i == j:
    cnt +=1

print(cnt)

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
x = input()
y = input()
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()
ans = 0

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

print(c)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
w1 = input()
w2 = input()
count = 0

for x, y in zip(w1, w2):
  if x == y:
    count += 1
    
print(count)

Submission status: Accepted

Solution code:
s1, s2, s3 = input()
t1, t2, t3 = input()
if s1 == t1:
    if s2 == t2:
        if s3 == t3:
            print(3)
        else:
            print(2)
    else:
        if s3 == t3:
            print(2)
        else:
            print(1)
else:
    if s2 == t2:
        if s3 == t3:
            print(2)
        else:
            print(1)
    else:
        if s3 == t3:
            print(1)
        else:
            print(0)

Submission status: Accepted

Solution code:
s=input()
t=input()
slist=list(s)
tlist=list(t)
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()
print(sum([i==j for i,j in zip(s,t)]))

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:
import sys
import math
from fractions import gcd
# import queue
# from collections import Counter
# from itertools import accumulate
# from functools import reduce

def lcm(a, b):
    return a * b // gcd(a, b)

def combination_count(n, r):
    return math.factorial(n) // (math.factorial(n - r) * math.factorial(r))

def permutations_count(n, r):
    return math.factorial(n) // math.factorial(n - r)

big_prime = 1000000007

"""
# 標準入力取得
## 文字列
 =  sys.stdin.readline().rstrip()
 =  list(sys.stdin.readline().rstrip())

## 数値
 =  int(sys.stdin.readline())
 =  map(int, sys.stdin.readline().split())
 =  list(map(int, sys.stdin.readline().split()))
 =  [list(map(int,list(sys.stdin.readline().split()))) for i in range(N)]
"""

S =  list(sys.stdin.readline().rstrip())
T =  list(sys.stdin.readline().rstrip())

cnt = 0

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

print(cnt)

Submission status: Accepted

Solution code:
i = input()
s = input()
print(len([u for u, o in zip(i, s) if u == o]))

Submission status: Accepted

Solution code:
S=list(input())
T=list(input())
if S[0]==T[0] and S[1]==T[1] and S[2]==T[2]:
  print(3)
elif S[0]==T[0] and S[1]!=T[1] and S[2]!=T[2]:
  print(1)
elif S[0]!=T[0] and S[1]==T[1] and S[2]!=T[2]:
  print(1)
elif S[0]!=T[0] and S[1]!=T[1] and S[2]==T[2]:
  print(1)
elif S[0]!=T[0] and S[1]!=T[1] and S[2]!=T[2]:
  print(0)
else:
  print(2)

Submission status: Accepted

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

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:
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:
import sys

s = input()
t = input()
result = 0

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

print(str(result))

Submission status: Accepted

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

for i, j in zip(S, T):
    if i == j:
        ans += 1

print(ans)

Submission status: Accepted

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

s_list = [a for a in s]
t_list = [b for b in t]

c = 0
for i in range(3):
    if s_list[i] == t_list[i]:
        c = c + 1

print(c)

Submission status: Accepted

Solution code:

if __name__ == "__main__":

    a = input()
    b = input()
    print(sum([a[i] == b[i] for i in range(3)]))

Submission status: Accepted

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

print(int(s[0]==t[0])+int(s[1]==t[1])+int(s[2]==t[2]))

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()
def check(s, t):
    if s == t:
        return 1
    else:
        return 0
cnt = 0
for i in range(3):
    cnt = cnt + check(S[i], T[i])
print(cnt)

Submission status: Accepted

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

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:
def solve():
    s,t= input(),input()
    print(sum(1 for x,y in zip(s,t) if x== y))
solve()

Submission status: Accepted

Solution code:
s = input()
r = input()
s = str(s)
r = str(r)

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

print(count)

Submission status: Accepted

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

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:
S = input()
S.split()
T = input()
T.split()
count = 0
for i in range(0, 3):
    if S[i] == T[i]:
        count += 1
print(count)

Submission status: Accepted

Solution code:
S = input()
T = input()
S1 = list(S)
T1 = list(T)
N=0
for x in range(0,3):
    if S1[x]==T1[x]:
        N=N+1
print(N)

Submission status: Accepted

Solution code:

A = str(input())
B = str(input())
ans = 0

for i in range(3):
    if A[i] == B[i]:
        ans += 1

print(ans)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
anticipations = input()
result =  input()

hit_count = 0
for i in range(len(anticipations)):
  if anticipations[i] == result[i]:
    hit_count += 1
print(hit_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 = input()
T = input()

correct_count = 0

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:

str1 = input()
str2 = input()

count = 0

for i in range(len(str1)):
    if (str1[i] == str2[i]):
        count += 1

print(count)

Submission status: Accepted

Solution code:
S=input()
T=input()
if len(S)>3 or len(S) < 1 or len(T)>3 or len(T) < 1:
  sys.exit()

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=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()
cnt = 0
for i in range(len(S)):
    if S[i] == T[i]:cnt+=1
print(cnt)

Submission status: Accepted

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


def solve(S: str, T: str):
    print(([S[0]==T[0], S[1]==T[1], S[2] == T[2]]).count(True))
    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 = [str(i) for i in input()]
T = [str(i) for i in input()]

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

print(sum)

Submission status: Accepted

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

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

print(ans)

Submission status: Accepted

Solution code:
import collections as c
ip = lambda : map(int, input().split())
# ##############
mod = 1e9+7
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 = str(input())
T = str(input())

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

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:
S = input().split()
T = input().split()
S = list(S[0])
T = list(T[0])

count = 0
for i in range(3):

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


print(count)

Submission status: Accepted

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

ans = 0
for s, t in zip(S, T):
    if s == t:
        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:
ss = input()
tt = input()
print(sum([ss[i] == tt[i] for i in range(3)]))

Submission status: Accepted

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

len(a)

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

print(k)

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:
from sys import stdin


def main():
    S = stdin.readline()
    T = stdin.readline()

    sum_ = 0

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

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

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

    print(sum_)


if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
S, T = open(0).read().split()

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

cnt = 0
for idx, s in enumerate(S):
  if s==T[idx]:
    cnt += 1
      
print(cnt)

Submission status: Accepted

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

Submission status: Accepted

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

for i in range(3) :
    v = i

    if s[v]==t[v]:
        o+=1
    
   
print(o)

Submission status: Accepted

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

Submission status: Accepted

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

print(i)

Submission status: Accepted

Solution code:
s = str(input())
t = str(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()
n=len(S)
ans=0
for i in range(n):
    if S[i]==T[i]:
        ans+=1
print(ans)

Submission status: Accepted

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

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

print(k)

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:
S = input()
T = input() 
p = 0
for x in range(3):
  if S[x] == T[x]:
    p+=1
print(p)

Submission status: Accepted

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

Submission status: Accepted

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

counter = 0

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

Submission status: Accepted

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

A()