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: Runtime Error

Solution code:
import sys
s = input().split()
weather_forecast = s[0]
weather_real  = s[1]
weather_forecast_s = list(weather_forecast)
weather_real_s = list(weather_real)
hit = 0
for i in range(3):
    if weather_forecast_s[i] == weather_real_s[i]:
        hit+=1
print(hit)

Submission status: Runtime Error

Solution code:
a, b, c = input()
d, e, f = input()
if a == d and b == e and c == f:
  print(3)
elif a == b and b == e:
  print(2)
elif b == e and c == f:
  print(2)
elif c == f and a == b:
  print(2)
elif a == d or b == e or c == f:
  print(1)
else:
  peint(0)

Submission status: Runtime Error

Solution code:
N = int(input())
print(int(N*(N-1)/2))

Submission status: Runtime Error

Solution code:
input_char = input()
a = int(input_char.split()[0])
b = int(input_char.split()[1])
unused_tap = 1
count = 0

while(1):
    if unused_tap >= b:
        print(count)
        break
    
    unused_tap = unused_tap-1 + a 
    count += 1

Submission status: Runtime Error

Solution code:
a, b, c = input()
d, e, f = input()
if a, b, c == d, e, f:
  print(3)
elif a == b and b == e:
  print(2)
elif b == e and c == f:
  print(2)
elif c == f and a == b:
  print(2)
elif a == d or b == e or c == f:
  print(1)
else:
  peint(0)

Submission status: Runtime Error

Solution code:
N = int(input())
As = [[]]
for i in range(N):
    As.append(list(map(int, input().split())))

Cs = [0] * (N + 1)
Ks = [False] * (N + 1)
d = 1
ms = 0
msMax = N * (N - 1) // 2
sw = True
tab = set()
while sw:
    c = 0
    wa = []
    for i in range(1, N + 1):
        if Ks[i]:
            continue
        if Cs[i] == N - 1:
            continue
        a = 0
        b = 0
        if i > As[i][Cs[i]]:
            a = As[i][Cs[i]]
            b = i
        else:
            a = i
            b = As[i][Cs[i]]
        T = a * 10000 + b
        if T in tab:
            ms = ms + 1
            c = c + 1
            if ms == msMax:
                sw = False
                print(d)
                break
            Cs[a] += 1
            Cs[b] += 1
            tab.remove(T)
            wa.append(a)
            wa.append(b)
        else:
            tab.add(T)
            Ks[i] = True
    for i in wa:
        Ks[i] = False
    d += 1
    if c == 0:
        print(-1)
        break

Submission status: Runtime Error

Solution code:
s = sys.argv[1]
t = sys.argv[2]

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

Submission status: Runtime Error

Solution code:
import math
N = int(input())
print(math.floor(1 / 2 * N * (N - 1)))

Submission status: Runtime Error

Solution code:
input_char = input()
a = int(input_char.split()[0])
b = int(input_char.split()[1])
unused_tap = 1
count = 0

if a > b:
    print(1)
    exit()

while(1):
    if unused_tap >= b:
        print(count)
        break
    
    unused_tap = unused_tap-1 + a 
    count += 1

Submission status: Runtime Error

Solution code:
n = int(input())
print( int( n * (n+1)/2 - n) )

Submission status: Runtime Error

Solution code:
a = int(input())

b = int(input())

ans = int(0)

for i in range(1,21):
    if b > a*i-i+1:
            ans += 1
    else:
            ans += 1
            break

print(ans)

Submission status: Runtime Error

Solution code:
input_char = input()
a = int(input_char.split()[0])
b = int(input_char.split()[1])
unused_tap = 1
count = 0

if a > b:
    print(1)
    exit()

while(1):
    if unused_tap >= b:
        print(count + 1)
        break
    
    unused_tap = unused_tap-1 + a 
    count += 1

Submission status: Runtime Error

Solution code:
N = (int(input()))

print(int((1 / 2) * N * (N - 1)))

Submission status: Runtime Error

