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


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


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

if __name__ == '__main__':
    main()

Submission status: Accepted

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

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

print(cnt)

Submission status: Accepted

Solution code:

S = input()
T = input()

ans = 0
for i in range(3):

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

print (ans)

Submission status: Accepted

Solution code:
#
# 　　  ⋀_⋀　 
#　　  (･ω･)  
# .／ Ｕ ∽ Ｕ＼
#  │＊　合　＊│
#  │＊　格　＊│ 
#  │＊　祈　＊│ 
#  │＊　願　＊│ 
#  │＊　　　＊│ 
#      ￣
#
import sys
sys.setrecursionlimit(10**6)
input=sys.stdin.readline
from math import floor,ceil,sqrt,factorial,log #log2ないｙｐ
from heapq import heappop, heappush, heappushpop
from collections import Counter,defaultdict
from itertools import accumulate,permutations,combinations,product,combinations_with_replacement
from bisect import bisect_left,bisect_right
from copy import deepcopy
inf=float('inf')
mod = 10**9+7
def INT_(n): return int(n)-1
def MI(): return map(int,input().split())
def MF(): return map(float, input().split())
def MI_(): return map(INT_,input().split())
def LI(): return list(MI())
def LI_(): return [int(x) - 1 for x in input().split()]
def LF(): return list(MF())
def LIN(n:int): return [I() for _ in range(n)]
def LLIN(n: int): return [LI() for _ in range(n)]
def LLIN_(n: int): return [LI_() for _ in range(n)]
def LLI(): return [list(map(int, l.split() )) for l in input()]
def I(): return int(input())
def F(): return float(input())
def ST(): return input().replace('\n', '')
def main():
    S = ST()
    T = ST()
    ans = 0
    for i in range(3):
        if S[i] == T[i]:
            ans += 1
    print(ans)
if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
S = input()
T = input()
ans = 0
ans += 1 if S[0]==T[0] else 0
ans += 1 if S[1]==T[1] else 0
ans += 1 if S[2]==T[2] else 0
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:
# coding: utf-8
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:
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:
words = lambda t : list(map(t, input().split()))
s = input()
t = input()
ans = 0
for i in range(3):
    if s[i] == t[i]:
        ans += 1
print(ans)

Submission status: Accepted

Solution code:
# n, k = map(int, input().split())
s = list(input())
t = list(input())
cnt = 0
for a, b in zip(s, t):
  if a == b:
    cnt += 1
print(cnt)

Submission status: Accepted

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

import sys
import math
import bisect
sys.setrecursionlimit(1000000000)
from heapq import heappush, heappop,heappushpop
from collections import defaultdict
from itertools import accumulate
from collections import Counter
from collections import deque
from operator import itemgetter
from itertools import permutations
mod = 10**9 + 7
inf = float('inf')
def I(): return int(sys.stdin.readline())
def LI(): return list(map(int,sys.stdin.readline().split()))

s = input()
t = input()

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

Submission status: Accepted

Solution code:
import sys

stdin = sys.stdin

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

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

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:
ii = lambda : int(input())
mi = lambda : map(int,input().split())
li = lambda : list(map(int,input().split()))



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

    print(cnt)

main()

Submission status: Accepted

Solution code:
s = input()
t = input()
print(len([x for x, y in zip(s, t) if x == y]))

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:
#!/usr/bin/env python3
import sys
sys.setrecursionlimit(300000)


def solve(S: str, T: str):
    ret = 0
    for i in range(3):
        if S[i] == T[i]:
            ret += 1
    print(ret)
    return


def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    S = next(tokens)  # type: str
    T = next(tokens)  # type: str
    solve(S, T)

if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
rr = raw_input
rri = lambda: int(raw_input())
rrm = lambda: map(int, raw_input().split())


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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
S1 = input()
S2 = input()
print(sum([int(s[0] == s[1]) for s in zip(S1, S2)]))

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

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# coding: utf-8

