Problem:


Score : 200 points

Problem Statement

Takahashi's house has only one socket.

Takahashi wants to extend it with some number of power strips, each with A sockets, into B or more empty sockets.

One power strip with A sockets can extend one empty socket into A empty sockets.

Find the minimum number of power strips required.

Constraints

All values in input are integers.

2 \leq A \leq 20

1 \leq B \leq 20

Input

Input is given from Standard Input in the following format:

A B

Output

Print the minimum number of power strips required.

Sample Input 1

4 10

Sample Output 1

3

3 power strips, each with 4 sockets, extend the socket into 10 empty sockets.

Sample Input 2

8 9

Sample Output 2

2

2 power strips, each with 8 sockets, extend the socket into 15 empty sockets.

Sample Input 3

8 8

Sample Output 3

1



Sample input:
4 10


Sample output:
3

Submission status: Runtime Error

Solution code:

a,b=map(int,input().split())
if b==1:
    n=1
else:
    for n in range(0,20):
    if n*a-n>b:
        break
print(n)

Submission status: Runtime Error

Solution code:
a=str(input())
b=str(input())
for n in range(0,len(a)):
    if 3*n+1>b:
        break
print(n)

Submission status: Runtime Error

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

if A == B:
    print('1')
    
elif B == 1:
    print('0')
    
else:
    AAA = 1
    
    while B > AAA:
        AAA = AAA + A - 1
        
    print(C)

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

while 1:
  if (A-1)*i + 1 >= B:
    print(i)
    quit()

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
a,b=map(int,input().split())
count=0
while b>=1:
    b-=a
    connt+=1
     
print(count)

Submission status: Runtime Error

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

if B - A <= 0:
  print(0)
else:
  cnt = 0
  B -= 1
  while B - (A - 1) >= 0:
    B = B - (A - 1)
    cnt += 1
print(cnt)

Submission status: Runtime Error

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

c = B % A
if A >= B:
  print(1)
  exit()
  
