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

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

Submission status: Accepted

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

while i<=2:
    if S[i]==T[i]:
       count+=1 
    i+=1

print(count)

Submission status: Accepted

Solution code:
def _input():
    pred = list(input())
    actual = list(input())
    return pred, actual

def evaluation(pred, actual):
    hit = 0
    for p, a in zip(pred, actual):
        if p == a:
            hit += 1
    return hit

if __name__ == "__main__":
    pred, actual = _input()
    print(evaluation(pred, actual))

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
s = input()
t = input()
print(sum(c[0]==c[1] for c in zip(s, t)))

Submission status: Accepted

Solution code:
from collections import Counter

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:
A=list(input())
B=list(input())
count=0
for i in range(len(A)):
  if A[i] == B[i]:
    count+=1
print(count)

Submission status: Accepted

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

q = str(input())
a = str(input())

lst_q = list(q)
lst_a = list(a)
len_q = len(lst_q)
ok = 0
for i in range(len_q):
    if lst_q[i] == lst_a[i]:
        ok += 1
print(ok)

Submission status: Accepted

Solution code:
import numpy as np
hoge = []
for i in range(2):
    a = input()
    hoge.append(a)
a=np.count_nonzero([list(hoge[0])[i]==list(hoge[1])[i]  for i in range(3)])
print(a)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
ss = [s for s in raw_input()]
ts = [t for t in raw_input()]
cnt = 0
for s, t in zip(ss, ts):
    if s == t:
        cnt += 1
print cnt

Submission status: Accepted

Solution code:
S = list(input("").strip())
T = list(input("").strip())

L = len(S)

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

print(count)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
a = list(input())
b = list(input())
count = 0

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
X = input()
Y = input()

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

print(count)

Submission status: Accepted

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

print(count)

Submission status: Accepted

Solution code:
s = list(input())

t = list(input())

ans = int(0)

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

Submission status: Accepted

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

cnt = 0

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

print(cnt)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
x=raw_input()
y=raw_input()
t=0
if x[0]==y[0]:
	t=t+1
if x[1]==y[1]:
	t=t+1
if x[2]==y[2]:
	t=t+1
print t

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
import sys
import math
from bisect import bisect_left
from bisect import bisect_right
import collections
import copy
import heapq
from collections import defaultdict
from heapq import heappop, heappush
import itertools
input = sys.stdin.readline

##### リストの 二分木検索 #####
# bisect_left(lists, 3)
# bisect_right(lists, 3)

##### プライオリティキュー #####
# heapq.heapify(a) #リストaのheap化
# heapq.heappush(a,x) #heap化されたリストaに要素xを追加
# heapq.heappop(a) #heap化されたリストaから最小値を削除＆その最小値を出力

# heapq.heappush(a, -x) #最大値を取り出す時は、pushする時にマイナスにして入れよう
# heapq.heappop(a) * (-1) #取り出す時は、-1を掛けて取り出すこと

##### タプルリストのソート #####
# sorted(ans) #(a, b) -> 1st : aの昇順, 2nd : bの昇順
# sorted(SP, key=lambda x:(x[0],-x[1])) #(a, b) -> 1st : aの昇順, 2nd : bの降順
# sorted(SP, key=lambda x:(-x[0],x[1])) #(a, b) -> 1st : aの降順, 2nd : bの昇順
# sorted(SP, key=lambda x:(-x[0],-x[1])) #(a, b) -> 1st : aの降順, 2nd : bの降順

# sorted(SP, key=lambda x:(x[1])) #(a, b) -> 1st : bの昇順
# sorted(SP, key=lambda x:(-x[1])) #(a, b) -> 1st : bの降順

def inputInt(): return int(input())
def inputMap(): return map(int, input().split())
def inputList(): return list(map(int, input().split()))

def main():
	S = input()
	S = S[:-1]
	T = input()
	T = T[:-1]

	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:
import math
import copy
import sys
import fractions
import numpy as np
from functools import reduce

# ===FUNCTION===

def getInputInt():
    inputNum = int(input())
    return inputNum

def getInputListInt():
    outputoData = []
    inputData = input().split()
    outputData = [int(n) for n in inputData]

    return outputData

def getSomeInputInt(n):
    outputDataList = []
    for i in range(n):
        inputData = int(input())
        outputDataList.append(inputData)

    return outputDataList

def getSomeInputListInt(n):
    inputDataList = []
    outputDataList = []
    for i in range(n):
        inputData = input().split()
        inputDataList = [int(n) for n in inputData]
        outputDataList.append(inputDataList)

    return outputDataList

# ===CODE===

s, = map(str, input().split())
t, = map(str, input().split())

slist = list(s)
tlist = list(t)

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

print(ans)

