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

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

print(ctr)

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

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

print(Count)

Submission status: Accepted

Solution code:
A, B = input(), input()
print(sum(A[i] == B[i] for i in range(len(A))))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
input = raw_input

p = list(input())
a = list(input())
ans = 0
for i in range(len(p)):
    if p[i] == a[i]:
        ans += 1
print(ans)

Submission status: Accepted

Solution code:
s = str(input())
t = str(input())
count = 0
if len(s) == len(t) == 3:
    s.upper()
    t.upper()
    slist = list(s)
    tlist = list(t)
    for i in range(len(s)):
        if slist[i] == tlist[i]:
            count += 1
        else:
            continue
    print(count)
else:
    print('hoge!')

Submission status: Accepted

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

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

print(c)

Submission status: Accepted

Solution code:
# coding: utf-8

S = raw_input()
T = raw_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())
res=0
for i, j in zip(s, t):
  if i == j:
    res += 1
print(res)

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
S = input()
T = input()
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 s, t in zip(S, T):
    if s == t:
        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:
def solve():
  import sys
  import math

  sys.setrecursionlimit(10**7)

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


if __name__ == '__main__':
  solve()

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys

S = str(sys.stdin.readline())
T = str(sys.stdin.readline())

# Neglect the last newline character
num_correct = sum(1 if S[i] == T[i] else 0 for i in range(len(S[:-1])))

print(num_correct)

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

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

print(cnt)

Submission status: Accepted

Solution code:
# 2019/09/01
# AtCoder Beginner Contest 139 - A

# Input
s = input()
t = input()

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

# Output
print(ans)

Submission status: Accepted

Solution code:
import sys
input = sys.stdin.readline
from operator import itemgetter

def main():
	v = input().strip()
	v2 = input().strip()
	ans = 0
	for i in range(3):
		if v[i] == v2[i]:
			ans += 1
	print(ans)

if __name__ == '__main__':
	main()

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

print(d)

Submission status: Accepted

Solution code:
S = list(input())
T = list(input())
A = 0
for i,j in zip(S,T):
    if i == j:
        A+=1
    else:
        pass
print(A)

Submission status: Accepted

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

t = input()
t_list = list(t)
result = 0
for i in range(0,3):
  if s_list[i] == t_list[i]:
    result += 1
print(result)

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:
forecast = input()
weather = input()

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

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

Submission status: Accepted

Solution code:
S = list(input())
T = list(input())
c = 0
for i, k in zip(S, T):
  if i == k:
    c += 1
print(c)

Submission status: Accepted

Solution code:
pred = list(input())
res = list(input())

cnt = 0
for i,j in zip(pred,res):
    if i==j:
        cnt +=1

print(cnt)

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
def main():
    S = input()
    T = input()
    forecast_ok = [s == t for s, t in zip(S, T)]
    print(sum(forecast_ok))


if __name__ == "__main__":
    main()

Submission status: Accepted

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

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

ans = 0
count = 0

for x in s:
  if s[count] == t[count]:
    ans += 1
  count += 1
    
print(ans)

Submission status: Accepted

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

count = 0

for i,j in zip(a,b):
  if i==j:
    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()
s2 = input()
cnt = 0
for st, st2 in zip(s, s2):
  if st == st2:
    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=a+1
    else:
        a=a+0
print(a)

Submission status: Accepted

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

cnt = 0
for si, ti in zip(s, t):
    if si == ti:
        cnt += 1
print(cnt)

Submission status: Accepted

Solution code:
string_list=[input() for i in range(2)]
s, t = string_list[0], string_list[1]
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()

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

Submission status: Accepted

Solution code:
l = list(input())
m = list(input())

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
s1 = input()
t1 = input()
s = list(s1)
t = list(t1)
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()
ok = 0
for i in range(3):
    if S[i] == T[i]:
        ok+=1
print(ok)

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

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


print(count)

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
pred = list(input())
res = list(input())

cnt = 0
for i in range(len(pred)):
  if pred[i] == res[i]:
    cnt += 1
  
