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

Submission status: Accepted

Solution code:
p_s = input()
a_s = input()

result = 0

for p, a in zip(p_s, a_s):
  if p == a:
    result += 1

print(result)

Submission status: Accepted

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

ans = 0

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

print(ans)

Submission status: Accepted

Solution code:
import sys

s= sys.stdin.readline()
t= sys.stdin.readline()
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()
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:
S = input()
T = input()
print (sum([1 for i in range(3) if S[i] == T[i]]))

Submission status: Accepted

Solution code:
import math,string,itertools,fractions,heapq,collections,re,array,bisect,sys,copy,functools
import time

sys.setrecursionlimit(10**7)
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 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 pf(s): return print(s, flush=True)
def pe(s): return print(str(s), file=sys.stderr)
def JA(a, sep): return sep.join(map(str, a))
def JAA(a, s, t): return s.join(t.join(map(str, b)) for b in a)

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

    return r


print(main())

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

Submission status: Accepted

Solution code:
#coding:utf-8
s = input()
t = input()

match = 0

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

print(match)

Submission status: Accepted

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

s = input()
t = input()

c = 0
if s[0] == t[0]:
    c += 1
if s[1] == t[1]:
    c += 1
if s[2] == t[2]:
    c += 1

print(c)

Submission status: Accepted

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

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

print(ans)

Submission status: Accepted

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

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

print(res)

Submission status: Accepted

Solution code:
import collections


cot = 0
S1 = input()
S2 = input()
for c1,c2 in zip(S1,S2):
    if c1 == c2 :
        cot += 1
print(cot)

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:
a = input()
b = input()
ans =0
for i,j in zip(a,b):
    if i==j:
        ans +=1

print(ans)

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
S=input()
T=input()
cnt = 0
for i in range(3):
    cnt += int(S[i]==T[i])

print(cnt)

Submission status: Accepted

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


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


# Generated by 1.1.4 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()

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

Submission status: Accepted

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

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

print(count)

Submission status: Accepted

