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

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

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

input = lambda: stdin.readline()[:-1]
main()

Submission status: Accepted

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

Submission status: Accepted

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

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

if __name__ == '__main__':
    main()

Submission status: Accepted

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

print(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:
def resolve():
    s = input()
    t = input()
    count = 0

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

    print(count)




resolve()

Submission status: Accepted

Solution code:
predict_tenki = input()
actual_tenki  = input()

result_count = 0
for i in range(len(predict_tenki)):
  if predict_tenki[i] == actual_tenki[i]:
    result_count += 1
    
print(result_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
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:
#!/usr/bin/env python

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

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

    return ans


if __name__ == '__main__':
    print(main())

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
import bisect
import heapq
import math
import random
import sys
from collections import Counter, defaultdict, deque
from decimal import ROUND_CEILING, ROUND_HALF_UP, Decimal
from functools import lru_cache, reduce
from itertools import combinations, combinations_with_replacement, product, permutations
from operator import add, mul, sub

sys.setrecursionlimit(100000)
input = sys.stdin.readline


def read_int():
    return int(input())


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


def read_float():
    return float(input())


def read_float_n():
    return list(map(float, input().split()))


def read_str():
    return input().strip()


def read_str_n():
    return list(map(str, input().split()))


def error_print(*args):
    print(*args, file=sys.stderr)


def mt(f):
    import time

    def wrap(*args, **kwargs):
        s = time.time()
        ret = f(*args, **kwargs)
        e = time.time()

        error_print(e - s, 'sec')
        return ret

    return wrap


@mt
def slv(S, T):
    return len(list(filter(lambda x: x[0] == x[1], zip(S, T))))


def main():
    S = read_str()
    T = read_str()
    print(slv(S, T))


if __name__ == '__main__':
    main()

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

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

Submission status: Accepted

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

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

print(cnt)

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 main():
    f = list(input())
    r = list(input())
    res = 0
    for i,j in zip(f,r):
        if i==j:
            res += 1
    print(res)

if __name__ == '__main__':
    main()

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

Submission status: Accepted

Solution code:
S = str(input())
T = str(input())
ans = int(0)
count = int(0)


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

Submission status: Accepted

Solution code:
s = input()
t = input()
print(sum(i == j for i, j in zip(s, t)))

Submission status: Accepted

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

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

print(cnt)

Submission status: Accepted

Solution code:
#!/usr/bin/env python
from __future__ import division, print_function

import os
import sys
from io import BytesIO, IOBase

if sys.version_info[0] < 3:
    from __builtin__ import xrange as range
    from future_builtins import ascii, filter, hex, map, oct, zip


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

    c = 0
    for i, j in zip(s, t):
        c += i == j

    print(c)


# region fastio

BUFSIZE = 8192


class FastIO(IOBase):
    newlines = 0

    def __init__(self, file):
        self._fd = file.fileno()
        self.buffer = BytesIO()
        self.writable = "x" in file.mode or "r" not in file.mode
        self.write = self.buffer.write if self.writable else None

    def read(self):
        while True:
            b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
            if not b:
                break
            ptr = self.buffer.tell()
            self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr)
        self.newlines = 0
        return self.buffer.read()

    def readline(self):
        while self.newlines == 0:
            b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
            self.newlines = b.count(b"\n") + (not b)
            ptr = self.buffer.tell()
            self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr)
        self.newlines -= 1
        return self.buffer.readline()

    def flush(self):
        if self.writable:
            os.write(self._fd, self.buffer.getvalue())
            self.buffer.truncate(0), self.buffer.seek(0)


class IOWrapper(IOBase):
    def __init__(self, file):
        self.buffer = FastIO(file)
        self.flush = self.buffer.flush
        self.writable = self.buffer.writable
        self.write = lambda s: self.buffer.write(s.encode("ascii"))
        self.read = lambda: self.buffer.read().decode("ascii")
        self.readline = lambda: self.buffer.readline().decode("ascii")


def print(*args, **kwargs):
    """Prints the values to a stream, or to sys.stdout by default."""
    sep, file = kwargs.pop("sep", " "), kwargs.pop("file", sys.stdout)
    at_start = True
    for x in args:
        if not at_start:
            file.write(sep)
        file.write(str(x))
        at_start = False
    file.write(kwargs.pop("end", "\n"))
    if kwargs.pop("flush", False):
        file.flush()


if sys.version_info[0] < 3:
    sys.stdin, sys.stdout = FastIO(sys.stdin), FastIO(sys.stdout)
else:
    sys.stdin, sys.stdout = IOWrapper(sys.stdin), IOWrapper(sys.stdout)

input = lambda: sys.stdin.readline().rstrip("\r\n")

# endregion