Submission status: Accepted

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

T = input()
real = list(T)

ans = 0

for i in range(3):
    if yohou[i] == real[i]:
        ans = ans+1

print(ans)

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
s = str(input())
t = list(str(input()))
ans=0
for i,a in enumerate(s):
    if a==t[i]:
        ans+=1
print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

print(cnt)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
s1 = raw_input()
s2 = raw_input()
ans = 0
for i in xrange(3):
    ans += s1[i] == s2[i]
print ans

Submission status: Accepted

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

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

print(count)

Submission status: Accepted

Solution code:
# coding:utf-8
a = list(input())
b = list(input())
count = 0

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

Submission status: Accepted

Solution code:
def main():
    S1 = input()
    S2 = input()
    res = 0
    for i, c in enumerate(S1):
        if c == S2[i]:
            res += 1
    print(res)
main()

Submission status: Accepted

Solution code:
s = input()		# 文字列の入力  abcdefg...
t = input()		# 文字列の入力  abcdefg...

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:
pre = list(input())
act = list(input())
counter = 0

for i in range(3):
  if  act[i] in pre[i]:
    counter += 1

print(counter)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
S = list(input())

T = list(input())

count_value = 0

if len(S) <= 3 and len(T) <= 3:
    for s, t in zip(S, T):
        if s == t:
            count_value += 1
            continue
print(count_value)

Submission status: Accepted

Solution code:
S=map(str,input().split())
S=list(S)
S=[t for t in S[0]]
T=map(str,input().split())
T=list(T)
T=[t for t in T[0]]
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()

print([S[i] == T[i] for i in range(len(S))].count(True))

Submission status: Accepted

Solution code:
S = str(input())
T = str(input())
count = 0
if (len(S) == 3 and len(T) ==3):
    if (S[0] == "S" or "C" or "R") and (T[0] == "S" or "C" or "R"):
        if (S[0] == T[0]):
            count += 1
    else:print("error")
    if (S[1] == "S" or "C" or "R") and (T[1] == "S" or "C" or "R"):
        if (S[1] == T[1]):
            count += 1
    else:print("error")
    if (S[2] == "S" or "C" or "R") and (T[2] == "S" or "C" or "R"):
        if (S[2] == T[2]):
            count += 1
    else:print("error")
    print(count)
else:print("error")

Submission status: Accepted

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

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

Submission status: Accepted

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

count = 0

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

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 = count + 1

print(count)

Submission status: Accepted

Solution code:

l1 = list(input())
l2 = list(input())
cnt = 0
for x1, x2 in zip(l1, l2):
    if x1 == x2:
        cnt += 1
print(cnt)

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

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:
a=input()
b=input()
c=[]
d=[]
m=0
for i in a:
    c.append(i)
for i in b:
    d.append(i)
# print(c,d)
for i in range(len(c)):
    if(c[i]==d[i]):
        m+=1
print(m)

Submission status: Accepted

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

test_a()

Submission status: Accepted

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

S = list(S)
T = list(T)

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

Submission status: Accepted

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

print(len([True for s, t in zip(S, T) if s == t]))

Submission status: Accepted

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

S_list = [c for c in S]
T_list = [c for c in T]

if S[0] == T [0] and S[1] == T [1] and S[2] == T [2]:
  print(3)
  exit()
elif (S[0] == T [0] and S[1] == T [1]) or (S[0] == T [0] and S[2] == T [2]) or (S[2] == T [2] and S[1] == T [1]):
  print(2)
  exit()
elif S[0] != T [0] and S[1] != T [1] and S[2] != T [2]:  
  print(0)
  exit()
print(1)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

print(count)

Submission status: Accepted

Solution code:
a = [input().split() for l in range(2)]
forecast = list(str(a[0]))
real = list(str(a[1]))
count = 0
if forecast[2] == real[2]:
  count = count + 1
if forecast[3] == real[3]:
  count = count + 1
if forecast[4] == real[4]:
  count = count + 1
 
print(str(count))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# coding: utf-8
import sys
# import collections

# import bisect
# import math
# import numpy as np
# from fractions import gcd

"""Template"""