import sys
import math
import collections
import itertools
from inspect import currentframe
INF = 10 ** 10
MOD = 10 ** 9 + 7
def input() : return sys.stdin.readline().strip()
def gcd(x, y) : return y if x % y == 0 else gcd(y, x % y)
def lcm(x, y) : return (x * y) // gcd(x, y)
def I() : return int(input())
def MI() : return map(int, input().split())
def LI() : return [int(x) for x in input().split()]
def RI(N) : return [int(input()) for _ in range(N)]
def LRI(N) : return [[int(x) for x in input().split()] for _ in range(N)]
def chkprint(*args) : names = {id(v):k for k,v in currentframe().f_back.f_locals.items()}; print(', '.join(names.get(id(arg),'???')+' = '+repr(arg) for arg in args))

S = input()
T = input()

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

print(ans)

Submission status: Accepted

Solution code:
#import sys
#input = sys.stdin.readline
def main():
    S = input()
    T = input()
    ans = 0
    for i in range(3):
        if S[i] == T[i]:
            ans += 1
    print(ans)
if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
S=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=list(input())
t=list(input())
c=0
for i, v in zip(s, t):
    if i==v:
        c+=1
print(c)

Submission status: Accepted

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

count = 0
for aa, bb in zip(a, b):
    if aa == bb:
        count += 1

print(count)

Submission status: Accepted

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

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

Submission status: Accepted

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

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

print(c)

Submission status: Accepted

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

print(ans)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
S = input()
T = input()
ans = 0
for k in range(3):
    if S[k] == T[k]:
        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 = 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()

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

Submission status: Accepted

Solution code:
#https://atcoder.jp/contests/abc139/tasks/abc139_a

s = list(str(input()))
t = list(str(input()))

cnt = 0

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

print(cnt)

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
stdin = sys.stdin

sys.setrecursionlimit(10 ** 7)

def li(): return map(int, stdin.readline().split())
def li_(): return map(lambda x: int(x) - 1, stdin.readline().split())
def lf(): return map(float, stdin.readline().split())
def ls(): return stdin.readline().split()
def ns(): return stdin.readline().rstrip()
def lc(): return list(ns())
def ni(): return int(stdin.readline())
def nf(): return float(stdin.readline())


s = ns()
t = ns()

ans = 0
for si, ti in zip(s, t):
    if si == ti:
        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:
from sys import stdin

S = stdin.readline().rstrip()
T = stdin.readline().rstrip()

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

print(ans)

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
#!usr/bin/env python3
from collections import defaultdict,deque
from heapq import heappush, heappop
import sys
import math
import bisect
import random
def LI(): return [int(x) for x in sys.stdin.readline().split()]
def I(): return int(sys.stdin.readline())
def LS():return [list(x) for x in sys.stdin.readline().split()]
def S():
    res = list(sys.stdin.readline())
    if res[-1] == "\n":
        return res[:-1]
    return res
def IR(n):
    return [I() for i in range(n)]
def LIR(n):
    return [LI() for i in range(n)]
def SR(n):
    return [S() for i in range(n)]
def LSR(n):
    return [LS() for i in range(n)]

sys.setrecursionlimit(1000000)
mod = 1000000007

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

#B
def B():

    return

#C
def C():

    return

#D
def D():

    return

#E
def E():

    return

#F
def F():

    return

#Solve
if __name__ == "__main__":
    A()

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
Ss = input()
Ts = input()

ans = 0
for S, T in zip(Ss, Ts):
    if S == T:
        ans += 1

print(ans)

Submission status: Accepted

Solution code:

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

S = list(input().rstrip())
T = list(input().rstrip())

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

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
s = input()
t = input()
ans = 0
for i in range(3):
    ans += s[i] == t[i]
print(ans)

Submission status: Accepted

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

def main():
    # a = int(input())
    # N, K = map(int, input().split())
    # a = list(map(int, input().split()))
    s = input().strip()
    t = input().strip()
    ans = 0
    for i in range(3):
        if s[i] == t[i]:
            ans += 1
    print(ans)
    # if :
    #     print("Yes")
    # else:
    #     print("No")

