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:
S, T = input().split()

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

c = 0

if b == 1:
    c = 0
elif b / a == 1:
    c = b // a
else:
    c = b // a + 1

print(c)

Submission status: Runtime Error

Solution code:
# -*- coding: utf-8 -*-
import sys
import math
from numpy import arange

N=input()
A=[ map(int, sys.stdin.readline().split()) for _ in range(N) ]
L=[]

for x,y in A:
	if x==0 and y==0: continue
	si=float(y)/(x**2+y**2)**0.5
	L.append( (math.degrees(math.asin(si)),(x**2+y**2)**0.5) )


ans=0
for d_kouho in arange(0.0,360.1,0.01):
	ans_kouho=0
	for d,l in L:
		#print d,d-d_kouho,math.cos(math.radians(d-d_kouho)),l*math.cos(math.radians(d-d_kouho))
		ans_kouho+=l*math.cos(math.radians(d-d_kouho))
	ans=max(ans,ans_kouho)

print ans

Submission status: Runtime Error

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

Solution code:
S=input
print(sum(u==v for u,v in zip(S(),T())))

Submission status: Runtime Error

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

Submission status: Runtime Error

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

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

print(count)

Submission status: Runtime Error

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

Submission status: Runtime Error

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

print(sum(int(a==b) for a,b zip(S,T)))

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
a, b = list(map(int, input().split()))
number = 1
outlet_number = a
while outlet_number <= b:
    outlet_number += a - 1
    number += 1
print(number)

Submission status: Runtime Error

Solution code:
a, b = list(map(int, input().split()))
number = 1
outlet_number = a
while outlet_number < b:
    outlet_number += a - 1
    number += 1
print(number)

Submission status: Runtime Error

Solution code:
a, b = list(map(int, input().split()))
number = 1
while a =< b:
    a += a - 1
    number += 1
print(number)

Submission status: Runtime Error

Solution code:
a, b = list(map(int, input().split()))
number = 1
while a <= b:
    a += a - 1
    number += 1
print(number)

Submission status: Runtime Error

Solution code:
a,b = map(int,input().split())
ans = 1
c = a-1
while a < b:
  a += c
  ans += 1
print(ans)

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
import math

a,b = map(int, input().split())
av = num =  a
n = 1
if num < b:
  n+=1
  num = num+av-1
elif num > b:
  pass
print(n)

Submission status: Runtime Error

Solution code:
import math

a,b = map(int, input().split())
av = num =  a
n = 1
while num =< b:
  n+=1
  num = num+av-1
print(n)

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
N = int(input())
A=[int(_) for _ in input().split()]

Maxcounter = 0
for i in range(1,N):
    counter = 0
    k = i
    while k < N:
      if (A[k-1]>=A[k]):
        counter += 1
        k += 1
        if Maxcounter <= counter:
            Maxcounter = counter
      else:
        break
      
print(Maxcounter)

Submission status: Runtime Error

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

count = 0
#iを３回数えてもらう
for i in range(3):
#数えてｓとｔが同じならカウント１とする
    if S[i]==T[i]:
    count += 1
print(count)

Submission status: Runtime Error

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

count = 0
#iを３回数えてもらう
for i in range(3):
#数えてｓとｔが同じならカウント１とする
    if S[i]==T[i] 
    count += 1
print(count)

Submission status: Runtime Error

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

count = 0
#iを３回数えてもらう
for i in range(3):
#数えてｓとｔが同じならカウント１とする
    if S[i]==T[i] 
    count += 1
print(count)

Submission status: Runtime Error

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

count = 0
#iを３回数えてもらう
for i in range(3):
#数えてｓとｔが同じならカウント１とする
    if S[i]==T[i] 
    print(I)
count(I)

Submission status: Runtime Error

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

count = 0
#iを３回数えてもらう
for i in range(3):
#数えてｓとｔが同じならカウント１とする
    if S[i] == T[i] 
    print(I)
count(I)

Submission status: Runtime Error

Solution code:
S = print()
T = print()
count = 0
#iを３回数えてもらう
for i in range(3):
#数えてｓとｔが同じならカウント１とする
    if S[i] == T[i] 
    print(I)
count(I)

Submission status: Runtime Error