print(cnt)

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

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

Submission status: Accepted

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

r1 = 0
for i1 in range(3):
    if s1[i1] == s2[i1]:
        r1 += 1

print(r1)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import numpy as np


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

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

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

for i in range(3):
  if yohou[i] == kekka[i]:
    count += 1

print(count)

Submission status: Accepted

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

Submission status: Accepted

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

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:
def solve(S, T):
    count = 0
    for s, t in zip(S, T):
        count += (s == t)
    return count


if __name__ == '__main__':
    S = input()
    T = input()
    answer = solve(S, T)
    print(answer)

Submission status: Accepted

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

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

print(n)

Submission status: Accepted

Solution code:
#-*- coding: utf-8
#  -*-
"""
oj dl https://atcoder.jp/contests/abc116/tasks/abc116_d -d test-d
oj test -d test-d -c "python abc116d.py"
oj test -d test-d -c "python abc116d.py" test-d/sample-3.in
"""
from collections import defaultdict
import sys
import math
from datetime import datetime

def sol(S, T):
    ans = 0
    for i in range(len(S)):
        #print("i:%s, S[i]:%s, T[i]:%s" % (i, S[i], T[i]))
        if S[i] == T[i]:
            ans += 1
    return ans


do_submit = True
#do_submit = False

def input_parse(input_str):
    lines = [x.strip() for x in input_str.split("\n") if x.strip()]
    parsed_lines = [list(map(str, line.split())) for line in lines]
    print(parsed_lines)
    n = int(parsed_lines[0][0])
    k = int(parsed_lines[0][1])
    S = parsed_lines[1][0]
    return n, k, S


if not do_submit:
    a, b, c = input_parse("""
    3 1
    ABC
    """)
    print(sol(a, b, c))

    a, b, c = input_parse("""
    4 3
    CABA
    """)
    print(sol(a, b, c))

else:
    # n, k = list(map(int, input().split()))
    # S = input().split()
    S = input()
    T = input()
    print(sol(S, T))
    # S = input().strip()
    # print(sol(S))

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

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

print(ans)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
S_list = input()
T_list = input()
count = 0

for i in range(0, 3):
  if S_list[i] == T_list[i]:
    count += 1
  else:
    pass
  
print(count)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
expect = list(input())
result = list(input())
answer = 0
for i in range(len(expect)):
  if expect[i] == result[i]:
    answer += 1

print(answer)

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

count = 0
s_seq = [i for i in S]
t_seq = [i for i in T]

for k in range(3):
    if s_seq[k] == t_seq[k]:
        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 range(3):
    if s[i] == t[i] :
        ans = ans + 1

print(ans)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
a = raw_input()
b = raw_input()

count = 0

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

Submission status: Accepted

Solution code:
def main():
    s = list(input())
    t = list(input())
    cnt = 0
    for s_,t_ in zip(s,t):
        if s_==t_:
            cnt +=1
    
    print(cnt)

if __name__ =="__main__":
    main()

Submission status: Accepted

Solution code:
a, b = input().rstrip(), input().rstrip()
print(len(list(filter(lambda z: z[0] == z[1], zip(a, b)))))

Submission status: Accepted

Solution code:
S = input()
List = [input() for i in range(1)]
T = List[0]

Slst = list(S)
Tlst = list(T)
M = 0

for x in range(3):
    if Slst[x] == Tlst[x]:
        M += 1
print(M)

Submission status: Accepted

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

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
  else :
    continue
    
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()
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([v for i,v in enumerate(s) if (t[i] == v)]))

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

Submission status: Accepted

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

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

print(hit_count)

Submission status: Accepted

Solution code:
#!/usr/bin/python3
# -*- coding: utf-8 -*-


S = str(input())
T = str(input())

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

Submission status: Accepted

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

Submission status: Accepted

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

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


if __name__ == "__main__":
    resolve()

Submission status: Accepted

Solution code:
ans = 0

s = input()

ss = input()

