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

def j(n):
    if n:print("yes")
    else:print("no")
    exit(0)
rem = 10 ** 9 + 7

"""
def ct(x,y):
    if (x>y):print("+")
    elif (x<y): print("-")
    else: print("?")
"""

def ip():
    return int(input())
def iprow():
    return [int(i) for i in input().split()]
def ips():
    return (int(i) for i in input().split())
def ipmultiplerow(n):
    a = []
    for i in range(n):
        a.append(ip())
    return a
def printrow(a):
    for i in a:
        print(i)

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

Submission status: Accepted

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

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

print(cnt)

Submission status: Accepted

Solution code:
#1行目の文字列
s = str(input())
#2行目の文字列
t = str(input())
#文字列の各文字が一致しているか確認
count = 0
#入力文字列の文字数だけループ
for i in range(len(s)):
    #文字列が一致していれカウンターに1プラス
    if s[i] == t[i]:
        count += 1
print(count)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

n = int(0)
i = int(0)

while i < 3:
  if s[i] == t[i]:
    i += 1
    n += 1
  else:
    i += 1

print(n)

Submission status: Accepted

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

Submission status: Accepted

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

cnt = 0

for s, t in zip(s, t):
    if s == t:
        cnt += 1

print(cnt)

Submission status: Accepted

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

x = 0

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

print(x)

Submission status: Accepted

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

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

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

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

Submission status: Accepted

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

count = 0
for x in range(len(A)):
    if(A[x] == B[x]):
        count +=1

print(count)

Submission status: Accepted

Solution code:
#coding:utf-8

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:
from sys import stdin
n = 2
inp = [stdin.readline().rstrip() for _ in range(n)]
count = 0
for i in range(3):
  if inp[0][i] == inp[1][i]:
    count += 1
 
print(count)

Submission status: Accepted

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

count = 0
for i in [0, 1, 2]:
  if S[i] == T[i]:
    count += 1

print(count)

Submission status: Accepted

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

result = 0

if s[0] == t[0]:
    result += 1

if s[1] == t[1]:
    result += 1

if s[2] == t[2]:
    result += 1

print(result)

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

print(count)

Submission status: Accepted

Solution code:
# ABC139 A - Tenki

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:

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


if __name__ == "__main__":
    main()

Submission status: Accepted

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

a = 0

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

print(a)

Submission status: Accepted