class IP:
    """
    入力を取得するクラス
    """

    def __init__(self):
        self.input = sys.stdin.readline

    def I(self):
        """
        1文字の取得に使います
        :return: int
        """
        return int(self.input())

    def S(self):
        """
        1文字の取得(str
        :return: str
        """
        return self.input()

    def IL(self):
        """
        1行を空白で区切りリストにします(int
        :return: リスト
        """
        return list(map(int, self.input().split()))

    def SL(self):
        """
        1行の文字列を空白区切りでリストにします
        :return: リスト
        """
        return list(map(str, self.input().split()))

    def ILS(self, n):
        """
        1列丸々取得します(int
        :param n: 行数
        :return: リスト
        """
        return [int(self.input()) for _ in range(n)]

    def SLS(self, n):
        """
        1列丸々取得します（str
        :param n: 行数
        :return: リスト
        """
        return [self.input() for _ in range(n)]

    def SILS(self, n):
        """
        Some Int LineS
        横に複数、縦にも複数
        :param n: 行数
        :return: list
        """
        return [self.IL() for _ in range(n)]

    def SSLS(self, n):
        """
        Some String LineS
        :param n: 行数
        :return: list
        """
        return [self.SL() for _ in range(n)]


class Idea:
    def __init__(self):
        pass

    def HF(self, p):
        """
        Half enumeration
        半分全列挙です
        pの要素の和の組み合わせを作ります。
        ソート、重複削除行います
        :param p: list : 元となるリスト
        :return: list : 組み合わせられた和のリスト
        """
        return sorted(set(p[i] + p[j] for i in range(len(p)) for j in range(i, len(p))))

    def Bfs2(self, a):
        """
        bit_full_search2
        bit全探索の改良版
        全探索させたら2進数のリストと10進数のリストを返す
        :return: list２つ : １個目 2進数(16桁)  2個目 10進数
        """
        # 参考
        # https://blog.rossywhite.com/2018/08/06/bit-search/
        # https://atcoder.jp/contests/abc105/submissions/4088632
        value = []
        for i in range(1 << len(a)):
            output = []

            for j in range(len(a)):
                if self.bit_o(i, j):
                    """右からj+1番目のiが1かどうか判定"""
                    # output.append(a[j])
                    output.append(a[j])
            value.append([format(i, 'b').zfill(16), sum(output)])

        value.sort(key=lambda x: x[1])
        bin = [value[k][0] for k in range(len(value))]
        val = [value[k][1] for k in range(len(value))]
        return bin, val

    def S(self, s, r=0, m=-1):
        """
        ソート関係行います。色々な設定あります。
        :param s: 元となるリスト
        :param r: reversするかどうか 0=False 1=True
        :param m: （2次元配列）何番目のインデックスのソートなのか
        :return: None
        """
        r = bool(r)
        if m == -1:
            s.sort(reverse=r)
        else:
            s.sort(reverse=r, key=lambda x: x[m])

    def bit_n(self, a, b):
        """
        bit探索で使います。0以上のときにTrue出します
        自然数だからn
        :param a: int
        :param b: int
        :return: bool
        """
        return bool((a >> b & 1) > 0)

    def bit_o(self, a, b):
        """
        bit探索で使います。1のときにTrue出すよ
        oneで1
        :param a: int
        :param b: int
        :return: bool
        """
        return bool(((a >> b) & 1) == 1)

    def ceil(self, x, y):
        """
        Round up
        小数点切り上げ割り算
        :param x: int
        :param y: int
        :return: int
        """
        return -(-x // y)

    def ave(self, a):
        """
        平均を求めます
        :param a: list
        :return: int
        """
        return sum(a) / len(a)

    def gcd(self, x, y):
        if y == 0:
            return x
        else:
            return self.gcd(y, x % y)

    def lcm(self, x, y):
        return (x * y) // self.gcd(x, y)


"""ここからメインコード"""


def main():
    # 1文字に省略
    r, e = range, enumerate
    ip = IP()
    id = Idea()

    """この下から書いてね"""
    s = input()
    t = input()
    ans = 0
    for x, y in zip(s, t):
        if x == y:
            ans += 1
    print(ans)



main()

Submission status: Accepted

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

Submission status: Accepted

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

i = 0

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

print(i)

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()
result=0
if s[:1]==t[:1]:
    result=result+1

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

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

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

k = 0
count = 0
while k < 3:
    if s[k] == t[k]:
        count += 1
    k += 1
print(count)

Submission status: Accepted

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

count = 0

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

print(count)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

print(n)

Submission status: Accepted

Solution code:
yosou = input()
yosoulist = list(yosou)
yosou2 = input()
yosoulist2 = list(yosou2)
count = 0
#はんてい
for i in range(len(yosoulist)):
  if yosoulist[i] == yosoulist2[i]:
    count += 1
print(count)

Submission status: Accepted

Solution code:
G = input()
P = input()
assert len(G) == len(P)
print(sum([1 for g, p in  zip(G, P) if g == p]))

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

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

print(k)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
weather1 = input()
weather2 = input()
match = 0
for i in range(0,3):
    if weather1[i] == weather2[i]:
        match += 1
print(match)

Submission status: Accepted

Solution code:
ls=[input() for i in range(2)]

j=0
for i in range(3):
    if(ls[0][i]==ls[1][i]):
        j+=1
        
print(j)

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
a, b, c = input()  # 3文字の文字列
d, e, f = input()  # 3文字の文字列

if a==d:
  o = 1
else:
  o = 0
  
if b==e:
  p = 1
else:
  p = 0

if c==f:
  q = 1
else:
  q = 0

print(o+p+q)

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

Submission status: Accepted

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

t=0
for i in range(len(yoso)):
    if yoso[i] == result[i]:
        t += 1
    else:
        t += 0
print(t)

Submission status: Accepted

Solution code:

s = input()
t = input()

list(s)
list(t)

if s[0] == t[0] and s[1] == t[1] and s[2] == t[2]:
    print(3)

elif s[0] == t[0] and s[1] == t[1] and s[2] != t[2]:
    print(2)

elif s[0] == t[0] and s[1] != t[1] and s[2] == t[2]:
    print(2)

elif s[0] != t[0] and s[1] == t[1] and s[2] == t[2]:
    print(2)

elif s[0] == t[0] and s[1] != t[1] and s[2] != t[2]:
    print(1)

elif s[0] != t[0] and s[1] != t[1] and s[2] == t[2]:
    print(1)

elif s[0] != t[0] and s[1] == t[1] and s[2] != t[2]:
    print(1)

else:
    print(0)

Submission status: Accepted

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

i = 0
result = 0
for item in [0,0,0]:
    if S[i] == T[i]:
        result += 1
    i += 1

print(result)

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
s = input()
t = input()
ans=(int((s[0]==t[0]))+int((s[1]==t[1]))+int((s[2]==t[2])))

print(ans)

Submission status: Accepted

Solution code:
import sys

s = sys.stdin.readline()
t = sys.stdin.readline()

s = list(s.rstrip('\n'))
t = list(t.rstrip('\n'))

u = list(map(lambda x, y: x == y, s, t))
print(u.count(True))

Submission status: Accepted

Solution code:
str = [input() for i in range(2)]
num = 0
if (str[0][0] == str[1][0]):
    num = num +1
if (str[0][1] == str[1][1]):
    num = num +1
if (str[0][2] == str[1][2]):
    num = num +1
print(num)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
yohou = list(input())
jissai = list(input())
ans = 0

if yohou[0] == jissai[0]:
  ans = ans + 1
if yohou[1] == jissai[1]:
  ans = ans + 1
if yohou[2] == jissai[2]:
  ans = ans + 1
  
print(ans)

Submission status: Accepted

Solution code:
S = str(input())
T = str(input())
judgeList = []

for i in range(3):
    if S[i] == T[i]:
        judgeList.append("true")
print(len(judgeList))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# 2019 9.1
# A Tenki

S = list(input())
T = list(input())

cnt = 0

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

print(cnt)

Submission status: Accepted

Solution code:
s = list(map(str, input()))

t = list(map(str, input()))
cnt = 0
for i in range(0,3):
    if s[i] == t[i]:
        cnt+= 1
    else:
        cnt+=0
print(cnt)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
from sys import stdin
s = stdin.readline().rstrip()
t = stdin.readline().rstrip()
c=0
for i in range(3):
	if s[i] == t[i]:
		c+=1

print(c)

Submission status: Accepted

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

print(cnt)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def solve(s, t):
    assert len(s) == len(t)
    res = 0
    for i, ss in enumerate(s):
        if ss == t[i]:
            res += 1
    return res


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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
a = [raw_input() for i in range(2)]
str1 = list(a[0])
str2 = list(a[1])
count = 0
for i in range(3):
  if str1[i]==str2[i]:
    count += 1

print(count)

Submission status: Accepted

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

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

Submission status: Accepted

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

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

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

Submission status: Accepted

Solution code:

T = input()
S = input()

ans = 0

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
S = input()
T = input()
n = 0
i = 0
while i < len(S):
    if (S[i] == T[i]):
        n += 1
    i += 1
print(n)

Submission status: Accepted

Solution code:
n=list(input())
s=list(input())
count=0
for i in range(3):
    if n[i]==s[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=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 = 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:
import sys
stdin = sys.stdin
sys.setrecursionlimit(10**9)
 
ni = lambda: int(ns())
na = lambda: list(map(int, stdin.readline().split()))
nn = lambda: list(stdin.readline().split())
ns = lambda: stdin.readline().rstrip()

s = ns()
t = ns()

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
s=input()
t=input()
cnt = 0
for idx, c in enumerate(s):
  if t[idx] == c:
    cnt +=1
print(cnt)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

count = 0
for i, e in enumerate(s):
    if(e==t[i]):
        count += 1
        pass
    pass
print(count)

Submission status: Accepted

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