if __name__ == "__main__":
    main()

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:
Y = input()
G = input()
Ans = 0
for i in range(3):
  if Y[i] == G[i]:
    Ans = Ans + 1

print(Ans)

Submission status: Accepted

Solution code:
import sys
INPUT = lambda: sys.stdin.readline().rstrip()
sys.setrecursionlimit(10 ** 9)


def main():
    S = INPUT()
    T = INPUT()

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

    print(cnt)


if __name__ == '__main__':
    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 = input()
T = input()

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

print(ans)

Submission status: Accepted

Solution code:
import sys, math; from collections import deque; readline=sys.stdin.readline;

S = readline().strip()
T = readline().strip()

print([s==t for s,t in zip(S, T)].count(True))

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

Submission status: Accepted

Solution code:
def main():

    s = str(input())
    t = str(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)

if __name__ == '__main__':
    main()

Submission status: Accepted

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

sum = 0

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

print(sum)

Submission status: Accepted

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

atari = 0

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

print(atari)

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
sys.setrecursionlimit(int(1e6))

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

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

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
"""
AtCoder A
"""

import sys, math, random
import numpy as np

# N = int(input())
# A = list(map(int,input().split())) # N row 1 column
# A = [int(input()) for _ in range(N)] # 1 row N column
# S = str(input()) # str(input()) == input() -> 'abc'
# S = list(input()) # abc -> ['a','b','c']
# S.replace('ABC','X') # "testABCABC" -> "testXX"
# S=numpp.assaray(S)=="#"
inf = 10**20
eps = 1.0 / 10**10
mod = 10**9+7
dd = [(-1,0),(0,1),(1,0),(0,-1)]
ddn = [(-1,0),(-1,1),(0,1),(1,1),(1,0),(1,-1),(0,-1),(-1,-1)]

def LI(): return list(map(int, sys.stdin.readline().split()))
def LLI(): return [list(map(int, l.split())) for l in sys.stdin.readlines()]
def LLS(): return [list(sys.stdin.readline().rstrip()) for _ in sys.stdin.readlines()]
def LI_(): return [int(x)-1 for x in sys.stdin.readline().split()]
def LF(): return [float(x) for x in sys.stdin.readline().split()]
def LS(): return sys.stdin.readline().split()
def I(): return int(sys.stdin.readline())
def F(): return float(sys.stdin.readline())
def S(): return input()



def main():
    A=S()
    B=S()
    out=0
    if A[0]==B[0]:
        out+=1
    if A[1]==B[1]:
        out+=1
    if A[2]==B[2]:
        out+=1
    print(out)


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

Submission status: Accepted

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

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

Submission status: Accepted

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

cnt = 0

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
stdin = sys.stdin
sys.setrecursionlimit(100001)
mod = 10**9 + 7

ns = lambda: stdin.readline().rstrip()
ni = lambda: int(ns())
na = lambda: list(map(int, stdin.readline().split()))
sa = lambda h: [list(map(int, stdin.readline().split())) for i in range(h)]

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

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

print (count)

Submission status: Accepted

Solution code:
import sys
input = sys.stdin.readline
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()
l = 0
for i in range(len(s)):
    if s[i]==t[i]:
        l+=1
print(l)

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

Submission status: Accepted

Solution code:
# coding: utf-8
# Your code here!
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:
# coding: utf-8

S = input()
T = input()

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

print(res)

Submission status: Accepted

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

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

print(cnt)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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


if __name__ == "__main__":
    main()

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

c = 0

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

Submission status: Accepted

Solution code:
pred = input()
real = input()
out = 0

for i in range(3):
  if pred[i] == real[i]:
    out += 1
print(out)

Submission status: Accepted

Solution code:
import sys
import math
from fractions import gcd
# import queue
# from collections import Counter
# from itertools import accumulate
# from functools import reduce

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

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

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

big_prime = 1000000007

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

## 数値
 =  int(sys.stdin.readline())
 =  map(int, sys.stdin.readline().split())
 =  list(map(int, sys.stdin.readline().split()))
 =  [list(map(int,list(sys.stdin.readline().split()))) for i in range(N)]