elif c = 0:
  print( B//A)
  
elif c >0:
  print((B//A) + 1)

Submission status: Runtime Error

Solution code:
import sys

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

def main():
	a,b = MI()
	n = (b-a)/(a-1)
	if(b=1):print(0)
	elif(a>b):print(1)
	elif(n%1==0):print(int(n)+1)
	else:print(int(n)+2)

if __name__ == '__main__':
	main()

Submission status: Runtime Error

Solution code:
import sys

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

def main():
	a,b = MI()
	n = (B-A)/(A-1)
	if(n%1==0):print(int(n))
	else:print(int(n)+1)

if __name__ == '__main__':
	main()

Submission status: Runtime Error

Solution code:
x = list(map(int,input().split(" "))
a = x[0]
b = x[1]

for i in range(1,21):
    if a * i >= b:
        print(i)
        exit()

Submission status: Runtime Error

Solution code:
x = list(map(int,input().split(" "))
a = x[0]
b = x[1]

for i in range(1,21):
    if a * i >= b:
        print(i)

Submission status: Runtime Error

Solution code:
x = list(map(float,input().split(" "))
a = x[0]
b = x[1]

for i in range(1,21):
    if a * i >= b:
        print(i)

Submission status: Runtime Error

Solution code:
a, b = map(int, input().split())
n = 1
e = a
if b = 1:
  print(0)
  quit()
while n > 0:
  if e >= b:
    print(n)
    n = 0
  else:
    e += a-1
    n += 1

Submission status: Runtime Error

Solution code:
A,B=map(int,input()．split())
res=-(-B//A)
print(res)

Submission status: Runtime Error

Solution code:
A, B = map(int, input().split())
q = (B＋A-3)//(A-1)
print(q)

Submission status: Runtime Error

Solution code:
 B = map(int, input().split())
q = (B-1)//(A-1)

print(q)

Submission status: Runtime Error

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

soc=1
	while a<b :
		soc += 1
		a += a-1
if b==1:
	soc = 0
	
print(soc)

Submission status: Runtime Error

Solution code:
n=int(input())
*a,=map(int,input().split())
t_ans =0
for i in range(n):
	t_ans  += 1/a[i]
ans = 1/t_ans
print(ans)

Submission status: Runtime Error

Solution code:
def main():
    a=input()
    b=input()
    a=int(a)
    b=int(b)
    now=0
    count=0
    for i in range(0,a):
        now+=a
        count+=1
        if now>=b:
            break
    print(count)

if __name__ == '__main__':
    main()

Submission status: Runtime Error

Solution code:
def main():
    a=input()
    b=input()
    a=int(a)
    b=int(b)
    now=0
    count=0
    for i in range(0,a):
        now+=a
        if now>=b:
            count+=1
            break
    print(count)

if __name__ == '__main__':
    main()

Submission status: Runtime Error

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

Submission status: Runtime Error

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

result=a
count=1
while result =< b:
    result += a-1
    count += 1

print(count)

Submission status: Runtime Error

Solution code:
x = input().split()
A, B = x[0], x[1]
n = 1
t = 0
while n <= B:
  n += A - 1
  t += 1
print(t)

Submission status: Runtime Error

Solution code:
lst = list(map(int,input().split("")))
n = (list[1]-1)/list[0]
print("n")

Submission status: Runtime Error

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

ans=math.ceil((b-1)/(a-1))
print(ans)

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
A,B = map(int,input().split())
count = 0
for i in range(1,B):
    if count == 0 and A >= B:
        count = 1
        a = 1
        break
    if (A-1)*(i-1)+A >= B:
        a = i
        break
print(a)

Submission status: Runtime Error

Solution code:
A,B = map(int,input().split())
count = 0
for i in range(1,B):
    if count == 0 and A == B:
        count = 1
        a = 1
        break
    if (A-1)*(i-1)+A >= B:
        a = i
        break
print(a)

Submission status: Runtime Error

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

if b==1:
    print(0)
else:
    tap = 1
    n = a
    while n < b:
        n -= 1
        n += a
        tap+=1

print(tap)

Submission status: Runtime Error

Solution code:
A,B=map(int,input().split())
cmt=0
while True:
  if (A-1)*cnt+1>=B:
    break
  cnt+=1
print(cnt)

Submission status: Runtime Error

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

left = max(b - a, 0)
if left == 0:
    print(1)
    exit(1)
print(left // a + 2)

Submission status: Runtime Error

Solution code:
def sol(a,b):
    if b%a==0:
        return b//a
    else:
        return (b//a)+1
a,b=map(int,input(.split()))
print(sol(a,b))

Submission status: Runtime Error

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

if a >= b:
  print(1)
else:
  c = 1
  count=0
  while b > c:
    c + = a-1
    
    count += 1
  print(count)

Submission status: Runtime Error

Solution code:
A = input()
B = input()
ans = 0
tmp = A
while tmp < B:
	ans += 1
	tmp += A-1
print(ans)

Submission status: Runtime Error

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

plug = [0] * 50
plug[0] = 1

i = 0
while plug[i] < B:
  i += 1
  plug[i] = plug[i-1] + a - 1
print(i)

Submission status: Runtime Error

Solution code:
a_b = list(map(int, input()))
i=1
sum = a_b[0]
if sum<=a_b[1]:
	for sum>=a_b[1]:
		sum+=a_b[0]-1
		i++
print(i)

Submission status: Runtime Error

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

if b==1:
    tmp = 0

else:
    tmp = 1

    while tmp*a-tmp+1 < b:
    tmp += 1

print(tmp)

Submission status: Runtime Error

Solution code:
a,b =map(int,input())
print((b-1)//(a-1))

Submission status: Runtime Error

Solution code:
#include <iostream>

using namespace std;

int main()
{
    int a,b,d,c=1;
    cin>>a>>b;
    d=a;
    if(b<=1)
    {
        cout<<0;
        return 0;
    }
    while(b>a)
    {
        a+=d-1;
        c++;
    }
    cout<<c;
    return 0;
}

Submission status: Runtime Error

Solution code:
#include <iostream>

using namespace std;

int main()
{
    int a,b,c=1;
    cin>>a>>b;
    int d=a;
    if(b<=1)
    {
        cout<<0;
        return 0;
    }
    while(b>a)
    {
        a+=d-1;
        c++;
    }
    cout<<c;
    return 0;
}

Submission status: Runtime Error

Solution code:
# coding: utf-8
# Your code here!
import math
A = int(input())
B = int(input())

for i in range(1,20):
    if((A-1)*i+1>=B):
     print ('{}'.format(i))
     break

Submission status: Runtime Error

Solution code:
A, B = [int(i) for i in input().split()]

i = 1

while True:
    if i == 1:
        s = A*i
    else:
        s = A*i - (i - 1)
    
    if s >= B:
        break
    i += 1

if B == 1:
    print(0)
else
    print(i)

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

outlet = A

if A == B:
    print(1)
    
else:
    count = 1
    while outlet <= B:
        count += 1
        outlet += A-1
        ans = count
        break
    print(ans)

Submission status: Runtime Error

Solution code:
import sys

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

if(A>=B):
    print('1')
    sys.exit()

B-=A
while True:
    B-=(A-1)
    if(B<=0):
        print(count)
        sys.exit()
    count+=

Submission status: Runtime Error

Solution code:
import math

A = float(input())
B = float(input())

print(int(math.ceil((B - 1.0) / (A - 1.0))))

Submission status: Runtime Error

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

count_p = 0
count = 0

if b = 1:
    print(count)

while True:
    if count == 0:
        count_p += a
    
    else:
        count_p += a-1
    
    count += 1
    
    if count_p >= b:
        break

print(count)

Submission status: Runtime Error

Solution code:
l=list(map(int,input().split()))
a=l[0]
b=l[1]
nums=[i for i in range(20)]
for n in nums:
  if(b<=a*(i+1)-i):
    print(i+1)
    break

Submission status: Runtime Error

Solution code:
a=int(input())
b=int(input())
k=int(1)
z=0
while(k<b):
    z+=1
    k+=a-1

print(z)

Submission status: Runtime Error

Solution code:
a,b = lust(int(x) for x in input().split())
c = b - a
s = round(c/(a-1))
if c<0:
  print(1)
else:
  print(s+1)

Submission status: Runtime Error

Solution code:
a,b = list(map(int(x) for x in input().split()))
stop = True
k = 0
while stop:
  b = b - a
  k = k + 1
  if b <= 0:
    stop = False
print(k)

Submission status: Runtime Error

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

s = a-1
t = b-1
ans = int((s+t-1)/t)
        
print(ans)

Submission status: Runtime Error

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

if(count > 0):
  if count//(A-1) == 0:
	print(1 + count//(A-1))
  else:
    print(2 + count//(A-1))
else:
	print(1)

Submission status: Runtime Error

Solution code:
A=int(input())
B=int(input())

C=B//(A-1)
if (B-A)%(A-1)!=0:
    print(C+1)

else:
    print(C)

Submission status: Runtime Error

Solution code:
A=int(input())
B=int(input())
C=B//(A-1)
if B%(A-1)!=0:
    print(C+1)
else:
    print(C)

Submission status: Runtime Error

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

plug = 1
tap = 0

for i in range():
    if plug >= B:
        break
    else:
        prug += A - 1 and tap += 1

print(tap)

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
a,b=map(int,input().split())
x=0
for i:
  if (a-1)*i+1<b:
    x+=1
  else:
    exit()
print(x)

Submission status: Runtime Error

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

while tap < B:
    tap += a - 1
    ans += 1
print(ans)

Submission status: Runtime Error

Solution code:
    A, B = map(int, input().split())
    capacity = 1
    ans = 0
     
    while True:
      if capacity>=B:
        print(ans)
        break
      capacity += A-1
      ans +=1

Submission status: Runtime Error

Solution code:
A, B = [int(x)-1 for x in sys.stdin.readline().split()]

ans = 0
if B == 1:
    print(0)
else:
    while True:
        ans += 1
        if 1 + ans * A - ans >= B:
            print(ans)
            exit()

Submission status: Runtime Error

Solution code:
a= int(input())
b=int(input())
print(int((b-1)/(a-1)+0.99999))

Submission status: Runtime Error

Solution code:
from math import ciel
a,b=[int(x) for x in input().split()]
if b==1:
    print(0)
else :
    print(ciel((b-1)/(a-1)))

Submission status: Runtime Error

Solution code:
from math import ciel
a,b=int(input().split())
if b==1:
    print(0)
else
    print(ciel((b-1)/(a-1)))

Submission status: Runtime Error

Solution code:
n = int(input())
s = input()
hs = [ int(i) for i in s.rsplit() ]

max = 0
for i in range(len(hs)):
    lmax = 0
    for k in range(1, len(hs)-i):
        if hs[i+k] <= hs[i+k-1]:
            lmax = lmax + 1
        else:
            break

        if lmax > max:
            max = lmax

print(max)

Submission status: Runtime Error

Solution code:
A = list1[0];   #A個口の電源タップ
B = list1[1];   #未使用の差込口を B口以上に拡張したい
#print(list1)
#print(list1[1])
addSupply = 1;
lack   = (B-A); #足りない個数
if lack >0 & B !=1 :
    addSupply = 1;
    addSupply += lack / (A-1); #残りの個数 

    if lack % (A-1) >0:
        addSupply +=1;
else :
    addSupply = 0;
print(int(addSupply));

Submission status: Runtime Error

Solution code:
import math
a=int(input())
b=int(input())
print(math.ceil(b/a))

Submission status: Runtime Error

Solution code:
A,B=list(map(int,input().split(" ")));print([i for i in range(B) if A*i>= B][0])

Submission status: Runtime Error

Solution code:
A,B = map(int,input().split( ))
c=int(B/A)
if B==1:
    print('0')
else:
    if c < B/A:

    print(c+1)
    else:
    print(c)

Submission status: Runtime Error

Solution code:
a, b = map(int, input().split())
c = a-1
d = b-1
x = c//d
if c%d != 0:
    print(x+1)
else:
    print(x)

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
n = 1
if b == 1:
    print(0)
else:
    while a*n-(n-1) < b:
        n += 1
    print(n)

Submission status: Runtime Error

Solution code:
a, b = (int(x) for x in input().split())
print(int((b-1) / (a-1))

Submission status: Runtime Error

Solution code:
A = int(input())
B = int(input())
kuchi = 1
taps = 0 
while kuchi < B:
    taps +=1
    kuchi +=A-1
print(taps)

Submission status: Runtime Error

Solution code:
A = int(input())
B = int(input())
kuchi = 1
taps = 0 
while kuchi < B:
    taps +=1
    kuchi +=A-1
print(taps)

Submission status: Runtime Error

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

a,b = input().split()
a = int(a)
b = int(b)
ngo = 1
ans = 0
while ngo < b:
    ngo += a-1
    ans + =1
print(ans)

Submission status: Runtime Error

Solution code:
A, B = list(map(int, input().split()))
B-=1
print((A+B-1)/B)

Submission status: Runtime Error

Solution code:
A = int(input())
B = int(input())
B-=1
print((A+B-1)/B)

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

a = []
a.append(b[0])
for i in range(n-2):
    a.append(min(b[i], b[i+1]))
a.append(b[n-2])
print(sum(a))

Submission status: Runtime Error

Solution code:
import numpy as np
ls = np.array([[ 0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
         0,  0,  0,  0],
       [ 0,  1,  2,  3,  4,  5,  6,  7,  8,  9, 10, 11, 12, 13, 14, 15,
        16, 17, 18, 19],
       [ 0,  1,  1,  2,  2,  3,  3,  4,  4,  5,  5,  6,  6,  7,  7,  8,
         8,  9,  9, 10],
       [ 0,  1,  1,  1,  2,  2,  2,  3,  3,  3,  4,  4,  4,  5,  5,  5,
         6,  6,  6,  7],
       [ 0,  1,  1,  1,  1,  2,  2,  2,  2,  3,  3,  3,  3,  4,  4,  4,
         4,  5,  5,  5],
       [ 0,  1,  1,  1,  1,  1,  2,  2,  2,  2,  2,  3,  3,  3,  3,  3,
         4,  4,  4,  4],
       [ 0,  1,  1,  1,  1,  1,  1,  2,  2,  2,  2,  2,  2,  3,  3,  3,
         3,  3,  3,  4],
       [ 0,  1,  1,  1,  1,  1,  1,  1,  2,  2,  2,  2,  2,  2,  2,  3,
         3,  3,  3,  3],
       [ 0,  1,  1,  1,  1,  1,  1,  1,  1,  2,  2,  2,  2,  2,  2,  2,
         2,  3,  3,  3],
       [ 0,  1,  1,  1,  1,  1,  1,  1,  1,  1,  2,  2,  2,  2,  2,  2,
         2,  2,  2,  3],
       [ 0,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  2,  2,  2,  2,  2,
         2,  2,  2,  2],
       [ 0,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  2,  2,  2,  2,
         2,  2,  2,  2],
       [ 0,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  2,  2,  2,
         2,  2,  2,  2],
       [ 0,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  2,  2,
         2,  2,  2,  2],
       [ 0,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  2,
         2,  2,  2,  2],
       [ 0,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,
         2,  2,  2,  2],
       [ 0,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,
         1,  2,  2,  2],
       [ 0,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,
         1,  1,  2,  2],
       [ 0,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,
         1,  1,  1,  2],
       [ 0,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,
         1,  1,  1,  1]])
A, B = map(int, input().split())
print(ls[A][B])

Submission status: Runtime Error

Solution code:
import numpy as np
ls = np.array([[ 0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
         0,  0,  0,  0],
       [ 0,  1,  2,  3,  4,  5,  6,  7,  8,  9, 10, 11, 12, 13, 14, 15,
        16, 17, 18, 19],
       [ 0,  1,  1,  2,  2,  3,  3,  4,  4,  5,  5,  6,  6,  7,  7,  8,
         8,  9,  9, 10],
       [ 0,  1,  1,  1,  2,  2,  2,  3,  3,  3,  4,  4,  4,  5,  5,  5,
         6,  6,  6,  7],
       [ 0,  1,  1,  1,  1,  2,  2,  2,  2,  3,  3,  3,  3,  4,  4,  4,
         4,  5,  5,  5],
       [ 0,  1,  1,  1,  1,  1,  2,  2,  2,  2,  2,  3,  3,  3,  3,  3,
         4,  4,  4,  4],
       [ 0,  1,  1,  1,  1,  1,  1,  2,  2,  2,  2,  2,  2,  3,  3,  3,
         3,  3,  3,  4],
       [ 0,  1,  1,  1,  1,  1,  1,  1,  2,  2,  2,  2,  2,  2,  2,  3,
         3,  3,  3,  3],
       [ 0,  1,  1,  1,  1,  1,  1,  1,  1,  2,  2,  2,  2,  2,  2,  2,
         2,  3,  3,  3],
       [ 0,  1,  1,  1,  1,  1,  1,  1,  1,  1,  2,  2,  2,  2,  2,  2,
         2,  2,  2,  3],
       [ 0,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  2,  2,  2,  2,  2,
         2,  2,  2,  2],
       [ 0,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  2,  2,  2,  2,
         2,  2,  2,  2],
       [ 0,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  2,  2,  2,
         2,  2,  2,  2],
       [ 0,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  2,  2,
         2,  2,  2,  2],
       [ 0,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  2,
         2,  2,  2,  2],
       [ 0,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,
         2,  2,  2,  2],
       [ 0,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,
         1,  2,  2,  2],
       [ 0,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,
         1,  1,  2,  2],
       [ 0,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,
         1,  1,  1,  2],
       [ 0,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,
         1,  1,  1,  1]])
A, B = map(int, inupt().split())
print(ls[A][B])

Submission status: Runtime Error

Solution code:
a,b=map(int,input().split())
m=1#初期値、受け口の数
n=0#初期値、ソケットの個数
 
while True:
  m += a-1
  n += 1
  if m>=b:
    break
print(n)

Submission status: Runtime Error

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

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:
A = int(input())
B = int(input())
n = B // A

if n == B / A:
  print(n)
else:
  print(n+1)

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
#include <bits/stdc++.h>
#include <cmath>
using namespace std;

int main() {
    int a, b, c;
    cin >> a >> b;
    c = ceil(double(b) / double(a));
    cout << c << endl;
    return 0;
}

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
A = int(input())
B = int(input())

x,cnt =1,0

while(x<B):
  x +=A-1
  cnt +=1

print(cnt)

Submission status: Runtime Error

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

cnt = 0

if b<=a:
    cnt = 1
hole = a
else:
    for i in range(15):
            hole +=(a-1)
            
            if b<=hole:
                cnt = i+2
                break
            else:
                pass
print(cnt)

Submission status: Runtime Error

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

cnt = 0
hole = a
if b<=a:
    cnt = 1
elif:
    for i in range(b):
            hole +=(a-1)
            
            if b<=hole:
                cnt = i+2
            else:
                pass
print(cnt)

Submission status: Runtime Error

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

cnt = 0
hole = a
if b<=a:
    cnt = 1
elif:
    for i in range(b/a + 10):
            hole +=(a-1)
            
            if b<=hole:
                cnt = i+2
            else:
                pass
print(cnt)

Submission status: Runtime Error

Solution code:
ab=list(int(input().split()))
answer=0
taps=1
while taps<ab[1]:
  taps+=(ab[0]-1)
  answer+=1
print(answer)

Submission status: Runtime Error

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

a = 1
count = 0

while True:
  if a >= B:
    print(count)
    exit()
  a = a - 1 + A
  cnt += 1

Submission status: Runtime Error

Solution code:
A, B=map(int, input().split())
if (B-1)/(A-1)==(B-1)//(A-1):
	print((B-1)/(A-1))
else:
	ptint((B-1)//(A-1)+1)

Submission status: Runtime Error

Solution code:
A,B=map(int,input())
if (B-1)/(A-1)==(B-1)//(A-1):
	print((B-1)/(A-1))
else:
	ptint((B-1)//(A-1)+1)

Submission status: Runtime Error

Solution code:
A,B =int(input().split())
if A >= B:
    print(1)
else:
    print((B-A)/(A-1)+2)

Submission status: Runtime Error

Solution code:
#include <iostream>

using namespace std;

int main(){
  int a,b,cnt,now;
  cin >> a >> b;
  now = 1;
  cnt = 0;
  while(now < b){
    if (cnt == 0) now += a;
    else now += a - 1;
  cnt += 1;
  }
  cout << cnt << endl;
  return 0;
}

Submission status: Runtime Error

Solution code:
import math
a,b=[int(i) for i in input().split()]
if a>=b:
	print(1)
else:
	b-=a
    print(1+math.ceil(b/(a-1)))

Submission status: Runtime Error

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

for i in range(11):
    if B <= A*i-(i-1):
        count = i
        break

print(count)

Submission status: Runtime Error

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

for i in range(1, 11):
    if A*i-(i-1) >= 0 and B <= A*i-(i-1):
        count = i
        break

print(count)

Submission status: Runtime Error

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

for i in range(1, 11):
    if B <= A*i-(i-1):
        count = i
        break

print(count)

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
A = int(input())
B = int(input())

print(B-A+1)

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
import math

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

num=b/a
print(math.ceil(num))

Submission status: Runtime Error

Solution code:
input1 = input()
x = []
y=[]
check=0

for i in input1:
    if i!=" " and check==0:
        x.append(i)
    elif i==" ":
        check=1
    elif i!=" " and check==1:
        check==1
        y.append(i)
xstring=''.join(x)
ystring=''.join(y)

xint=int(xstring)
yint=int(ystring)

if yint==1:
    print(0)
else:
    cnt=0
    while ((xint-1)*(cnt))+xint<yint:
        cnt=cnt+1
    cnt=cnt+1
    5print(cnt)

Submission status: Runtime Error

Solution code:
import math
S = input()
A = int(S[0])
B = int(S[1:])
n = math.ceil(B/A)
print(n, " power strips, each with", A , "sockets, extend the socket into", A*n, "empty sockets.")

Submission status: Runtime Error

Solution code:
import math
A = input()
B = input()
n = math.ceil(B/A)
print(n, " power strips, each with", A , "sockets, extend the socket into", A*n, "empty sockets.")

Submission status: Runtime Error

Solution code:
x = int(input())
y = int(input())
temp=x


cnt=1
while x<y:
    cnt=cnt+1
    x=x+temp-1

print(cnt)

Submission status: Runtime Error

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

for x in range(20):
	if (A-1)*x + 1 >= B:
      print(x)
      break

Submission status: Runtime Error

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

for x in range(10):
	if (A-1)*x + 1 >= B:
      print(x)
      break

Submission status: Runtime Error

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

for x in range(10):
	if (A-1)*x + 1 == B:
      print(x)
      break

Submission status: Runtime Error

Solution code:
A,B = map(int,input().split())
if A = B:
    print(1)
elif B = 1:
    print(0)
else:
    print((B-1)//(A-1)+1)

Submission status: Runtime Error

Solution code:
A,B = map(int,input().split())
if A = B:
    print(1)
elif B = 1:
    print(0)
else
    print((B-1)//(A-1)+1)

Submission status: Runtime Error

Solution code:
A,B = map(int,input().split())
if B>A:
    print(B//A +1)
elif B = 1:    
    print(0)
else:
    print(1)

Submission status: Runtime Error

Solution code:
a,b=input()
x=0
if a>=b:
  print(1)
else:
  while a>b
  a == a+(a-1)
  x += 1
print(x)

Submission status: Runtime Error

Solution code:
a,b=input()
x=0
if a>=b:
  print(1)
else:
  while a>b
  a = a+(a-1)
  x += 1
print(x)

Submission status: Runtime Error

Solution code:
a=input()
b=input()
x=0
if a>=b:
  print(1)
else:
  while a>b
  a += a-1
  x += 1
print(x)

Submission status: Runtime Error

Solution code:
a,b=input()
x=0
if a>=b:
  print(1)
else:
  while a<b
  a += a-1
  x += 1
print(x)

Submission status: Runtime Error

Solution code:
A = int(input())
B = int(input())

if A % B == 0:
    print(B // A)
else:
    print(A // B + 1)

Submission status: Runtime Error

Solution code:
a,b=map(int,input().split())
if (b-1)¥(a-1)==0:
    c=int((b-1)/(a-1))
else:
    c=int((b-1)/(a-1))+1
print(c)

Submission status: Runtime Error

Solution code:
a,b=input().split()
c=(b-1)//a+1
print(c)

Submission status: Runtime Error

Solution code:
a,b=input().split()
print((b-1)//a+1)

Submission status: Runtime Error

Solution code:
a,b=int(input().split())
print((b+1)//a)

Submission status: Runtime Error

Solution code:
a,b=input().split()
print((b+1)//a)

Submission status: Runtime Error

Solution code:
a,b=input.split
print((b+1)//a)

Submission status: Runtime Error

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

count = 1

while a<b:
  a += a
  count += 1

print(count)

Submission status: Runtime Error

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

count = 1

while a<b:
  a+=a
  count += 1

print(count)

Submission status: Runtime Error

Solution code:
x = int(input())
a = x[0]
b = x[2]
print((int(b / a) + (b % a > 0)))

Submission status: Runtime Error

Solution code:
import math

x = input()
a = int(x[0])
b = int(x[2])
j = math.ceil((b/a))
print(j)

Submission status: Runtime Error

Solution code:
x = input()
a = int(x[0])
b = int(x[2])
j = 0
y = 0
while j != b:
  j = j+a
  if j > b:
    j = b
  y = y+1
print(y)

Submission status: Runtime Error

Solution code:
x = input()
a = int(x[0])
b = int(x[2])
j = 0
y = 0
while j != b:
  j = j+a
  if j > b:
    j = b
  y = y+1

Submission status: Runtime Error

Solution code:

sockets, goals = input().split()
sockets, goals = int(sockets), int(goals)
count = 1
 
while goal > sockets: 
    count += 1
    sockets *= count
print(count)