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

Submission status: Accepted

Solution code:
n = input()
m = input()

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

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:
#coding:utf-8

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

cnt = 0

for (i, j) in zip(S, T):
    if i == j:
        cnt += 1

print(cnt)

Submission status: Accepted

Solution code:
import sys

stdin = sys.stdin

ni = lambda: int(ns())
na = lambda: list(map(int, stdin.readline().split()))
ns = lambda: stdin.readline().rstrip()

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

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 input(): return sys.stdin.readline().strip()


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

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

Submission status: Accepted

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

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

print(cnt)

Submission status: Accepted

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

print(ans)

Submission status: Accepted

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

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


if __name__ == '__main__':
    main()

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

Submission status: Accepted

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

myans = 0

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

print(myans)

Submission status: Accepted

Solution code:
pred = input()
actu = input()

cnt = 0
for p, a in zip(pred,actu):
    if p == a:
        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()
a = 0
for s,t in zip(S, T):
    if s==t:
        a+=1
print(a)

Submission status: Accepted

Solution code:
import sys
input = sys.stdin.readline
sys.setrecursionlimit(10 ** 7)

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

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

print(count)

Submission status: Accepted

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

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

def input(): return sys.stdin.readline()[:-1]
def ceil(x, y=1): return int(-(-x // y))
def INT(): return int(input())
def MAP(): return map(int, input().split())
def LIST(): return list(map(int, input().split()))
def MATINT(h): return [list(map(int, input().split())) for _ in range(h)]
def MATSTR(h): return [input() for _ in range(h)]
def Yes(): print('Yes')
def No(): print('No')
def YES(): print('YES')
def NO(): print('NO')
sys.setrecursionlimit(10 ** 9)
inf = float('inf')
mod = 10 ** 9 + 7

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
s = input()
t = input()
ans = 0 
i = 0
for i in range(3):
  if s[i] == t[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:
# m = map(int, raw_input().split())
# a, b, c = map(int, raw_input().split())
s = raw_input()
t = raw_input()
ans = 0
for i in xrange(3):
  if s[i] == t[i]:
    ans += 1
print ans
# l = raw_input().split()
# n = int(raw_input())

Submission status: Accepted

Solution code:
S = list(input())
T = list(input())
print(len([0 for s, t in zip(S, T) if s == t]))

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:
#!/usr/bin/env python3
import sys


def solve(S: str, T: str):
    count =0
    for s, t in zip(S, T):
        if s==t:
            count+=1
    print(count)
    return


# Generated by 1.1.5 https://github.com/kyuridenamida/atcoder-tools  (tips: You use the default template now. You can remove this line by using your custom template)
def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    S = next(tokens)  # type: str
    T = next(tokens)  # type: str
    solve(S, T)

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

cnt = 0

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

print(cnt)

Submission status: Accepted

Solution code:
s = input()
t = input()
print(sum(1 for ss, tt in zip(s, t) if ss == tt))

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
sys.setrecursionlimit(10**7)
def LI(): return [int(x) for x in sys.stdin.readline().split()]
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 II(): return int(sys.stdin.readline())
def SI(): return sys.stdin.readline().strip()
INF = 10 ** 18
MOD = 10 ** 9 + 7

debug = True
#debug = False

def dprint(*objects):
    if debug == True:
        print(*objects)

def solve():
    s = SI()
    t = SI()

    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)

solve()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
s = input().rstrip()
t = input().rstrip()
ans = 0
for a, b in zip(s, t):
    if a == b:
        ans += 1
print(ans)

Submission status: Accepted

Solution code:
S = input().strip()
T = input().strip()
print(sum(s == t for s, t in zip(S, T)))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# coding: UTF-8
import sys
#sys.setrecursionlimit(n)
import heapq
import re
import bisect
import random
import math
import itertools
from collections import defaultdict, deque
from copy import deepcopy
from decimal import *

readl= lambda: list(map(int, sys.stdin.readline().split()))
readt= lambda: tuple(map(int, sys.stdin.readline().split()))
read = lambda: sys.stdin.readline().rstrip()
readi = lambda: int(read())
readmi = lambda: map(int, sys.stdin.readline().split())
readms = lambda: map(str, sys.stdin.readline().split())

a = list(read())
b = list(read())

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

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

sys.setrecursionlimit(10**7)
INF = 10 ** 18
MOD = 10 ** 9 + 7
def LI(): return list(map(int, sys.stdin.readline().split()))
def II(): return int(sys.stdin.readline())
def LS(): return list(map(list, sys.stdin.readline().split()))
def S(): return str(sys.stdin.readline())

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

if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
print(sum(1 for a, b in zip(input(), input()) if a == b))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
def solve():
    res = sum(s==t for s,t in zip(input(), input()))
    return str(res)

if __name__ == '__main__':
    print(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()
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(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:
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 s, t in zip(S, T):
    cnt += (s==t)
print(cnt)

Submission status: Accepted

Solution code:
S=input()
T=input()
print(len([(x,y) for (x,y) in zip(list(S),list(T)) if x==y]))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys

s = input()
t = input()

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

print(ans)

Submission status: Accepted

Solution code:
"""
N = int(input())
N,M = map(int,input().split())
N_list = list(map(int,input().split()))
"""




S = input()
T = input()


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

Submission status: Accepted

Solution code:
import sys

sys.setrecursionlimit(4100000)


def inputs(num_of_input):
    ins = [input() for i in range(num_of_input)]
    return ins


def solve(inputs):
    S = inputs[0]
    T = inputs[1]

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


def string_to_int(string):
    return list(map(lambda x: int(x), string.split()))


if __name__ == "__main__":
    ret = solve(inputs(2))
    print(ret)

Submission status: Accepted

Solution code:
import sys
MAX_INT = int(10e9)
MIN_NUM = -MAX_INT
mod = 1000000007
sys.setrecursionlimit(1000000000)
def IL(): return list(map(int,input().split()))
def SL(): return input().split()
def I(): return int(sys.stdin.readline())
def S(): return input()

s = S()
t = S()

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

Submission status: Accepted

Solution code:
import sys
def input():
    return sys.stdin.readline()[:-1]
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
sys.setrecursionlimit(1000000)
from math import factorial, ceil, floor
from bisect import bisect_right as bsr
from operator import itemgetter as ig
from collections import defaultdict as dd
from collections import deque, Counter as cnt

# お約束
args = None
INF = float("inf")
MOD = int(1e9 + 7)
def input(*ps):
    if type(ps[0]) is list:
        return [input(*ps[0][:-1]) for _ in range(ps[0][-1])]
    elif len(ps) == 1:
        return ps[0](next(args))
    else:
        return [p(next(args)) for p in ps]
def nlist(n, v):
    if not n: return [] if type(v) is list else v
    return [nlist(n[1:], v) for _ in range(n[0])]

# エントリーポイント
def main():
    S = input(str)
    T = input(str)

    count = 0
    for a, b in zip(list(S), list(T)):
        if a == b:
            count += 1
    print(count)

if __name__ == '__main__':
    args = iter(sys.stdin.read().split())
    main()

Submission status: Accepted

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

Submission status: Accepted

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

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

print(ans)

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
def solve():
    data = read()
    result = think(data)
    write(result)


def read():
    return [read_line(), read_line()]


def read_int(n):
    return list(map(lambda x: int(x), read_line().split(' ')))[:n]


def read_float(n):
    return list(map(lambda x: float(x), read_line().split(' ')))[:n]


def read_line(n=0):
    if n == 0:
        return input().rstrip()
    else:
        return input().rstrip()[:n]


def think(data):
    d1, d2 = data[0], data[1]
    count = 0
    for i in range(len(d1)):
        if d1[i] == d2[i]:
            count += 1
    return count


def write(result):
    print(result)


if __name__ == '__main__':
    solve()

Submission status: Accepted

Solution code:
from sys import stdin
s = stdin.readline().rstrip()
t = stdin.readline().rstrip()
count = 0

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

Submission status: Accepted

Solution code:
# a
s = input()
t = input()
print(sum([int(i == j) for i, j in zip(s, t)]))

Submission status: Accepted

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

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

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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


def solve(S, T):
    return sum(s == t for s, t in zip(S, T))


if __name__ == '__main__':
    S = input()
    T = input()

    ans = solve(S, T)

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

Submission status: Accepted

Solution code:
import sys
import math
from copy import deepcopy
from collections import deque, defaultdict
from operator import mul
from functools import reduce
sys.setrecursionlimit(20000000)

# input = sys.stdin.readline


def main():
    n = input()
    m = input()

    ans = 0

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

    print(ans)
    

if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
import math
import collections
import heapq
from collections import defaultdict
import sys
input = sys.stdin.readline
sys.setrecursionlimit(10 ** 7)


def primes(n):
    is_prime = [True] * (n + 1)
    is_prime[0] = False
    is_prime[1] = False
    for i in range(2, int(n**0.5) + 1):
        if not is_prime[i]:
            continue
        for j in range(i * 2, n + 1, i):
            is_prime[j] = False
    return [i for i in range(n + 1) if is_prime[i]]


def is_prime(n):
    if n == 1:
        return False

    for k in range(2, int(math.sqrt(n)) + 1):
        if n % k == 0:
            return False

    return True


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

    print(ans)


if __name__ == '__main__':
    main()

Submission status: Accepted

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

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# coding: utf-8
# Your code here!

import sys
sys.setrecursionlimit(10**6)
readline = sys.stdin.readline

#n = int(input())
#n,m = [int(i) for i in readline().split()]
#lr = [[int(i)-1 for i in readline().split()] for _ in range(q)]

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

Submission status: Accepted

Solution code:
import math
import queue

mod = 1e9+7

def swap(a,b):
    return (b,a)

def gcd(a,b):
    if (a<b):
        a,b = swap(a,b)
    if (b==0):
        return a
    else:
        return gcd(b,a%b)

def divisors(a):
    divisors = []
    for i in range(1,int(a**0.5)+1):
        if a%i==0:
            divisors.append(i)
            if i!=a//i:
                divisors.append(a//i)
    return divisors

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

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:
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:
#!/usr/bin/env python
# coding: utf-8

def ri():
    return int(input())

def rl():
    return list(input().split())

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

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


if __name__ == '__main__':
    main()

Submission status: Accepted

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

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

print(c)

Submission status: Accepted

Solution code:
import sys
sys.setrecursionlimit(10**7)
def LI(): return [int(x) for x in sys.stdin.readline().split()]
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 II(): return int(sys.stdin.readline())
def SI(): return sys.stdin.readline().strip()
INF = 10 ** 18
MOD = 10 ** 9 + 7

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

    count = 0
    for s_, t_ in zip(S, T):
        if s_ == t_:
            count += 1

    print(count)


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:
def func():
    S = input()
    T = input()

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

    print(count)


if __name__ == '__main__':
    func()

Submission status: Accepted

Solution code:
import sys
def input():
    return sys.stdin.readline()[:-1]

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

if __name__=='__main__':
    code()

Submission status: Accepted

Solution code:
"""
N = int(input())
A, B = map(int,input().split())
lst = [list(map(int,input().split())) for i in range(M)]
A = list(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 = input()
T = input()
cnt = 0
for i in range(3):
    if S[i:i+1]==T[i:i+1]:
        cnt += 1

print(cnt)

Submission status: Accepted

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

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

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def main(): 
    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)

if __name__ == "__main__":
    main()

Submission status: Accepted

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

Submission status: Accepted

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

print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

for x in range(3):
    if a[x] == b[x]:
        c += 1

print(c)

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

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

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

print(res)

Submission status: Accepted

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

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

print(ans)

Submission status: Accepted

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

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

Submission status: Accepted

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


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

print(ans)

Submission status: Accepted

Solution code:
import sys

def main():
    input = sys.stdin.readline
    S = str(input().strip())
    T = str(input().strip())

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

    return cnt


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

Submission status: Accepted

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

print(sum(a == b for a, b in zip(s, t)))

Submission status: Accepted

Solution code:
import math
from functools import reduce
from collections import deque
import sys
sys.setrecursionlimit(10**7)

def s(generator, splitter, mapper):
    return [ mapper(s) for s in generator().split(splitter) ]

# スペース区切りの入力を読み込んで数値リストにして返します。
def get_nums_l():
    return [ int(s) for s in input().split(" ")]

# 改行区切りの入力をn行読み込んで数値リストにして返します。
def get_nums_n(n):
    return [ int(input()) for _ in range(n)]

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

Submission status: Accepted

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

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

print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

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

print(val)

Submission status: Accepted

Solution code:
from sys import stdin


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


if __name__ == "__main__":
    main()