Solution code:
import math, string, itertools, fractions, heapq, collections, re,  array, bisect, sys, random, time, copy, functools, os, pdb
sys.setrecursionlimit(10**7)
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 [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 _I(): return int(sys.stdin.readline())
def _F(): return float(sys.stdin.readline())
def _pf(s): return print(s, flush=True)
def perr(s): return print(s, file=sys.stderr)

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:
ans = 0
ctr = 0
S = input()
A = input()

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

print(ans)

Submission status: Accepted

Solution code:
S = input()
R = input()
count = 0
for s,r in zip(S,R):
    if s == r:
        count += 1
print(count)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

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

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

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

cnt = 0

for i, j in zip(a, b):
  cnt += int(i == j)

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


if __name__ == "__main__":
    main()

Submission status: Accepted

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

Submission status: Accepted

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

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:
import sys
from collections import defaultdict
from heapq import *
sys.setrecursionlimit(10**8)

input = sys.stdin.readline

def main():
    """ 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,t=input(),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 in range(len(s)):
    if s[i] == t[i]:
        count += 1
        
print(count)

Submission status: Accepted

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

ans = 0

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

Submission status: Accepted

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

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

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 collections import defaultdict, deque, Counter
import sys
import heapq
import math

# input = sys.stdin.readline

sys.setrecursionlimit(1000000000)

MIN = -10 ** 9
MOD = 10 ** 9 + 7


def main():
    s = input()
    t = input()
    # N = int(input())
    # A, B = [int(a) for a in input().split()]
    # B = [int(a) for a in input().split()]
    # A = [
    #     [int(a) for a in input().split()]
    #     for _ in range(N)
    # ]
    # print(A + B)
    print(sum(1 for a,b in zip(s,t) if a==b))


if __name__ == '__main__':
    main()

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

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

print(int(res))

Submission status: Accepted

Solution code:
import sys

stdin = sys.stdin
na = lambda: map(int, stdin.readline().split())
ns = lambda: stdin.readline().rstrip()
ni = lambda: int(ns())
def main():
  s = ns()
  t = ns()

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

  print(cnt)

main()

Submission status: Accepted

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

Submission status: Accepted

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

S = list(input())
T = list(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()
ans = 0
for i in range(3):
    if s[i:i+1] == t[i:i+1]:
        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:
def main():
    S = input()
    T = input()
    count = 0
    for i in range(3):
        if S[i] == T[i]: count += 1
    return count
if __name__ == '__main__':
    print(main())

Submission status: Accepted

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

ans = 0
for Si, Ti in zip(S, T):
    if Si == Ti: ans += 1

print(ans)

Submission status: Accepted

Solution code:
import sys,collections as cl,bisect as bs
sys.setrecursionlimit(100000)
mod = 10**9+7
Max = sys.maxsize
def l(): #intのlist
    return list(map(int,input().split()))
def m(): #複数文字
    return map(int,input().split())
def onem(): #Nとかの取得
    return int(input())
def s(x): #圧縮
    a = []
    aa = x[0]
    su = 1
    for i in range(len(x)-1):
        if aa != x[i+1]:
            a.append([aa,su])
            aa = x[i+1]
            su = 1
        else:
            su += 1
    a.append([aa,su])
    return a
def jo(x): #listをスペースごとに分ける
    return " ".join(map(str,x))
def max2(x): #他のときもどうように作成可能
    return max(map(max,x))
def In(x,a): #aがリスト(sorted)
    k = bs.bisect_left(a,x)
    if k != len(a) and a[k] ==  x:
        return True
    else:
        return False


a = list(input())
b = list(input())
co = 0

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

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:
import sys
from heapq import heappop, heappush
from operator import itemgetter
from collections import deque, defaultdict, Counter
from bisect import bisect_left, bisect_right
input = sys.stdin.readline
sys.setrecursionlimit(10 ** 7)
MOD = 10**9 + 7
INF = float('inf')

def sol():
    S = input().rstrip()
    T = input().rstrip()

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

    print(ans)


sol()

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:
# 2019/09/01
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 = str(input())
T = str(input())
ct = 0
for i in range(3):
    if S[i]==T[i]:
        ct+=1
print(ct)

Submission status: Accepted

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

print(count)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

ans = 0

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

Submission status: Accepted

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

import sys

def input(): return sys.stdin.readline().strip()
def list2d(a, b, c): return [[c] * b for i in range(a)]
def list3d(a, b, c, d): return [[[d] * c for j in range(b)] for i in range(a)]
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 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

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

s  = lambda: input()

S = s()
T = s()

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

print(count)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
S = 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()
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 x,y in zip(S,T):
    if x == y:
        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(len(S)):
    if S[i]==T[i]:
        ans+=1

print(ans)

Submission status: Accepted

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

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

print(cnt)

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
def li():
    return list(map(int, input().split()))


if __name__ == "__main__":
    s = input()
    t = input()

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

Submission status: Accepted

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


def solve(S: str, T: str):
    counter = 0
    for s, t in zip(S, T):
        if s == t:
            counter += 1
    print(counter)
    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()
count=0
for i in range(len(s)):
    if s[i]==t[i]:
        count+=1
        
print(count)

Submission status: Accepted

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

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

Submission status: Accepted

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

if __name__ == "__main__":
    f_a()

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

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

print(ans)

Submission status: Accepted

Solution code:
from sys import stdin
S = (stdin.readline().rstrip())
T = (stdin.readline().rstrip())
ans = 0
for i,j in zip(S,T):
    if i == j:
        ans += 1
print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

ans = 0

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

print(ans)

Submission status: Accepted

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

c=0

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

print(c)

Submission status: Accepted

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

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

count = 0
if a[0] == s[0]:
  count += 1
if a[1] == s[1]:
  count += 1
if a[2] == s[2]:
  count += 1
  
print(count)

Submission status: Accepted

Solution code:
import math
import copy
from operator import mul
from functools import reduce
from collections import defaultdict
from collections import Counter
from collections import deque
# 直積 A={a, b, c}, B={d, e}:のとき，A×B={(a,d),(a,e),(b,d),(b,e),(c,d),(c,e)}: product(A, B)
from itertools import product
# 階乗 P!: permutations(seq), 順列 {}_len(seq) P_n: permutations(seq, n)
from itertools import permutations
# 組み合わせ {}_len(seq) C_n: combinations(seq, n)
from itertools import combinations
# 一次元累積和
from itertools import accumulate
from bisect import bisect_left, bisect_right
from heapq import heappush, heappop

import re
# import numpy as np
# from scipy.misc import comb

# 再帰がやばいとき
import sys
sys.setrecursionlimit(10**9)

def inside(y, x, H, W):
    return 0 <= y < H and 0 <= x < W

# 四方向: 右, 下, 左, 上
dy = [0, -1, 0, 1]
dx = [1, 0, -1, 0]
 
def i_inpl(): return int(input())
def l_inpl(): return list(map(int, input().split()))
def line_inpl(x): return [i_inpl() for _ in range(x)]

INF = int(1e30)
MOD = int(1e9)+7 # 10^9 + 7

# field[H][W]
def create_grid(H, W, value = 0):
    return [[ value for _ in range(W)] for _ in range(H)]

########

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

Submission status: Accepted

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

if __name__ == '__main__':
    Solution().main()

Submission status: Accepted

Solution code:
#A
S = input()
T = 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
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:
# -*- coding: utf-8 -*-
from sys import stdin
# import numpy as np
# import sys
# sys.setrecursionlimit(10**4)

def _li(): return list(map(int, stdin.readline().split()))
def _li_(): return list(map(lambda x: int(x)-1, stdin.readline().split()))
def _lf(): return list(map(float, stdin.readline().split()))
def _ls(): return stdin.readline().split()
def _i(): return int(stdin.readline())
def _f(): return float(stdin.readline())
def _s(): return stdin.readline()[:-1]


S = _s()
T = _s()

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

Submission status: Accepted

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

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 elem1, elem2 in zip(s, t):
    if elem1 == elem2:
        cnt += 1
print(cnt)

Submission status: Accepted

Solution code:
import sys

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

    print(ans)

if __name__ == "__main__":
    resolve()

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

Submission status: Accepted

Solution code:
import sys, re, os
from collections import deque, defaultdict, Counter
from math import ceil, sqrt, hypot, factorial, pi, sin, cos, radians
from itertools import permutations, combinations, product, accumulate
from operator import itemgetter, mul
from copy import deepcopy
from string import ascii_lowercase, ascii_uppercase, digits
from fractions import gcd
 
def input(): return sys.stdin.readline().strip()
def INT(): return int(input())
def MAP(): return map(int, input().split())
def S_MAP(): return map(str, input().split())
def LIST(): return list(map(int, input().split()))
def S_LIST(): return list(map(str, input().split()))

sys.setrecursionlimit(10 ** 9)
INF = float('inf')
mod = 10 ** 9 + 7

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

count = 0
for i in range(len(S)):
    if S[i] == T[i]:
        count += 1
# a, b = MAP()
# n = INT()
# a, b, c = MAP()

print(count)

Submission status: Accepted

Solution code:
def getlist():
    return 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()
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(len(S)):
  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(len(S)):
    if S[i] == T[i]:
        cnt += 1

print(cnt)

Submission status: Accepted

Solution code:
S = input()
T = input()
#N,A,B = map(int,input().split())
#X_list = list(map(int,input().split()))
#X1_list = [int(input()) for i in range(N)]
#X2_list = [list(map(int,input().split())) for i in range(N)]
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()
r=0
for i in range(3):
    if S[i]==T[i]:
        r+=1
print(r)

Submission status: Accepted

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

Submission status: Accepted

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

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

print(cnt)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
s = input()
t = input()
c = sum(1 if i == j else 0 for i, j in zip(s, t))
print(c)

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 =  sys.stdin.readline().rstrip()
T =  sys.stdin.readline().rstrip()

cnt = 0

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

print(cnt)

Submission status: Accepted

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

count = 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:
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 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 cs, ct in zip(s, t):
    if cs == ct:
        cnt += 1

print(cnt)

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
import sys
INF = float("inf")


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


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

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

Submission status: Accepted

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

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

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

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

print(ans)

Submission status: Accepted

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

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

print(count)

Submission status: Accepted

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


if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
s = 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 a,b in zip(s,t):
    if a == b:
        ans += 1
print(ans)

Submission status: Accepted

Solution code:
#A問題
S = list(str(input()))
T = list(str(input()))
count = 0
for i in range(3):
    if S[i] == T[i]:
        count+=1
        
print(count)

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

cnt = 0
for f, r in zip(s, t):
    if f == r:
        cnt += 1

print(cnt)