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

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

Submission status: Accepted

Solution code:
import sys
input = sys.stdin.readline
from collections import *

S = input()[:-1]
T = input()[:-1]
ans = 0

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

print(ans)

Submission status: Accepted

Solution code:
import sys
input = sys.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
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()

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

Submission status: Accepted

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

ans = 0
for s_i, t_i in zip(s,t):
  if s_i == t_i:
    ans += 1

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

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

Submission status: Accepted

Solution code:
from collections import defaultdict, deque
import sys


def LI(): return list(map(int, sys.stdin.buffer.readline().split()))
def I(): return int(sys.stdin.buffer.readline())
def LS(): return sys.stdin.buffer.readline().rstrip().decode('utf-8').split()
def S(): return sys.stdin.buffer.readline().rstrip().decode('utf-8')
def IR(n): return [I() for i in range(n)]
def LIR(n): return [LI() for i in range(n)]
def SR(n): return [S() for i in range(n)]
def LSR(n): return [LS() for i in range(n)]
def SRL(n): return [list(S()) for i in range(n)]
def MSRL(n): return [[int(j) for j in list(S())] for i in range(n)]


s = S()
t = S()

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

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

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

Submission status: Accepted

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

read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines


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


if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
# AtCoder
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=ans+1
print(ans)

Submission status: Accepted

Solution code:
def solve():
  s = input()
  t = input()
  ans = 0
  for i, j in zip(s, t):
    if i == j:
      ans += 1
  print(ans)
  return 0
 
if __name__ == "__main__":
  solve()

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()
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()
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()
x=0
if S[0] == T[0]:
  x +=1
if S[1] == T[1]:
  x +=1
if S[2] == T[2]:
  x +=1
print(x)

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

Submission status: Accepted

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


if __name__ == "__main__":
    main()

Submission status: Accepted

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

print(count)

Submission status: Accepted

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

Submission status: Accepted

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

ans = 0
for ss, tt, in zip(s, t):
    if ss==tt:
        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()

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

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()
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())
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(len(s)):
    if s[i] == t[i]:
        count += 1
print(count)

Submission status: Accepted

Solution code:
def tenki(s, t):

    ans = 0

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

    return ans

def main():
    s = list(str(input()))
    t = list(str(input()))
    print(tenki(s, t))

if __name__ == '__main__':
    main()

Submission status: Accepted

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

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

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

print(ans)

Submission status: Accepted

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

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

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

Submission status: Accepted

Solution code:
s=input();t=input()
c=0
for i in range(3):
  c += (s[i] == t[i])
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,t = [input() for j in range(2)]
ans = 0
for i in range(3):
    if s[i]==t[i]:
        ans+=1