if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
from collections import defaultdict,deque
import sys,heapq,bisect,math,itertools,string,queue,copy,time
sys.setrecursionlimit(10**8)
INF = float('inf')
mod = 10**9+7
eps = 10**-7
def inp(): return int(sys.stdin.readline())
def inpl(): return list(map(int, sys.stdin.readline().split()))
def inpl_str(): return list(sys.stdin.readline().split())

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

print(ans)

Submission status: Accepted

Solution code:
import sys
sys.setrecursionlimit(200000)
input = sys.stdin.readline

S = input().strip()
T = input().strip()

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

print(ans)

Submission status: Accepted

Solution code:
import bisect
import heapq
import itertools
import math
import operator
import os
import re
import string
import sys
from collections import Counter, deque, defaultdict
from copy import deepcopy
from decimal import Decimal
from fractions import gcd
from functools import lru_cache, reduce
from operator import itemgetter, mul, add, xor

import numpy as np

if os.getenv("LOCAL"):
    sys.stdin = open("_in.txt", "r")

sys.setrecursionlimit(2147483647)
INF = float("inf")
IINF = 10 ** 18
MOD = 10 ** 9 + 7

S = np.array(list(sys.stdin.readline().rstrip()))
T = np.array(list(sys.stdin.readline().rstrip()))

print((S == T).sum())

Submission status: Accepted

Solution code:
s = input()
t = input()
cnt = 0
for c, d in zip(s, t):
    cnt += c == d
print(cnt)

Submission status: Accepted

Solution code:
#

import itertools
from collections import Counter
from collections import defaultdict
from collections import deque
import bisect
from heapq import heappush, heappop

def main():
    sl = input()
    tl = input()
    ans = 0
    for s, t in zip(sl, tl):
        if s == t:
            ans += 1
    print(ans)


if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Runtime Error

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

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

print(ans)

Submission status: Runtime Error