"""
s =  list(sys.stdin.readline().rstrip())
t =  list(sys.stdin.readline().rstrip())
c=0
for i in range(3):
    if s[i]==t[i]:
        c+=1
print(c)

Submission status: Accepted

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

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

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

# output
print(ans)

Submission status: Accepted

Solution code:
import sys


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

print(res)

Submission status: Accepted

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

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:
#coding: utf-8
s = str(input())
t = str(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:
def main():
    S = input()
    T = input()
    cnt = 0
    for i in range(len(S)):
        if S[i] == T[i]:
            cnt += 1


    print(cnt)


main()

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

ret = 0

for i in range(3):
    if forecast[i] == result[i]:
        ret += 1

print(ret)

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:
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 = 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:
a=list(input())
b=list(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()
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()

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

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

print(ans)

Submission status: Accepted

Solution code:
#インポート
import sys

#入力用
def ILI(): return list(map(int, sys.stdin.readline().rstrip().split()))
def ISI(): return map(int, sys.stdin.readline().rstrip().split())
def II(): return int(sys.stdin.readline().rstrip())
def ISS(): return sys.stdin.readline().rstrip().split()
def IS(): return sys.stdin.readline().rstrip()

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

Submission status: Accepted

Solution code:
# coding: utf-8

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

Submission status: Accepted

Solution code:
#A
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:
import sys
def main():
    input = sys.stdin.readline
    S = input()
    T = input()

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

    print(ans)

if __name__ == '__main__':
    main()

Submission status: Accepted

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

print(count)

Submission status: Accepted

Solution code:
import sys
input = sys.stdin.readline
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:
a = input()
b = input()
ans = sum(a[i] == b[i] for i in range(3))
print(ans)

Submission status: Accepted

Solution code:
a = input()
b = input()
ans = sum(1 if x==y else 0 for x,y in zip(a,b))
print(ans)

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
import numpy as np

if __name__ == '__main__':
    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:
a, b, c = input()
d, e, f = input()
result=0
if a==d:
    result+=1
if b==e:
    result+=1
if c==f:
    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
    else:
        c=c

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

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

print(count)

Submission status: Accepted

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

Submission status: Accepted

Solution code:

S1 = input()
S2 = input()

Ans = 0
for i in range(3):
  if S1[i]==S2[i]:
    Ans += 1

print(Ans)

Submission status: Accepted

Solution code:
s, t = [input() for _ in range(2)]
print(sum(x==y for x, y in zip(s, t)))

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=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:
while True:
    try:
        W1 = input()
        W2 = input()
        
        ans = 0
        for w1, w2 in zip(W1, W2):
            if w1==w2:
                ans += 1
        print(ans)
    except:
        break

Submission status: Accepted

Solution code:
def main():
    yoso=input()
    kekka=input()
    cnt=0
    for c1,c2 in zip(yoso,kekka):
        if c1==c2:cnt+=1
    print(cnt)

main()

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 = raw_input()
T = raw_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 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
  else:
    ans=ans
print(ans)

Submission status: Accepted

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

first = input()
second = input()

r = 0
for a, b in zip(first, second):
    if a == b:
        r += 1


print(r)

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
S = input().strip()
T = input().strip()
count = 0
for s, t in zip(S, T):
	if s == t:
		count += 1
print(count)

Submission status: Accepted

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

count = 0
for i in range(len(yohou)):
    if yohou[i] == tenki[i]:
        count +=1
    else:
        pass

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

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

Submission status: Accepted

Solution code:
#double underscore makes a class variable or a class method private
mod = 1000000007
ii = lambda :  int(input())
si = lambda :  input()
dgl = lambda : list(map(int, input()))
f = lambda :   map(int, input().split())
il = lambda :  list(map(int, input().split()))
it = lambda :  tuple(map(int, input().split()))
ls = lambda :  list(input())
c=0
for i, j in zip(si(),si()):
    c+=(i==j)
print(c)

Submission status: Accepted

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

answer = 0

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

print(answer)

Submission status: Accepted

Solution code:
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:
import sys
def get_array(): return list(map(int , sys.stdin.readline().strip().split()))
def get_ints(): return map(int, sys.stdin.readline().strip().split())
def input(): return sys.stdin.readline().strip()

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 = 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:
# ABC139a
import sys
input = sys.stdin.readline
sys.setrecursionlimit(10**6)

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

print(c)

Submission status: Accepted

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

cnt = 0

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

Submission status: Accepted

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

counter = 0

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

print(counter)

Submission status: Accepted

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

ans = (S[0] == T[0]) + (S[1] == T[1]) + (S[2] == T[2])
print(ans)

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:
def makelist(n, m):
    return [[0 for _ in range(m)] for _ in range(n)]

# n = int(input())
# a, b = map(int, input().split())
# 

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+=1
print(cnt)

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 -*-
#ABC139
import sys
#sys.setrecursionlimit(100000)


#n=int(input())
s=input()
t=input()


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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

from collections import deque, defaultdict
import itertools as ite
import sys
import math
import re

sys.setrecursionlimit(1000000)

INF = 10 ** 18
MOD = 10 ** 9 + 7

S = raw_input()
T = raw_input()

ans = 0

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

print ans

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
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:
# -*- coding: utf-8 -*-
"""
Created on Sun Sep  1 20:21:30 2019

@author: Yamazaki Kenichi
"""

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)):
    c += s[i]==t[i]
print(c)