print(ans)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
s = list(str(input()))
t = list(str(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()
count = [i for i, j in zip(T, S) if i == j]
print(len(count))

Submission status: Accepted

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

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

cnt = 0

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

Submission status: Accepted

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

s = list(str(input()))
t = list(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()
b=0
if S[0]==T[0]:
    b+=1
if S[1]==T[1]:
    b+=1
if S[2]==T[2]:
    b+=1
print(b)

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()
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())
r=0
for ii in range(len(a)):
  if a[ii]==b[ii]:
    r+=1
print(r)

Submission status: Accepted

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

if S[0]==T[0]:
  ans = ans+1
if S[1]==T[1]:
  ans = ans+1
if S[2]==T[2]:
  ans = ans+1

print(ans)

Submission status: Accepted

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

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

print(cnt)

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

print(r)

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

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

Submission status: Accepted

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

Submission status: Accepted

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

counter = 0
for s, t in zip(sss, ttt):
  if s == t:
    counter += 1
    
print(counter)

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:
a = input()
b = input()
print(int(a[0]==b[0]) + int(a[1]== b[1]) + int(a[2] == b[2]) )

Submission status: Accepted

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

Submission status: Accepted

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

for (i, j) in zip(s, t):
  if(i == j):
    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 = 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:
import sys
from io import StringIO
import unittest


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


class TestClass(unittest.TestCase):
    def assertIO(self, input, output):
        stdout, stdin = sys.stdout, sys.stdin
        sys.stdout, sys.stdin = StringIO(), StringIO(input)
        resolve()
        sys.stdout.seek(0)
        out = sys.stdout.read()[:-1]
        sys.stdout, sys.stdin = stdout, stdin
        self.assertEqual(out, output)

    def test_入力例_1(self):
        input = """CSS
CSR"""
        output = """2"""
        self.assertIO(input, output)

    def test_入力例_2(self):
        input = """SSR
SSR"""
        output = """3"""
        self.assertIO(input, output)

    def test_入力例_3(self):
        input = """RRR
SSS"""
        output = """0"""
        self.assertIO(input, output)


if __name__ == "__main__":
    # unittest.main()
    resolve()

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:
Ss = input().rstrip()
Ts = input().rstrip()

ans = 0
for S, T in zip(Ss, Ts):
    ans += S == T

print(ans)

Submission status: Accepted

Solution code:
n = input()
t = input()
count = 0
if n[0] == t[0]:
	count += 1
if n[1] == t[1]:
	count += 1
if n[2] == t[2]:
	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()

ans = 0
for a, b in zip(s, t):
    if a==b:
        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:
import sys
import math
import bisect

def solve(s, t):
    ans = 0
    for i in range(len(s)):
        if s[i] == t[i]:
            ans += 1
    return ans

def main():
    print(solve(input(), input()))

if __name__ == "__main__":
    main()

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

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()
print(sum([int(s == t) for s, t in zip(S, T)]))

Submission status: Accepted

Solution code:
# ABC139A

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:
print(sum(a==b for a,b in zip(*open(0)))-1)

Submission status: Accepted

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


if __name__ == '__main__':
    main()

Submission status: Accepted

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

if __name__ == '__main__':

    ABC_139_A()

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

Submission status: Accepted

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

ans = (S[0] ==T[0])*1 + (S[1] ==T[1])*1 +(S[2] ==T[2])*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:
from collections import defaultdict, deque, Counter
from heapq import heappush, heappop, heapify
from itertools import permutations, accumulate, combinations, combinations_with_replacement
from math import sqrt, ceil, floor, factorial
from bisect import bisect_left, bisect_right
from copy import deepcopy
from operator import itemgetter
from functools import reduce
#from fractions import gcd
#from math import gcd
import sys
def I(): return int(input())
def Is(): return map(int, input().split())
def LI(): return list(map(int, input().split()))
def TI(): return tuple(map(int, input().split()))
def IR(n): return [I() for _ in range(n)]
def LIR(n): return [LI() for _ in range(n)]
def TIR(n): return [TI() for _ in range(n)]
def S(): return input()
def Ss(): return input().split()
def LS(): return list(input())
def SR(n): return [S() for _ in range(n)]
def SsR(n): return [Ss() for _ in range(n)]
def LSR(n): return [LS() for _ in range(n)]
sys.setrecursionlimit(10**6)
MOD = 10**9+7
INF = float('inf')


s = S()
t = S()

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

Submission status: Accepted

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


if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import numpy as np
S = np.array(list(map(str, input().rstrip())))
T = np.array(list(map(str, input().rstrip())))
print(sum(S==T))

Submission status: Accepted

Solution code:
S = input()
T = input()
L = 0
A = S[0] 
B = S[1]
C = S[2]
D = T[0]
E = T[1]
F = T[2]
if A == D:
    L += 1
if B == E:
    L += 1
if C == F:
    L += 1
print(L)

Submission status: Accepted

Solution code:
# A - Tenki

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

Submission status: Accepted

Solution code:
import math

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

Submission status: Accepted

Solution code:
### ----------------
### ここから
### ----------------

import sys
from io import StringIO
import unittest

def yn(b):
    print("Yes" if b==1 else "No")
    return

def resolve():
    readline=sys.stdin.readline

    s=readline().rstrip()
    t=readline().rstrip()

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

    return

if 'doTest' not in globals():
    resolve()
    sys.exit()

### ----------------
### ここまで 
### ----------------

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

count = 0
for i in range(3) :
    if S[i] == T[i] :
        count = 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:
#!/usr/bin/env python3
# N = int(input())
S = input()
T = input()
# A, B = map(int, input().split())
# A = list(map(int, input().split()))
ans = 0
for i in range(len(S)):
    if S[i] == T[i]:
        ans += 1
print(ans)

Submission status: Accepted

Solution code:
import sys, heapq
def LI(): return list(map(int, sys.stdin.readline().split()))
def LS(): return list(sys.stdin.readline())

S = LS()
T = LS()

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

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

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

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:
print(sum([a == b for a,b in zip(input(),input())]))

Submission status: Accepted

Solution code:
cnt = 0
for a,b in zip(input(),input()):
    if a == b:
        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()
C=0
for i in range(len(S)):
	if S[i]==T[i]:
		C+=1
print(C)

Submission status: Accepted

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


if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
s = input()
t = input()
cnt = 0
for x, y in zip(s,t):
    if x == y:
        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())

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

print (ans)

Submission status: Accepted

Solution code:
import sys
def input(): return sys.stdin.readline().strip()

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

Submission status: Accepted

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

i=0
cnt=0
while i <len(s):
  if s[i]==w[i]:
    cnt+=1
  i+=1
  
print(cnt)

Submission status: Accepted

Solution code:
s, t = input(), input()
print(sum([s[i]==t[i] for i in range(3)]))

Submission status: Accepted

Solution code:
s = input()

t = input()

ans = 0


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

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

Submission status: Accepted

Solution code:
import sys
sys.setrecursionlimit(10 ** 5 + 10)
def input(): return sys.stdin.readline().strip()

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



    
resolve()

Submission status: Accepted

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

Submission status: Accepted

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


main()

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

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

ans = 0

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

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:
print(sum(x==y for x,y in zip(input(),input())))

Submission status: Accepted

Solution code:
from math import factorial as fact
import math
import sys
import itertools
import numpy as np
from collections import Counter
import datetime


#入力:N(int:整数)
def input1():
	return int(input())

#入力:N,M(int:整数)
def input2():
	return map(int,input().split())

#入力:[n1,n2,...nk](int:整数配列)
def input_array():
	return list(map(int,input().split()))

def keta(N):
	return len(str(N))


def input_daytime(input_time):
	time,distance=input_time.split()
	t=time.split(":")
	se=str(t[-1]).split(".")
	dt1 = datetime.timedelta(hours=int(t[0]),minutes=int(t[1]),seconds=int(se[0]),milliseconds=int(se[1]))
	return dt1

def combinations(n,r):
	return list(itertools.combinations(range(n),r))



def all_sets(num_list):
	subsets=[]
	for i in range(2,len(num_list) + 1):
		for c in combinations(num_list, i):
			subsets.append(c) 
	return subsets

#公約数の列挙
def ch(x1):
	cf=[]
	for i in range(2,math.sqrt(x1)+1):
		if x1 % i==0:
			cf.append(i)
	return cf

def CountOneRoots(x,y):
	#x:縦，y:横
	return fact(x+y)/fact(x)/fact(y)

# 素因数分解
def prime_factorize(n):
    a = []
    while n % 2 == 0:
        a.append(2)
        n //= 2
    f = 3
    while f * f <= n:
        if n % f == 0:
            a.append(f)
            n //= f
        else:
            f += 2
    if n != 1:
        a.append(n)
    return a
			


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:
a=0
A,B,C=map(str,input())
X,Y,Z=map(str,input())

if A==X:
  a=a+1
if B==Y:
  a=a+1
if C==Z:
  a=a+1

print(a)

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:
# input 
S = list(input())
T = list(input())

# initialization
ans = 0

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

# output
print(ans)

Submission status: Accepted

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

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

print(c)

Submission status: Accepted

Solution code:
import math
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 = 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 = 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=input() ; t=input() ; ans=0
for i in [1,2,3]:
    i-=1
    if s[i]==t[i]:
        ans+=1
print(ans)