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

sys.setrecursionlimit(10 ** 6)
int1 = lambda x: int(x) - 1
printV = lambda x: print(*x, sep="\n")
printH = lambda x: print(" ".join(map(str,x)))
def IS(): return sys.stdin.readline()[:-1]
def II(): return int(sys.stdin.readline())
def MI(): return map(int, sys.stdin.readline().split())
def LI(): return list(map(int, sys.stdin.readline().split()))
def LI1(): return list(map(int1, sys.stdin.readline().split()))
def LII(rows_number): return [II() for _ in range(rows_number)]
def LLI(rows_number): return [LI() for _ in range(rows_number)]
def LLI1(rows_number): return [LI1() for _ in range(rows_number)]

def main():
	S = IS()
	T = IS()
	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 i in range(0,len(S)):
    if S[i] == T[i]:
        c = c+1
print (c)

Submission status: Accepted

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

def main():
  s = input().strip()
  t = input().strip()
  count = 0
  for sc, tc in zip(s, t):
    if sc == tc:
      count += 1
  print(count)

if __name__=='__main__':
  main()

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import numpy as np
from functools import reduce
from operator import add,sub,mul,truediv
from fractions import gcd

s = input()
t = input()

ans= 0
for i in range(len(s)):
    if s[i] == t[i]:ans = 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:
ex=list(input())
wea=list(input())
days=0

for i in range(3):
    if ex[i]==wea[i]:
        days+=1

print(days)

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

Submission status: Accepted

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

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

Submission status: Accepted

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

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

print(U)

Submission status: Accepted

Solution code:
#python3

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

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

print(correct)

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

s, t = sys.stdin.read().split()

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

# if S[0] == T[0]:
#     a=1
# if S[1] == T[1]:
#     b=1
# if S[2] == T[2]:
#     c=1

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

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, t = [input() for _ in range(2)]

print([s[i] == t[i] for i in range(3)].count(True))

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:
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 i,j in zip(S,T):
    if i==j:
        cnt+=1
print(cnt)

Submission status: Accepted

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

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

Submission status: Accepted

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

print(cnt)

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
# https://atcoder.jp/contests/abc139/tasks/abc139_a

s = input()
t = input()
c = 0
for se, te in zip(s, t):
    if se == te:
        c += 1
print(c)

Submission status: Accepted

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

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 = 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()
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,t=input(),input()
print(sum([s[i]==t[i] for i in range(3)]))

Submission status: Accepted

Solution code:
import sys
read=sys.stdin.buffer.read
S,T=map(iter,read().split())
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()

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

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

print(match)

Submission status: Accepted

Solution code:
import sys, re
from collections import deque, defaultdict, Counter
from math import ceil, sqrt, hypot, factorial, pi, sin, cos, radians
from itertools import accumulate, permutations, combinations, product
from operator import itemgetter, mul
from copy import deepcopy
from string import ascii_lowercase, ascii_uppercase, digits
from bisect import bisect, bisect_left
from fractions import gcd
from heapq import heappush, heappop
from functools import reduce
def input(): return sys.stdin.readline().strip()
def INT(): return int(input())
def MAP(): return map(int, input().split())
def LIST(): return list(map(int, input().split()))
sys.setrecursionlimit(10 ** 9)
INF = float('inf')
mod = 10 ** 9 + 7

S = input()
T = input()

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

print(total)

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
a,b = input(),input()
c = 0
for i in[0,1,2]:
    c = c + int(a[i] == b[i])
print(c)

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

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
s = input()
t = input()
Slist = list(s)
Tlist = list(t)
num = 0
for n in range(3):
  if Slist[n] == Tlist[n]:
    num = num + 1
    
print(num)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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


def main():
    S = list(input())
    T = list(input())
    print(sum([1 for s, t in zip(S, T)if s == t]))


if __name__ == "__main__":
    main()

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:
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()
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 _s, _t in zip(s, t):
    if _s == _t:
        ans += 1

print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

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

judgelist = [0]

if S[0] == T[0]:
    judgelist.append(1)
if S[1] == T[1]:
    judgelist.append(1)
if S[2] == T[2]:
    judgelist.append(1)

print(sum(judgelist))

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
s,t=list(input()),list(input())
print(sum(x==y for x,y in zip(s,t)))

Submission status: Accepted

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

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

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

n = sum(1 for s, t in zip(S, T) if s == t)
print(n)

Submission status: Accepted

Solution code:

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

Submission status: Accepted

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

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

print(ans)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
S, T = [list(input()) for i in range(2)]
t = 0
for i in range(3):
  if S[i] == T[i]:
    t += 1
  else:
    continue
print(t)

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

print(count)

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()
l = len(S)
ans = 0
for n in range(l):
    if S[n] == T[n]:
        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 cs, ct, in zip(s, t):
    if cs == ct:
        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:
#139 a
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=c+1

print(c)

Submission status: Accepted

Solution code:
import sys
# stdin.readlineをopen(~以下で書き換えた
row = sys.stdin.readline
S = list(row())
R = list(row())

print(sum([1 for i in range(3) if S[i] == R[i]]))

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.6 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(3):
  if s[i] == t[i]:
    count += 1
    
print(count)

Submission status: Accepted

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

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

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

print(count)

Submission status: Accepted

Solution code:
def solve(inp):
    S = inp.readline().strip()
    T = inp.readline().strip()

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

    return str(r)


def main():
    import sys
    result = solve(sys.stdin)
    if result:
        print(result)


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:
#139
S = input()
T = input()
res=0

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

Submission status: Accepted

Solution code:
# ABC 139 A

S = input()
T = input()