Solution code:
S = print()
T = print()
count == 0
#iを３回数えてもらう
for i in range(3)
#数えてｓとｔが同じならカウント１とする
if S[i] == T[i] 
    print(I)
count(I,num)

Submission status: Runtime Error

Solution code:
S = print()
#SがS,C,Rとなるようにする
print(s | c | r)
T = print()
#TがS,C,Rとなるようにする
print((s | c | r))
S == T

Submission status: Runtime Error

Solution code:
A,B = input().split()

A_ch = int(A)
B_ch = int(B)

cal = B_ch - A_ch
i = 0
n = 1
try:
    while (cal + i) > 0:
        n += 1
        i += 1
        cal = B_ch - A_ch * n - n
        
except:
    i = 1
print(i)

Submission status: Runtime Error

Solution code:
N=int(input())
H=list(map(int,input().split()))
ans=0
tmp=0
for i in range(N-1):
  if H[i]>=H[i+1]:
    tmp+=1
  else:
    tmp=0
  anｓ=max(tmp,ans)
  
print(ans)

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
n = int(input())
h = list(map(int, input().split()))
R, r = 0, 0

for i in range(n - 1):
    r = 0 if h[i] < h[i + 1] else r + 1
    R = max(R, r)
print(R)

Submission status: Runtime Error

Solution code:
#include <bits/stdc++.h>
using namespace std;
#define rep(i,n) for(int i=0;i<n;i++)
#define ll long long
#define All(v) (v).begin(),(v).end()
int main() {
    string s,t;
    int ans=0;
    cin>>s>>t;
    rep(i,3){
        if(s[i]==t[i])ans++;
    }
    cout<<ans<<endl;
}

Submission status: Runtime Error