Solution code:
inputs = [input() for i in range(2)]
day1 = list(inputs[0])
day2 = list(inputs[1])
count = 0
for i in range(3):
    if day1[i] == day2[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(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()
res = 0
for n in range(len(S)):
  if S[n] == T[n]:
    res += 1
print(res)

Submission status: Accepted

Solution code:
p = list(input())
a = list(input())
o = [a[i] for i in range(len(p)) if p[i] == a[i]]
print(len(o))

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
    else:
        a = a

print(a)

Submission status: Accepted

Solution code:
S = list(input())
T = list(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:
forecast = input()
weather = input()

res = 0

for i in range(3):
    if forecast[i:i+1] == weather[i:i+1]:
        res += 1
print(res)

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

Submission status: Accepted

Solution code:
a,b,c = input()
d,e,f = input()
p = 0
if a == d:
    p += 1
if b == e:
    p += 1
if c == f:
    p += 1
print(p)

Submission status: Accepted

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

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

print(c)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
import sys
# import math
# import numpy as np
# from functools import lru_cache

args = sys.argv
if len(args) == 2:
  from IPython import embed
  em = True
else:
  em = False

# sys.setrecursionlimit(10000)

#### input
S = input()
T = input()


# a, b, c, d = map(int, input().split())
# a = list(map(int, input().split()))
# a = list(map(lambda x: int(x)*(-1), a))  # 各要素を-1倍


# n = int(input())
# t = [int(input()) for i in range(n)]
if em: sys.stdin = open('/dev/tty')

#### function
# @lru_cache(maxsize=10000)

#### process
# if em: embed()
score = 0
for i in range(0, len(S)):
  if S[i] == T[i]:
    score = score + 1

print(score)

## heapsort, O(logN)
# import heapq
# heapq.heapify(A)
# min = heapq.heappop(A)
# heapq.heappush(A, new_element)

Submission status: Accepted

Solution code:
F = input()
A = input()
s = 0
s += 1 if F[0] == A[0] else 0
s += 1 if F[1] == A[1] else 0
s += 1 if F[2] == A[2] else 0
print(s)

Submission status: Accepted

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

if s[1]==t[1]:
  c = c + 1

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

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

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

l = len(S)
res = 0
for n in range(l):
    if S[n] == T[n]:
        res += 1
print(res)

Submission status: Accepted

Solution code:
weather = [input().split() for l in range(2)]
weather_af = weather[0]
weather_bf = weather[1]
count=0

if weather_af[0][0] == weather_bf[0][0]:
    count=count+1
if weather_af[0][1] == weather_bf[0][1]:
    count=count+1
if weather_af[0][2] == weather_bf[0][2]:
    count=count+1

print(count)

Submission status: Accepted

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

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

print(ans)

Submission status: Accepted

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

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:
n = input()
m = input()
answer = 0

for i in range(3):
  if n[i] == m[i]:
    answer +=1
    
print(answer)

Submission status: Accepted

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

ST = list(zip(S,T))


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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
a=input()
b=input()
print(sum(i==j for i,j in zip(a,b)))

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
s = input()
t = input()
nhits = sum(1 for si, ti in zip(s, t) if si == ti)
print(nhits)

Submission status: Accepted

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

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:
def func(S, T):
    n = 0
    for i in range(3):
        if S[i] == T[i]:
            n += 1
    return n

S = input()
T = input()
print(func(S, T))

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=list(input())
T=list(input())
c=0
for u,v in zip(S,T):
    if u==v:
        c+=1
print(c)

Submission status: Accepted

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

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:
in1 = input()
in2 = input()
c = 0
if in1[0] == in2[0]: c +=1
if in1[1] == in2[1]: c +=1
if in1[2] == in2[2]: c +=1
print(c)

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

count = 0

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

print(count)

Submission status: Accepted

Solution code:
A = list(input())
B = list(input())

counter = 0
q = 0
for i in A:
  if i == B[q]:
    counter += 1
  q += 1

print(counter)

Submission status: Accepted

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

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:
yohou = list(input())
tenki = list(input())

cnt = 0
for i in range(0,3):
    if yohou[i]==tenki[i]:
        cnt = cnt+1
    else:
        pass
print(cnt)

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

count = 0
for forecast, actual in zip(s, t):
    if forecast == actual:
        count += 1

print(count)

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

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

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(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:
if __name__ == '__main__':
    
    s = input()
    t = input()
    global ans
    ans = 0
    for day in range(3):
        if s[day] == t[day]:
            ans += 1
    print(ans)

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#!/usr/bin/python
# -*- coding: utf-8 -*-
import sys,collections,itertools,re,math,fractions,decimal,random,array,bisect,heapq

# decimal.getcontext().prec = 50
# sys.setrecursionlimit(10000)
# MOD = 10**9 + 7

def solve(f):
    s = f.read_str()
    t = f.read_str()

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

    return ans


class Reader(object):
    def __init__(self, filename=None):
        self.file = open(filename) if filename is not None else None
        self.case = 1

    def __readline(self):
        return self.file.next().strip() if self.file else raw_input()

    def next_case(self):
        self.file.next()
        self.case += 1

    def read_int(self): return int(self.__readline())
    def read_float(self): return float(self.__readline())
    def read_long(self): return long(self.__readline())
    def read_decimal(self): return decimal.Decimal(self.__readline())
    def read_str(self): return self.__readline()

    def read_int_list(self): return map(int, self.__readline().split())
    def read_float_list(self): return map(float, self.__readline().split())
    def read_long_list(self): return map(long, self.__readline().split())
    def read_decimal_list(self): return map(decimal.Decimal, self.__readline().split())
    def read_str_list(self): return self.__readline().split()

if __name__ == '__main__':
    filename = sys.argv[1] if len(sys.argv) > 1 else None
    f = Reader(filename)
    if f.file:
        while True:
            print "Case #%d\n"%f.case, solve(f)
            try:
                f.next_case()
            except StopIteration:
                break
    else:
        print solve(f)

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:
# A - Tenki
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 = str(input())
t = str(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:
s = list(input())
t = list(input())

answer = 0

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

print(answer)

Submission status: Accepted

Solution code:
S = [c for c in input()]
T = [c for c in input()]
count = 0

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

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
from collections import defaultdict,deque
from heapq import heappush, heappop
from bisect import bisect_left, bisect_right
import sys, random, itertools, math
sys.setrecursionlimit(10**5)
input = sys.stdin.readline
sqrt = math.sqrt
def LI(): return list(map(int, input().split()))
def LF(): return list(map(float, input().split()))
def LI_(): return list(map(lambda x: int(x)-1, input().split()))
def II(): return int(input())
def IF(): return float(input())
def LS(): return list(map(list, input().split()))
def S(): return list(input().rstrip())
def IR(n): return [II() for _ in range(n)]
def LIR(n): return [LI() for _ in range(n)]
def FR(n): return [IF() for _ in range(n)]
def LFR(n): return [LI() for _ in range(n)]
def LIR_(n): return [LI_() for _ in range(n)]
def SR(n): return [S() for _ in range(n)]
def LSR(n): return [LS() for _ in range(n)]
mod = 1000000007
inf = float('INF')

#A
def A():
    s = S()
    t = S()
    ans = 0
    for i in range(3):
        if s[i] == t[i]:
            ans += 1
    print(ans)
    return

#B
def B():
    a, b = LI()
    ans = 0
    b -= 1
    while b > 0:
        b -= a - 1
        ans += 1
    print(ans)

    return

#C
def C():
    n = II()
    h = LI()
    i = 0
    ans = 0
    while i < n:
        down = i+1
        while down < n:
            if h[down - 1] >= h[down]:
                down += 1
            else:
                break
        ans = max(ans, down - i - 1)
        i = down
    print(ans)
    return

#D
def D():
    n = II()
    print(n * (n - 1) // 2)
    return

#E
def E():
    return

#F
def F():
    return

#Solve
if __name__ == '__main__':
    A()

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
S=list(input())
T=list(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()
count = 0

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

Submission status: Accepted

Solution code:
S = list(v for v in input())
T = list(v for v in 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:
i = input()
j = input()
cnt = 0
for k in range(3):
    if i[k]==j[k]:
       cnt+=1

print(cnt)

Submission status: Accepted

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

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

print(counter)

Submission status: Accepted

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

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 = [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)

Submission status: Accepted

Solution code:
predict = list(input())
result = list(input())

count = 0

for i in range(len(predict)):
    if predict[i] == result[i]:
        count += 1

print(count)

Submission status: Accepted

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

i = 0
match_count = 0

while i < len(S):
  if S[i] == T[i]:
    match_count += 1
  i += 1

print(match_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()
print(int(s[0]==t[0])+int(s[2]==t[2])+int(s[1]==t[1]))

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
S, T = input(), 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()

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 i, j in zip(s,t):
    if i == j:
        ans += 1
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:
a = list(str(input()))
b = list(str(input()))

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

Submission status: Accepted

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

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

Submission status: Accepted

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

for a,b in zip(s,t):
	if a == b:
		cnt  += 1

print(cnt)

Submission status: Accepted

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

result = 0
for tmp1, tmp2 in zip(s, t):
    if tmp1 == tmp2:
        result += 1

print(result)

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

Submission status: Accepted

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


if __name__ == '__main__':
  main()

Submission status: Accepted

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

for i  in [0,1,2]:
    if S[i]==T[i]:
        count=count+1

    else:
        pass

print(count)

Submission status: Accepted

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

i = 0
ans_cnt = 0

while i < len(S):
    if S[i] == T[i]:
        ans_cnt += 1
    i += 1

print(ans_cnt)

Submission status: Accepted

Solution code:
#a = input().split(" ")
#b = input().split(" ")

a = input()
b = input()

count=0
i=0

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

print(count)

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

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:
line1 = str(input())
a,b,c = list(line1)
line2 = str(input())
d,e,f = list(line2)
if a==d:
  if b==e:
    if c==f:
      print("3")
    else:
      print("2")
  else:
    if c==f:
      print("2")
    else:
      print("1")
else:
  if b==e:
    if c==f:
      print("2")
    else:
      print("1")
  else:
    if c==f:
      print("1")
    else:
      print("0")

Submission status: Accepted

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

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

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

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

Submission status: Accepted

Solution code:
S1,S2,S3 = input()
S = [S1,S2,S3]
T1,T2,T3 = input()
T = [T1,T2,T3]

ans_count = 0

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

Submission status: Accepted

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

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

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 s, t in zip(S, T):
    if s == t:
        ans += 1
print(ans)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
s = list(input())
t = list(input())
count = 0
for si, ti in zip(s, t):
    if si == ti:
        count+=1
print(count)

Submission status: Accepted

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

Submission status: Accepted

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

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

print(num)

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

Submission status: Accepted

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

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

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=map(int,input().split())
#p_3,p_4=map(int,input().split())
#n=int(input())
S=input()
T=input()
#recipe=[list(input().split())for _ in range(n)]
#m=int(input())
#have=[list(input().split())for _ in range(m)]
#s=[list(input())for _ in range(n)]
#h=list(map(int,input().split()))
#v=list(map(int,input().split()))
#c=list(map(float,input().split()))
#n=int(input())
#s=[list(map(int,input().split()))for _ in range(n)]
#s=[list(input().split())for _ in range(n)]
#s=[input()for _ in range(n)]
ans=0
for s,t in zip(S,T):
    if s==t:
        ans+=1
print(ans)

Submission status: Accepted

Solution code:
import sys
input = sys.stdin.readline

#単入力
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()
dem=0
for i in range(3):
    if forecast[i] == real[i]:
        dem+=1

print(dem)

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

Submission status: Accepted

Solution code:
ppp = input()
ttt = input()

ans = 0
for p, t in zip(ppp, ttt):
	if p == t:
		ans += 1
print(ans)

Submission status: Accepted

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

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

Submission status: Accepted

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

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


if __name__ == "__main__":
    main()

Submission status: Accepted

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