for x, y in zip(s, ss):
  if x == y:
    ans += 1

print(ans)

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
S = str(input())
T = str(input())

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

print(counter)

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:
line=list(input())
line2=list(input())

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

Submission status: Accepted

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

Submission status: Accepted

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

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

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:
s1=input()
s2=input()
c=0
for i,j in zip(range(3),range(3)):
    if s1[i]==s2[j]:
      c+=1
print(c)

Submission status: Accepted

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

cnt=0

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

Submission status: Accepted

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

Submission status: Accepted

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

cnt = 0

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

print(cnt)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
s=input()
t=input()
sa=list(s)
ta=list(t)
x=0
if sa[1]==ta[1]:
  x=x+1
if sa[2]==ta[2]:
  x=x+1
if sa[0]==ta[0]:
  x=x+1
print(x)

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
S = list(input())
T = list(input())

count = 0

for s,t in zip(S,T):
    if s==t:
        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
  else:
    continue
    
print(count)

Submission status: Accepted

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


if S[0] == T[0]:
    A +=1
if S[1] == T[1]:
    A +=1
if S[2] == T[2]:
    A +=1
print(A)

Submission status: Accepted

Solution code:
s=list(input())
t=list(input())
p=0
ans=0
while p<3:
  for i in range(3):
    if s[i] == t[i]:
      ans+=1
      p+=1
    else:
      p+=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:
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()
c = input()

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

print(equal)

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
input_yohou = input()
yohou = list(input_yohou)
input_tenki = input()
tenki = list(input_tenki)
num = 0
if yohou[0] == tenki[0]:
  num = num + 1
if yohou[1] == tenki[1]:
  num = num + 1
if yohou[2] == tenki[2]:
  num = num + 1
print(num)

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
def main():
    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)

if __name__ == '__main__':
    main()

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

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

print(cnt)

Submission status: Accepted

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

print(i)

Submission status: Accepted

Solution code:
predict = input()
real = input()
cnt = 0
 
for i,j in zip(predict, real):
  if i == j:
    cnt += 1
    
print(cnt)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

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

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

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


print(cor)

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

Submission status: Accepted

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

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

print(c)

Submission status: Accepted

Solution code:
s1=input()
s2=input()
cnt=0
for i in range(len(s2)):
    if s2[i]==s1[i]:
        cnt+=1
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:
a = input()
b = input()
ans =0
for i in range (3) :
  if a[i] ==b[i]:
    ans+=1
print(ans)

Submission status: Accepted

Solution code:
s = input()
t = input()
counter = 0
for i in range(0, 3):
    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
	else:
		continue
print(A)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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:
# -*- coding: utf-8 -*-
y = input()
t = input()
ylist = list(y)
tlist = list(t)
seikai = 0
for i in range(3):
  if ylist[i] == tlist[i]:
    seikai += 1
    
print(seikai)

Submission status: Accepted

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

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

print(bingo)

Submission status: Accepted

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

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

main()

Submission status: Accepted

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

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

Submission status: Accepted

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

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

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

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:
l1 = input()
l2 = input()

line1 = [l1[i] for i in range(len(l1))]
line2 = [l2[i] for i in range(len(l2))]

count = 0

for i in range(len(line1)):
    if line1[i] == line2[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()

sl = []
for i in s:
    sl.append(i)
tl = []
for j in t:
    tl.append(j)

count = 0
if sl[0] == tl[0]:
    count += 1
if sl[1] == tl[1]:
    count += 1
if sl[2] == tl[2]:
    count += 1
print(count)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
actual = list(input())
predict = list(input())
count = 0
for i, s in enumerate(actual):
  if s == predict[i]:
    count += 1
print(count)

Submission status: Accepted

Solution code:
S = str(input())
T = str(input())
cnt = 0
for i in range(3):
    if S[i] == T[i]:
        cnt = 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:
yosoku=input()
kekka=input()

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

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

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

Submission status: Accepted

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

res = 0

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

print(res)

Submission status: Accepted

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

Submission status: Accepted

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