Solution code:
s = int(input())
t = int(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 = input()
T = input()
ans = 0
for i in range(N):
  if S[i] == T[i]:
    ans +=1
print(ans)

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
A,Q,S,D,F,G,H,J,K,L,E,R,T,Y,U,I,O,PZ,X,C,V,B,B,,N,N,M,M,J=HDEGEWIUR

Submission status: Runtime Error

Solution code:
#ABC090
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: Runtime Error

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

Submission status: Runtime Error

Solution code:
N = int(input())
H = list(map(int, input().split()))
 
ans = 0
m=0
for i in range(N-1):
  count.append(0)
  if H[i] > H[i+1]:
    m+=1
    ans = max(ans, m)
    
  else:
    m=0
    
S = str(count).split('0')
L = map(len, S)
print(max(L))

Submission status: Runtime Error

Solution code:
N = int(input())
H = list(map(int, input().split()))
 
count = []
for i in range(N-1):
  count.append(0)
  if H[i] > H[i+1]:
    count[i] = 1
    
S = str(count).split('0')
L = map(len, S)
print(max(L))

Submission status: Runtime Error

Solution code:
N = int(input())
H = map(int, input().split())
 
count = [0]*len(H)
for i in range(len(H)-1):
  if H[i] >= H[i+1]:
    count[i] = 1
    
S = str(count).split('0')
L = map(len, S)
print(max(L))

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
a,b = map(int, input().split())
count = 1
if b == 1:
  print(0)
else:
  while True:
    if b <= (a-1)*(count-1) + a:
      break
    count += 1
  print(count)

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
import sys, bisect, math, itertools, string, queue, copy
# import numpy as np
# import scipy
# from collections import Counter,defaultdict,deque
# from itertools import permutations, combinations
# from heapq import heappop, heappush
# # input = sys.stdin.readline
# sys.setrecursionlimit(10**8)
mod = 10**9+7
def inp(): return int(input())
def inpm(): return map(int,input().split())
def inpl(): return list(map(int, input().split()))
def inpls(): return list(input().split())
def inplm(n): return list(int(input()) for _ in range(n))
def inplL(n): return [list(input()) for _ in range(n)]
def inplT(n): return [tuple(input()) for _ in range(n)]
def inpll(n): return [list(map(int, input().split())) for _ in range(n)]
def inplls(n): return sorted([list(map(int, input().split())) for _ in range(n)])

al = inpl()
bl = intp()
ans = 0
for i in range(0, 3):
    if(al[i] == bl[i]):
        ans += 1
print(ans)

Submission status: Runtime Error

Solution code:
import sys, bisect, math, itertools, string, queue, copy
# import numpy as np
# import scipy
# from collections import Counter,defaultdict,deque
# from itertools import permutations, combinations
# from heapq import heappop, heappush
# # input = sys.stdin.readline
# sys.setrecursionlimit(10**8)
mod = 10**9+7
def inp(): return int(input())
def inpm(): return map(int,input().split())
def inpl(): return list(map(int, input().split()))
def inpls(): return list(input().split())
def inplm(n): return list(int(input()) for _ in range(n))
def inplL(n): return [list(input()) for _ in range(n)]
def inplT(n): return [tuple(input()) for _ in range(n)]
def inpll(n): return [list(map(int, input().split())) for _ in range(n)]
def inplls(n): return sorted([list(map(int, input().split())) for _ in range(n)])

al = inpl()
bl = intp()
ans = 0
for i in range(0, 3):
    if(al[i] == bl[i]):
        ans++
print(ans)

Submission status: Runtime Error

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

n=1
while (a-1)*n+1 <= b:
  n+=1
  
print(n)

Submission status: Runtime Error

Solution code:
N = int(input())

ans = N * (N-1) / 2

print(int(ans))

Submission status: Runtime Error

Solution code:
a,b=map(int,input().split())
if a<b:print(b//a+1)
elif a==2 and b==1:print(1)
else:print(b//a)

Submission status: Runtime Error

Solution code:
a,b=map(int,input().split())
if a>b:print(1)
  elif a==b:print(1)
    elif a<b and b%a==0:print(b//a)
      elif b==0:print(0)
        else:print(b//a+1)

Submission status: Runtime Error

Solution code:
a,b=map(int,input().split())
if b==1:
    print("0")
elif b>1 and b<=a:
    print("1")
elif b>a:
    if (b-a)/(a-1)==(b-a)//(a-1):
        print((b-a)//(a-1)+1)
    else:
        print((b-a)//(a-1)+2)

Submission status: Runtime Error

Solution code:
#B - Power Socket
A,B = list(map(int,input().split()))

count = 0
total_plug = 1
for i in range(1,100):
    count += 1
    total_plug += (A - 1)
    if B <= total_plug:
        break
        
print(count)

Submission status: Runtime Error

Solution code:
#B - Power Socket
A,B = input().split()
A = int(A)
B = int(B)

count = 0
total_plug = 1
for i in range(1,20):
    count += 1
    total_plug += (A - 1)
    if B <= total_plug:
        break
        
print(count)

Submission status: Runtime Error

Solution code:
#B - Power Socket
A,B = input().split()
A = int(A)
B = int(B)

count = 0
total_plug = 1
for i in range(1,100):
    print(total_plug)
    count += 1
    total_plug += (A - 1)
    if B <= total_plug:
        break
        
print(count)

Submission status: Runtime Error

Solution code:
#B - Power Socket
A,B = list(map(int,input().split()))

count = 0
total_plug = 1
for i in range(1,100):
    count += 1
    total_plug += (A - 1)
    if B <= total_plug:
        break
        
print(count)

Submission status: Runtime Error

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

print(cnt)

Submission status: Runtime Error

Solution code:
s,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:
s,t=input().split()
ans=0
for i range(3):
    if s[i]==t[i]:
        ans+=1
print(ans)

Submission status: Runtime Error

Solution code:
c1=input()[0]
c2=input()[1]
c3=input()[2]
print(c1+c2+c3)

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=input().split()
b=input().split()
count=0
for i in range(3):
  if a[i]==b[i]:
    count+=1
print(count)

Submission status: Runtime Error

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

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

count = 0
avail = 1

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

print(count)

Submission status: Runtime Error

Solution code:
import sys
a,b=map(int,input().split())
if b==1:
  print("0")
  sys.exit()
p=1
ans=0
for i in range(0,20):
  p+=a-1
  ans+=1
  if p>=b:
    print(ans)
    sys.exit()

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
q_input = input()

a, b = map(int, q_input.split(' '))

ans = int((10-1+a-2)/(a-1))

print(ans)

Submission status: Runtime Error

Solution code:
q_input = input()

a, b = map(int, q_input.split(' '))

ans = int((10-1)/(a-1))

print(ans)

Submission status: Runtime Error

Solution code:
ss = input()
tt = input()

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
f = inout()
r = input()

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

Submission status: Runtime Error

Solution code:
perint("TEST")

Submission status: Runtime Error

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

ans=0

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

print(ans)

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
import math
a,b=map(int,input().split())
print(math.ceil((b-1)/(a-1)))

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
days = list(str(input()))
days_real = list(str(input()))
for i in range(3):
  if days[i] == days_real[i]:
    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 += 1
print(ans)

Submission status: Runtime Error

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

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

res = b // a + 1

if a == b:
  res = 1
  
print(res)

Submission status: Runtime Error

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


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

Submission status: Runtime Error

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

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

Submission status: Runtime Error

Solution code:
import math
 
A, B = input().split(' ')
A = int(A)
B = int(B)

B -= 1
A -= 1

print(math.ceil(B / A))

Submission status: Runtime Error

Solution code:
import math
 
A, B = input().split(' ')
A = int(A)
B = int(B)
 
print(math.ceil( (B-1) / (A-1) ))

Submission status: Runtime Error

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

c = 0

for i in s:
  for j in t:
    if i == j and s[i] == t[j]:
      c += 1

print(c)

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
s=input()
t=input()
cnt=0
for i in rage(len(s)):
  if s[i]==t[i]:
    cnt+=1

print(cnt)

Submission status: Runtime Error

Solution code:
S=int(input())
#print(sum([i for i in range(S)]))
s=S-1
"""
if s%2==0:
  ans=(1+s)*(s/2)
else:
  ans=(1+s)*int(s/2)+(int(s/2)+1)
"""
print(s*(s+1)/2)

Submission status: Runtime Error

Solution code:
S=int(input())
s=S-1
if s%2==0:
  ans=(1+s)*(s/2)
else:
  ans=(1+s)*int(s/2)+(int(s/2)+1)
print(int(ans))

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


while a < b:
    a += (a-1)
    cnt += 1

print(cnt)

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

Submission status: Runtime Error

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

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

print(x)

Submission status: Runtime Error

Solution code:
a, b, c = map(input().split())
d, e, f = map(input().split())
count =0
if a == d:
  count+=1
if e == b:
  count+=1
if f == c:
  count +=1
print(count)

Submission status: Runtime Error

Solution code:
s = int(input())
t = int(input())
cnt = 0
for i, a in enumerate(s):
  if t[i] == a:
    cnt += 1

print(cnt)

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
あ

Submission status: Runtime Error

Solution code:
s,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: Runtime Error

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

Submission status: Runtime Error

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

count = 0

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

Submission status: Runtime Error

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

count = 0

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

Submission status: Runtime Error

Solution code:
n = int(input())

ans = n*(n-1)//2
print(ans)

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
def main():
    N = int(input())
    B = [int(x) for x in input().split()]
    A = [0] * N
    A[0] = B[0]
    A[N-1] = B[-1]
    for i in range(1, N-1):
        if B[i - 1] <= B[i]:
            A[i] = B[i - 1]
        else:
            A[i] = B[i]
    print(sum(A))


if __name__ == "__main__":
    main()

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)