res = 0

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

print(res)

Submission status: Accepted

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

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

print(p)

Submission status: Accepted

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

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

Submission status: Accepted

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

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

print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

print(count)

Submission status: Accepted

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

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

Submission status: Accepted

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

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

print(ret)

Submission status: Accepted

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

count = 0

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

print(count)

Submission status: Accepted

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

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

print(count)

Submission status: Accepted

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

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

print(ans)

Submission status: Accepted

Solution code:
a = list(input())
b = list(input())
print(sum([int(a[i] == b[i]) for i in range(len(a))]))

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:
a,b,c =input()
d,e,f =input()
cnt = 0
if a == d:
    cnt = cnt +1
if b == e:
    cnt = cnt +1
if c == f:
    cnt = 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 main():
    s = input()
    t = input()

    count = 0

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

    print(count)

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

Submission status: Accepted

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

ss = list(S)
ts = list(T)

size = len(ss)

counter = 0
for i in range(size):
    if ss[i] == ts[i]:
        counter += 1

print(counter)

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

Submission status: Accepted

Solution code:
import math, string, itertools, fractions, heapq, collections, re, array, bisect, copy, functools, random
import sys
from collections import deque, defaultdict, Counter; from heapq import heappush, heappop
from itertools import permutations, combinations, product, accumulate, groupby
from bisect import bisect_left, bisect_right, insort_left, insort_right
from operator import itemgetter as ig

def main():
    sys.setrecursionlimit(10 ** 7)
    inf = 10 ** 20; INF = float("INF"); ans = 0; tmp = 0; cnt = 0; ansli = []; tmpli = []; candili = []; stillset = set()
    eps = 1.0 / 10 ** 10; mod = 10 ** 9 + 7
    dd = [(-1, 0), (0, 1), (1, 0), (0, -1)]; ddn = dd + [(-1, 1), (1, 1), (1, -1), (-1, -1)]; ddn9 = ddn + [(0, 0)]
    """for dx, dy in dd:
            nx = j + dx; ny = i + dy
                if 0 <= nx < w and 0 <= ny < h:"""
    def wi(): return list(map(int, sys.stdin.readline().split()))
    def wip(): return [int(x) - 1 for x in sys.stdin.readline().split()]#WideIntPoint
    def ws(): return sys.stdin.readline().split()
    def i(): return int(sys.stdin.readline())
    def s(): return input()
    def s_list(): return list(input())
    def hi(n): return [i() for _ in range(n)]
    def hs(n): return [s() for _ in range(n)]#HeightString
    def mi(n): return [wi() for _ in range(n)]#MatrixInt
    def num__grid(n): return [[int(i) for i in sys.stdin.readline().split()[0]] for _ in range(n)]#NumberGrid
    def mip(n): return [wip() for _ in range(n)]
    def ms(n): return [ws() for _ in range(n)]
    def grid(n): return [s_list() for _ in range(n)]

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

Submission status: Accepted

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

count = 0
if S[0] == T[0]:
    count = count +1
else:
        pass
if S[1] == T[1]:
    count = count +1
else:
        pass
if S[2] == T[2]:
    count = count +1
else:
        pass
  
print(count)

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

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

print(ans)

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

Submission status: Accepted

Solution code:
"""
author : halo2halo
date : 10, Jan, 2020
"""

import sys

read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
sys.setrecursionlimit(10 ** 7)

S, T = read().split()
print(len([x for x,y in zip(S,T) if x==y]))

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:
x = input()
y = input()
num = 0
for i in range(3):
    if x[i] == y[i]:
        num = num + 1
    else:
        num = num
print(num)

Submission status: Accepted

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

count = 0

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

print(count)

Submission status: Accepted

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

correct = 0

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

print(correct)

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([S[i] == T[i] for i in range(3)].count(True))

Submission status: Accepted

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

    print(res)

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

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

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

Submission status: Accepted

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

counter = 0

if S[1] == T[1]:
    counter += 1

if S[2] == T[2]:
    counter += 1

if S[0] == T[0]:
    counter += 1

print(counter)

Submission status: Accepted

Solution code:
import sys
import math
import heapq
sys.setrecursionlimit(10**7)
INTMAX = 9223372036854775807
INTMIN = -9223372036854775808
DVSR = 1000000007
def POW(x, y): return pow(x, y, DVSR)
def INV(x, m=DVSR): return pow(x, m - 2, m)
def DIV(x, y, m=DVSR): return (x * INV(y, m)) % m
def LI(): return [int(x) for x in input().split()]
def LF(): return [float(x) for x in input().split()]
def LS(): return input().split()
def II(): return int(input())
def FLIST(n):
    res = [1]
    for i in range(1, n+1): res.append(res[i-1]*i%DVSR)
    return res
def gcd(x, y):
    if x < y: x, y = y, x
    div = x % y
    while div != 0:
        x, y = y, div
        div = x % y
    return y
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()

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

Submission status: Accepted

Solution code:
from sys import stdin


def fetch_one_line():
    return stdin.readline().rstrip()


def fetch_int_input():
    return [int(s) for s in fetch_one_line().split()]


def fetch_inputs(times):
    return [fetch_one_line() for _ in range(times)]


def fetch_int_inputs(times):
    return [[int(s) for s in fetch_one_line()] for _ in range(times)]


def fetch_ints_inputs(times):
    return [fetch_int_input() for _ in range(times)]

pred = fetch_one_line()
fact = fetch_one_line()

print(sum([p == f for p, f in zip(pred, fact)]))

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 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 x, y in zip(s, t):
   if x == y:
      ans += 1
print(ans)