Solution code:
N = int(input())
HL = list(map(int,input().split()))
HL.append(10**9+1)  #HLの最後に(最大値+1)をappend
cnt = 0
tmp_c = 0

for i in range(N):
    if HL[i] >= HL[i+1]:
        tmp_c += 1
    else:
        if cnt <= tmp_c:
            cnt = tmp_c
            tmp_c = 0
        else:
            tmp_c = 0

print(cnt)

Submission status: Runtime Error

Solution code:
N = int(input())
H = [int(n) for n in input().split()]
Hd = []
for i in range(N-1):
    Hd.append(H[i]-H[i+1])
ans_list = [0]*N
J =0
for i in range(N-1):
    if i < J:
        continue
    if Hd[i] >= 0:
        candidate = 1
        for j in range(i+1,N-1):
            if Hd[j] >= 0:
                candidate += 1
            else:
                J = j
                break
        ans_list[i] = candidate
print(max((ans_list)))

Submission status: Runtime Error

Solution code:
import math

a = int(input())
b = int(input())

x = (b-1) / (a-1)

print(math.ceil(x))

Submission status: Runtime Error

Solution code:
n = int(input())
print(n*(n-1)//2)

Submission status: Runtime Error

Solution code:
n = int(input())
ans = (n * (n + 1) // 2) - n
#ans = int(a)
print(ans)

Submission status: Runtime Error

Solution code:
n = int(input())
a = (n * (n + 1) / 2) - n
ans = int(a)
print(ans)

Submission status: Runtime Error

Solution code:
N = int(input())
H= [int(s) for s in input().split()]

#print(N,H)

t=0
k=0

for i in range(1,N):
#  print("i="+str(i))
  if H[i]-H[i-1]<=0:
    k=k+1
#    print("k="+str(k))
    if k > t:
      t=k
#      print("t="+str(t))
  else:
    k=0
    continue
    
print(k)

Submission status: Runtime Error

Solution code:
N = int(input())

if N == 1:
    print(0)
elif N == 2:
    print(1)
else:
    ans = int((N*(N-1))/2)
    print(ans)

Submission status: Runtime Error

Solution code:
n = int(input())
ans = (n * (n + 1) / 2) - n
print(int(ans))

Submission status: Runtime Error

Solution code:
N = int(input())
H = [int(x) for x in input().split()]
x = 1
ans = 1

for i in range(1,len(H)):
    if H[i] <= H[i-1]:
        x += 1
        if x > ans:
            ans = x
    else:
        x = 1
print(ans)

Submission status: Runtime Error

Solution code:
a, b = map(int, input().split())
count = 1

for i in range(20):
    if b > count:
        count += a-1
    else:
        break
if -(-count // a) >= 1:
    print(-(-count // a))
else:
    print(0)

Submission status: Runtime Error

Solution code:
a, b = map(int, input().split())
for i in range(30):
  if (a + (a-1) * i) >= b:
    break
print(i+1)

Submission status: Runtime Error

Solution code:
N = int(input())
H_list = input().split(" ")
H_LIST = []

for i in range(0, N):
    H_LIST.append(int(H_list[i]))
 
max_count = 0

for i in range(0, N):
    S = H_LIST[i]
    count = 0
    for j in range(i + 1, N):
        if S >= H_LIST[j]:
            S = H_LIST[j]
            count += 1
        else:
            pass
    if max_count < count:
        max_count = count

print(max_count)

Submission status: Runtime Error

Solution code:
cnt = int(input())
nums = list(input().split(" "))
current = 0
maxCnt = 0

for i in range(cnt - 1):
  if int(nums[i]) >= int(nums[i+1]):
    current += 1
  else:
    if maxCnt < current:
    	maxCnt = current
    current = 0

if maxCnt < current:
  maxCnt = current

print(maxCnt)

Submission status: Runtime Error

Solution code:
N=int(input())
if N%2==0:
    s=N/2
    print(int(s*(N-1)))
if N%2==1:
    s=(N-1)/2
    print(int(s*N))

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
N=int(input())
print(sum(range(1,N)))

Submission status: Runtime Error

Solution code:
ｓ

Submission status: Runtime Error

Solution code:
N=int(input())
print(int(N/2*(N-1)))

Submission status: Runtime Error

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

Submission status: Runtime Error

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

def main():
    N=int(input())  #数値入力 「N」だけの入力のとき
    H=list(map(int, input().split()))  #リスト入力 「a1 a2 a3 ...」みたいな配列のような入力のとき
    ans = 0
    a = 0
    for i in range(N):
        a = 0
        if ans > N-i-1:
            break
        else:
            for j in range(N-i):
                if i+j == N-1:
                    if a > ans:
                        ans = a
                    break
                elif H[i+j] >= H[i+j+1]:
                    a += 1
                else:
                    if a > ans:
                        ans = a
                    break
    print(ans)

if __name__ == '__main__':
    main()

Submission status: Runtime Error

Solution code:
x,y = map(str,input().split())
a=np.count_nonzero([list(x)[i]==list(y)[i]  for i in range(len(list(x)))])
print(a)

Submission status: Runtime Error

Solution code:
x,y = map(int,input().split())
a=np.count_nonzero([list(x)[i]==list(y)[i]  for i in range(len(list(x)))])
print(a)

Submission status: Runtime Error

Solution code:
A,B = map(int,input().split())
c=0
count=0

while(c<B):
    if(count<1):
        c+=A
        count+=1
    else:
        c+=(A-1)
        count+=1
if(B<1.2):
    count*=0
print(count)

Submission status: Runtime Error

Solution code:
x,y = map(int,input().split())
print(np.count_nonzero([list(x)[i]==list(y)[i]  for i in range(len(list(x)))]))

Submission status: Runtime Error

Solution code:
A = input()
B = input()
count = 1


while A < B:
    A += A
    count += 1
    if A > B:
        break

print(count)

Submission status: Runtime Error

Solution code:
import math
a,b = map(int,input().split())
c = math.ceil(b/a)
if a*c-c >=b:
    print(c)
else:
    print(c+1)

Submission status: Runtime Error

Solution code:
n = int(input())
if n > 1:
    ans = n*(n-1)/2
else:
    ans = 0
print(ans)

Submission status: Runtime Error

Solution code:
    l = list(map(int, input().split()))
     
    if l[0]<2 or l[0]>20 or l[1]<1 or l[1]>20:
    	sys.exit()
     
    a = 0
    while l[0] <= l[1]:
    	l[1] = l[1] - l[0]
    	a += 1
    print(a)

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
l = list(map(int, input().split()))

if l[0]<2 or l[0]>20 or l[1]<1 or l[1]>20:
	sys.exit()


a = 1
while l[0] < l[1]:
	l[1] = l[1] - l[0]
	a += 1
print(a)

Submission status: Runtime Error

Solution code:
N = int(input())
print(int((N+1)*N/2))

Submission status: Runtime Error

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

count = None

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

Submission status: Runtime Error

Solution code:
n=int(input())
x=[int(n) for n in input().split()]
a=[0]*n
for i in range(1,n):
  if x[i-1]>=x[i]:
    a[i]=1
m=0
c=0
for i in a:
  if i==1:
    c+=1
  else:
    m=max(c,m)
    c=0
print(m)

Submission status: Runtime Error

Solution code:
l = list(map(int, input().split()))

if l[0]<2 or l[0]>20 or l[1]<1 or l[1]>20:
	sys.exit()

a = 0
while l[0] <= l[1]:
	l[1] = l[1] - l[0]
	a += 1
print(a)

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
a, b = [int(c) for c in input().split(' ')]
num = 0
bdash = b
if b == 1:
    num = 0
    bdash = -1
while bdash > 0:
    if bdash == a:
        num = num+1
        break
    elif bdash > a:
        num = num+1
        bdash = bdash - (a - 1)
    elif bdash < a:
        num = num + 1
        break
print(num)

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
import math
A=list(map(int,input().split()))
print(math.ceil(A[1]/A[0]))

Submission status: Runtime Error

Solution code:
a, b = map(int,input().split())

n = 1
while True:
    if b == 1:
        print(0)
        break
    elif (a-1) * (n-1) + a >= b:
        print(n)
        break
    else:
        n+=1

Submission status: Runtime Error

Solution code:
import math
a, b = map(int, input().split())
if b != 1:
    if b> a:
        print(math.ceil((b-a)/(a-1)+1))
    else:
        print(math.ceil(b/a))
else:
    print(0)

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
a, b=list(map(int,input().split()))
count=0
for i in range(0,21):
    if i*a<= b:
        count=count+1
print(count)

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
A,B = map(int, input().split())
count = 0
socketnumber = A
while socketnumber < B:
    socketnumber += (A-1)
    count += 1
count += 1
print (count)

Submission status: Runtime Error

Solution code:
import math
A,B=list(map(int,input().split()))
print(math.ceil(B/A))

Submission status: Runtime Error

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

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
import sys

if sys.platform =='ios':
    sys.stdin=open('input_file.txt')
    
    
    
N=int(input())
l=list(map(int,input().split()))
cnt=0
a=0
for i in range(N-1):
	if l[i]>=l[i+1]:
		cnt+=1
	else:
		if cnt>=a:
			a=cnt
			cnt=0
		else:
			cnt=0
	
if cnt>=a:
	a=cnt	
print(a)

Submission status: Runtime Error

Solution code:
s,t=map(str,input().split())
count=0
for i in range(3):
    if s[i]==t[i]:
        count=count+1
print(count)

Submission status: Runtime Error

Solution code:
# coding: utf-8
S = input().rstrip().split("")
T = input().rstrip().split("")
 
tekichu = 0
 
for i in range(3):
	if S[i] == T[i]:
		tekichu += 1
 
print(tekichu)

Submission status: Runtime Error

Solution code:
#include <bits/stdc++.h>

int main(){
    std::string s,t;
    std::cin>>s>>t;
    int count =0;
    for (int i = 0; i < 3; i++)
    {
        if(s[i]==t[i]){
            count++;
        }
    }
    std::cout<<count;
    return 0;
}

Submission status: Runtime Error

Solution code:
a, b = map(int, input().split())
if a>=b:
	print(1)
else:
	print(str(b//a+1))

Submission status: Runtime Error

Solution code:
AB = input().split(" ")
A = int(AB[0])
B = int(AB[1])

kuti = 1
count = 0 #tap

while kuti < B:
  kuti -= 1
  kuti += A
  count += 1

print(count)

Submission status: Runtime Error

Solution code:
import sys

A,B = map(int,input().split())

for _ in range(1,10000):
    if( (A-1)*(_-1)+A >= B):
        print(_)
        break

Submission status: Runtime Error

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

count = 0

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
#配列うけとる
a = [input() for i in range(2)]
str1 = list(a[0])
str2 = list(a[1])
count = 0
for i range(3):
  if str1[i]==str2[i]:
    count += 1
    
print(count)

Submission status: Runtime Error

Solution code:
S = list(map(int, input().split()))
T = list(map(int, input().split()))

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

print(result)

Submission status: Runtime Error

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

c = 0

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

print(c)

Submission status: Runtime Error

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

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

Submission status: Runtime Error

Solution code:
yohou = input().rstrip().split("")
tenki = input().rstrip().split("")
 
tekichu = 0
 
for i in range(3):
	if yohou[i] == tenki[i]:
		tekichu += 1
 
print(tekichu)

Submission status: Runtime Error

Solution code:
A = str(input())
B = str(input())
C = 0
for i in range(3):
  if A[i] == B[i]:
    C += 0
print(c)

Submission status: Runtime Error

Solution code:
yohou = input().rstrip().split("")
tenki = input().rstrip().split("")
 
tekichu = 0
 
for i in range(3):
	if yohou[i] == tenki[i]:
	tekichu += 1
 
print(tekichu)

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
predict = raw_input()

actual = raw_input()

count = 0

for index in range(0, len(predict)):
    if predict[index] == actual[index]:
        count += 1

print (count)

Submission status: Runtime Error

Solution code:
a, b = map(int, input().split())
ct = 1
k = 0
while True:
    if ct >= b:
        break
    k += 1
    ct += a - 1
print(k)

Submission status: Runtime Error

Solution code:
def main(S, T):
    count = 0

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

    return count


if __name__ == "__main__":
    S, T = map(str, input().split())
    print(main(S, T))

Submission status: Runtime Error

Solution code:
s=input()
t=input()
if s[0]==t[0] and s[1]==t[1] and s[2]==t[2]:
    print("3")
elif (s[0]==t[0] and s[1]==t[1])or(s[1]==t[1] and s[2]==t[2])or(s[3]==t[3] and s[2]==t[2]):
    print("2")
elif s[0]==t[0] or s[1]==t[1] or s[3]==t[3]:
    print("1")
else:
    print("0")

Submission status: Runtime Error

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

ans = 0

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

elif S[1] == T[1] :
	ans += 1

elif S[2] == T[2] :
	ans += 1

print(ans)

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
a = [input().split() for l in range(2)]
count = 0
if a[0][0] == a[1][0]:
  count = count + 1
if a[0][1] == a[1][1]:
  count = count + 1
if a[2][0] == a[2][0]:
  count = count + 1
 
print(count)

Submission status: Runtime Error

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

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

Submission status: Runtime Error

Solution code:
yohou = input().split("")
tenki = input().split("")
 
tekichu = 0
 
for i in range(0,3):
  if yohou[i] == tenki[i]:
    tekichu += 1
 
print(tekichu)

Submission status: Runtime Error

Solution code:
l1=list(map(int,input().split()))
l2=list(map(int,input().split()))
w=len(l1)
all=0
for i in range(0,w):
    if (l1[i]==l2[i]):
        all=all+1
print(all)

Submission status: Runtime Error

Solution code:
S=list(map(int.input().split()))
T=list(map(int.input().split()))
x==0
for i in range(2):
  if S[i]==T[i]:
    x=x+1
  else:
    x=x
print(x)

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:

def MAP():
    return map(int, input().split())

a,b=MAP()

t=1
cnt=0
while True:
    if b <= t:
        break
    t -= 1
    t += a
    cnt += 1
print(cnt)

Submission status: Runtime Error

Solution code:
in_pred = input()
in_real = input()

i = 0
for a in in_pred:
  for b in in_real:
    if a == b:
      i += 1
      
return i

Submission status: Runtime Error

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

Submission status: Runtime Error

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

ans = 0

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

print(ans)

Submission status: Runtime Error

Solution code:
#include<iostream>
#include<string>
using namespace std;

int main(){
  string S, T;
  cin >> S;
  cin >> T;
  int i=0;
  if(S[0] == T[0]){
  	i++;
  }
  if(S[1] == T[1]){
  	i++;
  }
  if(S[2] == T[2]){
  	i++;
  }
  cout << i;
  return 0;
}

Submission status: Runtime Error

Solution code:
a = [input().split() for l in range(3)]
count = 0
if a[0][0] == a[1][0]:
  count = count + 1
if a[0][1] == a[1][1]:
  count = count + 1
if a[2][0] == a[2][0]:
  count = count + 1

print(count)

Submission status: Runtime Error

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

S = S.split()
T = T.split()

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

Submission status: Runtime Error

Solution code:
yohou[] = input().split("")
tenki[] = input().split("")

tekichu = 0

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

print(tekichu)

Submission status: Runtime Error

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: Runtime Error

Solution code:
A, B = map(int, input().split())
ans = 1


while True:
    if A > B:
        break
    else:
        A += A
        ans += 1
print(ans)

Submission status: Runtime Error

Solution code:
#include<iostream>
#include<string>
using namespace std;

int main(){
  string S, T;
  cin >> S;
  cin >> T;
  int i=0;
  if(S[0] == T[0]){
  	i++;
  if(S[1] == T[1]){
  	i++;
  if(S[2] == T[2]){
  	i++;
  }
  cout << i;
  return 0;
}

Submission status: Runtime Error

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

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

print(counter)

Submission status: Runtime Error

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: Runtime Error

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: Runtime Error

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

Submission status: Runtime Error

Solution code:
S = list(map(int,input().split()))
L = list(map(int,input().split()))
n = 0
for i in range(3):
  if S[i] == L[i]:
    n += 1
print(n)

Submission status: Runtime Error

Solution code:
SSR
SSR

Submission status: Runtime Error

Solution code:
predict = input()
real = input()
cnt = 0

for i,j in zip(predict, real):
  if i == j:
    cnt += 1
    
print(cnt

Submission status: Runtime Error

Solution code:
T = input()
count = 0

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

Submission status: Runtime Error

Solution code:
S = list(map(int,input()split()))
L = list(map(int,input()split()))
n = 0
for i in range(3):
  if S[i] == L[i]:
    n += 1
print(n)

Submission status: Runtime Error

Solution code:
x = input().split("")
y = input().split("")
i = 0
for n in range(3):
	if x[n] == y[n]:
		i += 1

print(i)

Submission status: Runtime Error

Solution code:
S = input()
C = input()
cnt = 0

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

Submission status: Runtime Error

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

print(count)

Submission status: Runtime Error

Solution code:
#-*- coding: utf-8
#  -*-
"""
oj dl https://atcoder.jp/contests/abc116/tasks/abc116_d -d test-d
oj test -d test-d -c "python abc116d.py"
oj test -d test-d -c "python abc116d.py" test-d/sample-3.in
"""
from collections import defaultdict
import sys
import math
from datetime import datetime

def sol(S, T):
    ans = 0
    for i in len(S):
        if S[i] == T[i]:
            ans += 1
    return ans


do_submit = True
#do_submit = False

def input_parse(input_str):
    lines = [x.strip() for x in input_str.split("\n") if x.strip()]
    parsed_lines = [list(map(str, line.split())) for line in lines]
    print(parsed_lines)
    n = int(parsed_lines[0][0])
    k = int(parsed_lines[0][1])
    S = parsed_lines[1][0]
    return n, k, S


if not do_submit:
    a, b, c = input_parse("""
    3 1
    ABC
    """)
    print(sol(a, b, c))

    a, b, c = input_parse("""
    4 3
    CABA
    """)
    print(sol(a, b, c))

else:
    # n, k = list(map(int, input().split()))
    # S = input().split()
    S = input().split()
    T = input().split()
    print(sol(S, T))
    # S = input().strip()
    # print(sol(S))

Submission status: Runtime Error

Solution code:
s=str(input())
l=str(input())
count=0
if s[0]=l[0]:
    count+=1
if s[1]=l[1]:
    count+=1
if s[2]=l[2]:
    count+=1
print(count)

Submission status: Runtime Error

Solution code:
s=list(map(str,input().split()))
t=list(map(str,input().split()))
c=0
for i in range(3):
  if s[i]==t[i]:
    c=c+1
print(c)

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
S = list(map(int,input().split()))
T = list(map(int,input().split()))
c = 0
for x in range(S):
  if S[x] == T[x]:
    c += 1
print(c)

Submission status: Runtime Error

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: Runtime Error

Solution code:
ans = 0

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

print(ans)

Submission status: Runtime Error

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

Submission status: Runtime Error

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

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

print(count)

Submission status: Runtime Error

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

Submission status: Runtime Error

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

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

print(ans)

Submission status: Runtime Error

Solution code:
a, b = map(str, input().split())
n = 0
for i in range(2):
  if a[i] == b[i]:
    n += 1
print(n)

Submission status: Runtime Error

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

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

ptint(count)

Submission status: Runtime Error

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

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

Submission status: Runtime Error

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

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
#include <bits/stdc++.h>

using namespace std;

int main() {
  string s, t;
  cin >> s >> t;
  int res = 0;
  for (int i = 0; i < 3; i++) {
    if (s[i] == t[i]) res++;
  }
  cout << res << endl;

  return 0;
}