Solution code:
forcast = input().split()
actual = input().split()
match = 0
for i in range(

Submission status: Runtime Error

Solution code:
F = input().split()
A = input().split()
s = 0
s += F[0] == A[0] ? 1 : 0
s += F[1] == A[1] ? 1 : 0
s += F[1] == A[2] ? 1 : 0
print(s)

Submission status: Runtime Error

Solution code:
s = int()
t = int()
c=0
if s[0]==t[0]:
  c = c + 1

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

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

Submission status: Runtime Error

Solution code:
s = int()
t = int()
c=0
if s[0]==t[0]:
  c = c + 1

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

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
S=list(input())
T=list(input())
c=0
for u,v = zip(S,T):
    if u==v:
        c+=1
print(c)

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
be=input()
af=input()
ans=0
for i in range (2):
  	if be[i]==af[i]:
    	ans+=1
print(ans)

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
be=list(map(str,input().split()))
af=list(map(str,input().split()))
ans=0
for i in range 2:
  	if be[i]==af[i]:
    	ans+=1
print(ans)

Submission status: Runtime Error

Solution code:
be=list(map(str,input().split()))
af=list(map(str,input().split()))
ans=0
for i in range (0,2):
  	if be[i]==af[i]:
    	ans+=1
print(ans)

Submission status: Runtime Error

Solution code:
S,T=input()


s_list=list(S)
t_list=list(T)
out=0
for i in range(len(S)):
  if s_list[i]==t_list[i]:
    out+=1
print(out)

Submission status: Runtime Error

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

Submission status: Runtime Error

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

DAY = 0
for n in range(3):
    if S[n] == T[n]:
        DAY += 1
    else:
        pass

print(DAY)

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:

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

Submission status: Runtime Error

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
ans

Submission status: Runtime Error

Solution code:
s = input()
t = input()
cnt = 0
for x,y in zip(s, t):
	if x==y:
		cnt++
print(cnt)

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
n = int(input())
L = list(map(int,input().split()))
 
count = 0
mcount = 0
for i in range(1,n):
      if L[i - 1] >= L[i]:
            count += 1
            if count >= mcount:
                  mcount = count
      else:
            count = 0
print(mc)

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
#include <iostream>
#include <string>

using namespace std;

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
S = list(v for v in input())
T = list(v fot v in input())

count = 0

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

print(count)

Submission status: Runtime Error

Solution code:
n = int(input())
h = list(map(int, input().split()))
max_count = 0
count = 0
for i in range(1, n):
    if h[i - 1] >= h[i]:
        count += 1
    else:
        if max_count < count:
            max_count = count
        count = 0
if max_count < count:
    max_count = count
print(max_count)

Submission status: Runtime Error

Solution code:
S = [i for i in input()]
t = [i for i in input()]

a = 0
for i,j in zip(s,t):
  if i == j:
    a += 1
    
print(a)

Submission status: Runtime Error

Solution code:
A,B=map(int,input().split())
for i in range(1,13):
  if 1+(A-1)*i>=B:
    print(i)
    exit()

Submission status: Runtime Error

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

amount = 0
count = 0

while amount < list[1]:
    count += 1
    amount = count * (list[0] - 1) + 1 

print(count)

Submission status: Runtime Error

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

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

Submission status: Runtime Error

Solution code:
s=map(str, input().split())
t=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=map(str, input().split())
t=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=map(str, input().split())
t=map(str,i nput().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, T = input().split()
S = [str(s) for s in list(S)]
T = [str(t) for t in list(T)]

LIST = [0, 1, 2]
DAY = 0

for n in LIST:
    if S[n] == T[n]:
        DAY += 1
    else:
        pass

print(DAY)

Submission status: Runtime Error

Solution code:
S,T = input().split()
S = [str(s) for s in list(S)]
T = [str(t) for t in list(T)]

list1 = [0,1,2]
day = 0

for n in list1:
    if S[n] == T[n]:
        day +=1
    else:
        pass

print (day)

Submission status: Runtime Error

Solution code:
S,T = input().split()
S = [str(s) for s in list(S)]
T = [str(t) for t in list(T)]

list1 = [0,1,2]
day = 0

for n in list1:
    if S[n] == T[n]:
        day +=1

print (day)

Submission status: Runtime Error

Solution code:
S,T = input().split()
S = [str(s) for s in list(S)]
T = [str(t) for t in list(T)]

list1 = [0,1,2]
day = 0

for n in list1:
    if S[n] == T[n]:
        day +=1

print (day)

Submission status: Runtime Error

Solution code:
S,T = input().split()
S = [str(s) for s in list(S)]
T = [str(t) for t in list(T)]

list1 = [0,1,2]
count = 0
day = 0

for n in list1:
    if S[n] == T[n]:
        day +=1

print (day)

Submission status: Runtime Error

Solution code:
S,T = input().split()
S = [str(s) for s in list(S)]
T = [str(t) for t in list(T)]
print(S,T)


#リストS内の位置を返す
list1 = [0,1,2]
count = 0
day = 0

for n in list1:
    if S[n] == T[n]:
        day +=1

print (day)

Submission status: Runtime Error

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

Submission status: Runtime Error

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

i = 0
ans_cnt = 0

while i < len(S):
    i += 1
    if S[i] == T[i]:
        ans_cnt += 1

print(ans_cnt)

Submission status: Runtime Error

Solution code:
a,b=list(map(int,input().split()))
if b//a==0:
  print(b//a)
elif -(-b//a):
  print(-(-b//a))

Submission status: Runtime Error

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


def solve(N: int, H: "List[int]"):

    result = 0
    while len(H) >= 2:
        count = 0
        for i in range(len(H) - 1):
            if H[i] >= H[i + 1]:
                count += 1
            else:
                break
        result = max(result, count)

        H = H[count + 1 :]

    print(result)

    return


def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word

    tokens = iterate_tokens()
    N = int(next(tokens))  # type: int
    H = [int(next(tokens)) for _ in range(N)]  # type: "List[int]"
    solve(N, H)


if __name__ == "__main__":
    main()

Submission status: Runtime Error

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

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

Submission status: Runtime Error

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

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
S =[]
T =[]
i = random.choice(S,C,R)
S[0] ='i'
q = random.choice(S,C,R)
S[1] ='q'
g = random.choice(S,C,R)
S[2] ='g'
 
h = random.choice(S,C,R) 
T[0] ='h'
k = random.choice(S,C,R)
T[1] ='k'
m = random.choice(S,C,R)
T[2] ='m'
 
if S[0]=T[0]:
  correct += 1
  if S[1]=T[1]:
    correct += 1
    if S[2]=S[2]:
      correct += 1
 
print(correct)

Submission status: Runtime Error

Solution code:
S =[]
T =[]
i = random.choice(S,C,R)
 S[0] ='i'
i = random.choice(S,C,R)
S[1] ='i'
i = random.choice(S,C,R)
S[2] ='i'

i = random.choice(S,C,R) 
T[0] ='i'
i = random.choice(S,C,R)
T[1] ='i'
i = random.choice(S,C,R)
T[2] ='i'
 
if S[0]=T[0]:
  correct += 1
  if S[1]=T[1]:
    correct += 1
    if S[2]=S[2]:
      correct += 1
 
print(correct)

Submission status: Runtime Error

Solution code:
問題文
ある3日間の天気予報が、長さ 3の文字列Sとして与えられます。
Sのi(1≤i≤3)文字目が S のとき、i日目の天気予報が晴れだったことを、
C のときは曇りだったことを、
R のときは雨だったことを意味します。

また3日間の実際の天気が、長さ 3の文字列Tとして与えられます。
Tの i (1≤i≤3)文字目が S のとき、i日目の実際の天気が晴れだったことを、
C のときは曇りだったことを、
R のときは雨だったことを意味します。
3日間で天気予報が的中した日が何日あるかを出力してください。

制約
SおよびTは長さ 3の文字列である。
SおよびTは S, C, R のみからなる。

S =[]
T =[]
i = random.choice(S,C,R)

S[0] ='i'
S[1] ='i'
S[2] ='i'

T[0] ='i'
T[1] ='i'
T[2] ='i'

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

print(correct)

Submission status: Runtime Error

Solution code:
N = int(input())
H = list(map(lambda x:int(x), input().split()))
count = 0
ans = 0
for i in range(N-1):
  if H[i] >= H[i+1]:
    count += 1
  else:
    count = 0
  ans = max(ans, count)

print(ans)

Submission status: Runtime Error

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

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

Submission status: Runtime Error

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

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

print(count)

Submission status: Runtime Error

Solution code:
S = input()
T = input()
ans = 0
for i in S and j in T:
    if i == j:
        ans += 1
print(ans)

Submission status: Runtime Error

Solution code:
a = int(input())
b, c = map(int,input().split())
txt = input()
print(str(a+b+c)+" "+txt)

Submission status: Runtime Error

Solution code:
a = int(input())
b = int(input())
c = int(input())
print(int((a+b)*c/2))

Submission status: Runtime Error

Solution code:
e=input(”S"）
r=input(”T")
x=0
for i in range(3):
    if e[i]==r[i]:
        x+=1
print(x)

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
A_B = input().split()
print(-(-(int(A_B[1])-1)//int(A_B[0])))

Submission status: Runtime Error

Solution code:
A_B = input().split()
print((int(A_B[1])-1)//(int(A_B[0])-1))

Submission status: Runtime Error

Solution code:
A_B = input().split()
print(int(A_B[1])//(int(A_B[0])-1))

Submission status: Runtime Error

Solution code:
# Sを入力する
S = input().split(" ")
# Lを入力する
L = input().split(" ")

# 3つの要素に定義しなおす
S1 = S[0]
S2 = S[1]
S3 = S[2]
L1 = L[0]
L2 = L[1]
L3 = L[2]

# 全部同じ
if S1 == L1 and S2 == L2  S3 == L3:
  print(3)
# 全部違う
elif S1 != L1 and S2 != L2  S3 != L3:
  print(0)
# 一つだけ
elif (S1 == L1 and S2 != L2  S3 != L3) or (S1 != L1 and S2 == L2  S3 != L3) or (S1 != L1 and S2 != L2  S3 == L3):
  print(1)
# その他
else:
  print(2)
end

Submission status: Runtime Error

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

Submission status: Runtime Error

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

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

Submission status: Runtime Error

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

for S[] in T[]:
  x += 1
  
print(x)

Submission status: Runtime Error

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


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

Submission status: Runtime Error

Solution code:
n=int(input())
h=list(map(int,input().split()))
x=[]
y=0
for i in range (n-1):
  if h[i]>=h[i+1]:
    y+=1
    x.append(y)
    elif h[i]<h[i+1] :
    x.append(y)
    y=0
print(max(x))

Submission status: Runtime Error

Solution code:
forecast = input()
real = input()

a = 0

for i in range(0,2)
  if forecast[i] == real[i]:
    a += 1
    
print(a)

Submission status: Runtime Error

Solution code:
#include <bits/stdc++.h>
using namespace std;
#define ll long long
#define rep(i, n) for (ll i = 0; i < n; ++i)
#define ALL(a) a.begin(), a.end()
ll dx[4] = { 0, 1, 0, -1 };
ll dy[4] = { 1, 0, -1, 0 };
const ll INF = 1e14;
const ll MOD = 1e9 + 7;
int main()
{
    ios_base::sync_with_stdio(false);
    cin.tie(0);
    string s, t;
    cin >> s >> t;
    int cnt = 0;
    rep(i, 3)
    {
        if (s[i]==t[i]) {
            cnt++;
        }
    }
    cout << cnt << endl;
    return 0;
}

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
#16:07
n = int(input())
raw = []
for _ in range(n):
  raw.append(list(map(lambda x: int(x)-1, input().split())))
cnt = [0 for _ in range(n)]
tmp = [0 for _ in range(n)]
now = [i for i in range(n)]
ans = 0
while now:
  ans += 1
  last = now
  now = []
  for x in last:
    tmp[x] = 0
  for x in last:
    try:
      y = raw[x][cnt[x]]
      if tmp[x] == tmp[y] == 0 and x == raw[y][cnt[y]]:
        cnt[x] += 1
        cnt[y] += 1
        tmp[x] = 1
        tmp[y] = 1
        now.append(x)
        now.append(y)
    except:
      pass
  #print(now)
if cnt == [n-1 for _ in range(n)]:
  print(ans-1)
else:
  print(-1)

Submission status: Runtime Error

Solution code:
#dummy
#16:07
n = int(input())
raw = []
for _ in range(n):
  raw.append(list(map(lambda x: int(x)-1, input().split())))
cnt = [0 for _ in range(n)]
now = [i for i in range(n)]
ans = 0
while now:
  ans += 1
  last = now
  now = []
  tmp = [0 for _ in range(n)]
  for x in last:
    if cnt[x] < n-1:
      y = raw[x][cnt[x]]
      if tmp[x] == tmp[y] == 0 and x == raw[y][cnt[y]]:
        cnt[x] += 1
        cnt[y] += 1
        tmp[x] = 1
        tmp[y] = 1
        now.append(x)
        now.append(y)
  #print(now)
  if n > 500 and cnt[0] == 10:
    break
if cnt == [n-1 for _ in range(n)]:
  print(ans-1)
else:
  print(-1)

Submission status: Runtime Error

Solution code:
N=int(input())

a=[]
for i in range(N):
    a.append([m-1 for m in map(int,input().split())])

b=[]
for i in range(N):
    b.append(a[i].pop(0))

an=0

while True:
    note=[]
    x=0
    for i in range(N):
        if b[i]!=N and b[b[i]]==i:
            x=1
            note.append(i)
    for i in note:
        try:
            b[i]=a[i].pop(0)
        except:
            b[i]=N
    if x==1:
        an+=1
    elif b==[N for i in range(N)]:
        print(an)
        break
    else:
        print(-1)
        break

Submission status: Runtime Error

Solution code:
predict_weather = list(input())
actual_weather = list(input())
 
count = 0
for i in range(len(predict_weather)):
  if predict_weather[i] == actual_weather[i]:
    count += 1
 
return count

Submission status: Runtime Error

Solution code:
predict_weather = list(input())
actual_weather = list(input())
 
count = 0
for i in len(predict_weather):
  if predict_weather[i] == actual_weather[i]:
    count += 1
 
print(count)

Submission status: Runtime Error

Solution code:
predict_weather = list(input())
actual_weather = list(input())

count = 0
for i in len(predict_weather):
  if predict_weather[i] == actual_weather[i]:
    count += 1

return count

Submission status: Runtime Error

Solution code:
from collections import deque
n=int(input())
l=[]
for i in range(n):
  a=deque(list(map(int,input().split())))
  l.append(a)
num=0
exist=[i for i in range(n)]
while num>-1:
  pare=[]
  boo=[0]*n
  remove=[]
  non_delete=True
  for i in exist:
    if len(l[i])==0:
      remove.append(i)
      continue
    X=l[i][0]
    if boo[X-1]==1:
      continue
    if l[X-1][0]==i+1:
      boo[i]=1
      boo[X-1]=1
      l[i].popleft()
      l[X-1].popleft()
      non_delete=False
  for r in remove:
    exist.remove(r)
  if non_delete:
    if len(exist)==0:
      break
    num=-1
    break
  num=num+1
print(int(num))

Submission status: Runtime Error

Solution code:
A,B=map(int,input().split())
set = 0
for i in range(1,20):
  if B==1:
    set -=1
    break
  elif A == B:
    set +=1
    break
  elif ((A-1)*i)+A >= B:
    set +=1
    break
  else:
    set +=1
print(set+1)

Submission status: Runtime Error

Solution code:
forecast = input()
actual = input()
count = 0

for i in range(len(forecast)):
  if forcast[i] == actual[i]:
    count += 1
print(count)

Submission status: Runtime Error

Solution code:
forecast = input()
actual = input()
count = 0

for i in range(len(forecast)):
  if forcast[i] = actual[i]:
    count += 1
print(count)

Submission status: Runtime Error

Solution code:
s=list(input())
t=list(input())
assert len(s)==len(t)
res=0
for i,ss in enumurate(s):
  if ss==t[i]:
    res +=1
print(res)

Submission status: Runtime Error

Solution code:
s=list(input())
t=list(input())
res=0
for i,ss in enumurate(s):
  if ss==t[i]:
    res +=1
print(res)

Submission status: Runtime Error

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

Submission status: Runtime Error

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

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

Submission status: Runtime Error

Solution code:
S = input()
T = input()
count = 0
for n inrange(3):
  if S[n] = T[n]:
    count += 1
print(count)

Submission status: Runtime Error

Solution code:
S=list(map(input().split()))
T=list(map(input().split()))
a==0
for i in S:
  if S[i]==T[i]:
    a=a+1
print(a)

Submission status: Runtime Error

Solution code:
str = input().split("\r\n")
count = 0
for i in range(3):
    if str[0][i]==str[1][i]:
        count += 1

print(count)

Submission status: Runtime Error

Solution code:

s,t = int(input())
correct_days = 0
if s == t:
	correct days +=1
    print(f"{correct_days} were correct"
else:
	correct days += 0

Submission status: Runtime Error

Solution code:

s,t = int(input())
correct_days = 0
if s == t:
	correct days +=1
    print(f"{correct} were correct"
else:
	correct days += 0

Submission status: Runtime Error

Solution code:
s=input():str
s=s.split(" ")
A,B=s[0],s[1]
kuti=1
c=0
while kuti<B:
    kuti+=(A-1)
    c+=1

Submission status: Runtime Error

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

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

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

Submission status: Runtime Error

Solution code:
s = input().split()
t = input().split()
count = 0

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

Submission status: Runtime Error

Solution code:
x

Submission status: Runtime Error

Solution code:
a = int(input())

print(a*(a-1)//2)

Submission status: Runtime Error

Solution code:

pre = input().rstrip()
sur = input().rstrip()
num = len([n for n in range(len(pre)) if pre[n] = sur[n]])
print(num)

Submission status: Runtime Error

Solution code:
import math

A,B = [int(x) for x in input().split()]
print(math.ceil(B/A))

Submission status: Runtime Error

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

sl = []
tl = []
ans = 0
for s in S:
  sl.append(s)

for t in T:
  tl.append(t)

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

Submission status: Runtime Error

Solution code:
c = 0

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

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:
a, b = map(int, input().split())

i = 1
while True:
  max = a * i + 1 - i
  if max >= b:
    break
    
  i += 1
  

print(i)

Submission status: Runtime Error

Solution code:
N = int(input())

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

Submission status: Runtime Error

Solution code:
N = int(input())

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

Submission status: Runtime Error

Solution code:
A,B = [int(x) for x in input().split()]
print((B-1)//(A-1)+1)

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

count = 0

if s[i] == t[i]:
  count += 1
  print(count)

Submission status: Runtime Error

Solution code:
n = int(input())

if n%2==0:
  ans = int(n/2)
  ans = ans*(n-1)
else:
  ans = int((n-1)/2)
  ans = ans*n
print(ans)