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:
sockets = int(input())
goal = int(input())
count = 1
 
while goal > sockets: 
    count += 1
    sockets *= count
print(count)

Submission status: Runtime Error

Solution code:
sockets = int(input())
goal = int(input())
count = 1
 
while goal < sockets: 
    count += 1
    sockets *= count
print(count)

Submission status: Runtime Error

Solution code:
sockets = int(input())
goal = int(input())
count += 1

while goal < sockets: 
    count += 1
    sockets *= count
print(count)

Submission status: Runtime Error

Solution code:
import math


def kaijo(n):
    if n == 0:
        return 1
    return n * kaijo(n - 1)


a, b = map(int,input().split())

ans = 0
for i in range(5):
    if b == 0:
        ans = 0
        break
    if a == b:
        ans = 1
        break
    if a ** i < b:
        continue
    ans = math.floor(b / (a ** (i - 1))) + kaijo(i-1)
    break

print(ans)

Submission status: Runtime Error

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

Submission status: Runtime Error

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

n = (B-A) / (A-1) + 1
print(math.ceil(n))

Submission status: Runtime Error

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

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

Submission status: Runtime Error

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

ans = (b-1 + (a-2)) // (a-1)

print(ans)

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

cnt = 1
num = A

if num < B:
  while num < B:
    num = num + (A -1)
    cnt += 1
elif B == 1:
  cnt = 0
  
print(cnt)

Submission status: Runtime Error

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

cnt = 1
num = A

if num < B:
  while num < B:
    num = num + (A - 1)
    cnt += 1
  
print(cnt)

Submission status: Runtime Error

Solution code:
import math

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

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:
A,B = map(int, input().split())
print((B-1)//(A-2) + 1)

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
a, b = list(map(int, input().split()))
ans = 1
cnt = a;
while True:
  	if ans == 21:
        break
    if cnt >= b:
        break
    cnt += a-1
    ans += 1
print(ans)

Submission status: Runtime Error

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

print(result)

Submission status: Runtime Error

Solution code:
# B - Power Socket

a = int(input())
b = int(input())
div = b // (a - 1)
mod = b % (a - 1)

print(1 if a == b else (div + 1 if mod > 1 else div))

Submission status: Runtime Error

Solution code:
a = int(input())
b = int(input())
s = 1
c = 0
while s<b:
    s += a - 1
    c += 1
print(c)

Submission status: Runtime Error

Solution code:
a, b = map(int, input())
tap_count = 1
a_count = 0
while tap_count <= b:
  tap_count = tap_count + a - 1
  a_count = a_count + 1
print("{}".format(a_count))

Submission status: Runtime Error

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

ans = 0
outlet = 1

while b > outlet:
    ans = ans + 1
    outlet = outlet + (a-1)
print(ans)

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

ans = 0
outlet = 1

while B > outlet:
    ans = ans + 1
    outlet = outlet + (A-1)
print(ans)

Submission status: Runtime Error

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

count = 0

while B > 1 + (A-1)*(count):
    count = count + 1
print(count)

Submission status: Runtime Error

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

total = 1
count = 0

while B > total:
    count = count + 1
    total = total -1 + A

print(count)

Submission status: Runtime Error

Solution code:
def socket(x):
  if b<x*a
print(socket(x))

Submission status: Runtime Error

Solution code:
if b <x*a:
  return x

print(x)

Submission status: Runtime Error

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

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

Submission status: Runtime Error

Solution code:
a = input()
a = int(a)
b = input()
b = int(b)
count = 1
i = 0
while True:
    if b <= count:
        break
    count += a - 1
    i += 1
print(i)

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

if( (b-1) % (a-1) > 0:
   c = c+1
print(c)

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
import math

A = int(input())
B = int(input())

X = B / A

print(math.ceil(X))

Submission status: Runtime Error

Solution code:
import math

A = int(input())
B = int(input())

X = B / A
XX = B // A

if XX == 0:
    print(X)
else:
    print(math.ceil(X))

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
a, b = [int(i) for i in input().split()]
print(min([num for num in range(1, 20) if (a - 1) * (num - 1) + a > b]))

Submission status: Runtime Error

Solution code:
A,B=map(int,input())
c=0
if B%A!=0:
  c=1
print(B+c)

Submission status: Runtime Error

Solution code:
from sys import stdin
 
s,t =input().split()
count=int(s)
goal=int(t)
total=count
cnt=1
if goal==1:
  cnt=0
else:
	while total<goal :
 	  total=total+count-1
	  cnt+=1
  
print(cnt)

Submission status: Runtime Error

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

if b%a = 0:
  print(int(b%a))
else:
  print(int(b//a)+1)

Submission status: Runtime Error

Solution code:
A = input()
B = input()
 
for n in range(20):
  t = A*n - n
  if t >= B:
    print(n)
    exit()

Submission status: Runtime Error

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

for n in range(20):
  t = A*n - n
  if t >= B:
    print(n)

Submission status: Runtime Error

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

for n in range(20):
  if A*n-n >= B:
    print(n)

Submission status: Runtime Error

Solution code:
A,B = map(int, input().split())
for x in range(20):
  s = (A-1)*(x-1)+A
  if B <= s:
    print(x)
	break

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
a, b = map(int, input().split())
cnt = 1
sum_a = a
if a == b:
  print(cnt)
  return 0
while(1):
  if sum_a >= b:
    break
  sum_a = sum_a + a - 1
  cnt += 1
print(cnt)

Submission status: Runtime Error

Solution code:
a, b = map(int, input().split())
cnt = 1
sum_a = a
if a == b:
  print(1)
  return 0
while(1):
  if sum_a >= b:
    break
  sum_a = sum_a + a - 1
  cnt += 1
print(cnt)

Submission status: Runtime Error

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

if n>=1:
    if n==int(n):
        output=n
    else :
       output=int(n)+1
else :pass

print(output)

Submission status: Runtime Error

Solution code:
A,B=map(int,input().split())
#
#B<=n*(A-1)+1
n=(B-1)/(A-1)

if n>=1:
    if n==int(n):
        output=n
    else :
       output=int(n)+1
else :pass

print(output)

Submission status: Runtime Error

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

tap = 0

if b != 1:
    while ( (tap*(a-1) +1) < b:
        tap += 1

print(tap)

Submission status: Runtime Error

Solution code:
l = list(map(int,input().sprit()))
a = l[0]
b = l[1]
if b == 1:
    print(0)
else:
    print((b-1//a)+1)

Submission status: Runtime Error

Solution code:
l = list(map(int,input().sprit()))
a = l[0]
b = l[1]
if b == 1:
    print(0)
else:
    print((b+1) // a+1)

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

if b == 1:
    print('0')
else:
  	cnt = 1
	b -= a
    while True:
        if b > 0:
            b -= (a - 1)
            cnt += 1
        else:
            print(cnt)
            break

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
import math

a = input()
b = input()

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

if b = 1:
  ans = 0
else:
  ans = math.ceil((b - 1) / (a - 1))

print(ans)

Submission status: Runtime Error

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

if b > 1:
    c = 1
    for i in range(1,21):
        c = c + (a - 1)
        if c >= b:
            print(i)
            break
else:
    print(0)

Submission status: Runtime Error

Solution code:
#coding:utf-8
a, b = map(int, input().split())

if a >= b:
    print(1)
else:
    #1つタップを増やすとa-1口増えるので、b-1口増やすことを考える
    tap = -(-（((b-1)//(a-1)))
    print(tap)

Submission status: Runtime Error

Solution code:
a = input()
b = input()
A = int(a)
B = int(b)
count = 0
while B > 0:
    B = B - A
    count = count + 1
print(count)

Submission status: Runtime Error

Solution code:
A = input()
B = input()
A = int(A)
B = int(B)
count = 0
while B > 0:
    B = B - A
    count = count + 1
print(count)

Submission status: Runtime Error

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

print(answer)

Submission status: Runtime Error

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

Submission status: Runtime Error

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

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

Submission status: Runtime Error

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

c = 1
for i in range(20):
    if b > c:

        c += a-1
    else:
        break
print(count / a-1)

Submission status: Runtime Error

Solution code:
import sys
 
a, b = map(int, input().split())
add_value = 0
 
if a >= 20 and a <= 2:
	print("0")
    sys.exit()
if b >= 20 and b <= 1:
  	print("0")
    sys.exit()
 
while True:
        add_value += 1
        a *= add_value
        if a >= b:
            break

Submission status: Runtime Error

Solution code:
a,b = (int(i) for i in input().split())
if a == 2: 
	 if b == 1:
		ans = 0
	 elif b == 2:
		ans = 1
	 elif b == 3:
		ans = 2
	 elif b == 4:
		ans = 3
	 elif b == 5:
		ans = 4
	 elif b == 6:
		ans = 5
	 elif b == 7:
		ans = 6
	 elif b == 8:
		ans = 7
	 elif b == 9:
		ans = 8
	 elif b == 10:
		ans = 9
	 elif b == 11:
		ans = 10
	 elif b == 12:
		ans = 11
	 elif b == 13:
		ans = 12
	 elif b == 14:
		ans = 13
	 elif b == 15:
		ans = 14
	 elif b == 16:
		ans = 15
	 elif b == 17:
		ans = 16
	 elif b == 18:
		ans = 17
	 elif b == 19:
		ans = 18
	 elif b == 20:
		ans = 19
elif a == 3: 
	 if b == 1:
		ans = 0
	 elif b == 2:
		ans = 1
	 elif b == 3:
		ans = 1
	 elif b == 4:
		ans = 2
	 elif b == 5:
		ans = 2
	 elif b == 6:
		ans = 3
	 elif b == 7:
		ans = 3
	 elif b == 8:
		ans = 4
	 elif b == 9:
		ans = 4
	 elif b == 10:
		ans = 5
	 elif b == 11:
		ans = 5
	 elif b == 12:
		ans = 6
	 elif b == 13:
		ans = 6
	 elif b == 14:
		ans = 7
	 elif b == 15:
		ans = 7
	 elif b == 16:
		ans = 8
	 elif b == 17:
		ans = 8
	 elif b == 18:
		ans = 9
	 elif b == 19:
		ans = 9
	 elif b == 20:
		ans = 10
elif a == 4: 
	 if b == 1:
		ans = 0
	 elif b == 2:
		ans = 1
	 elif b == 3:
		ans = 1
	 elif b == 4:
		ans = 1
	 elif b == 5:
		ans = 2
	 elif b == 6:
		ans = 2
	 elif b == 7:
		ans = 2
	 elif b == 8:
		ans = 3
	 elif b == 9:
		ans = 3
	 elif b == 10:
		ans = 3
	 elif b == 11:
		ans = 4
	 elif b == 12:
		ans = 4
	 elif b == 13:
		ans = 4
	 elif b == 14:
		ans = 5
	 elif b == 15:
		ans = 5
	 elif b == 16:
		ans = 5
	 elif b == 17:
		ans = 6
	 elif b == 18:
		ans = 6
	 elif b == 19:
		ans = 6
	 elif b == 20:
		ans = 7
elif a == 5: 
	 if b == 1:
		ans = 0
	 elif b == 2:
		ans = 1
	 elif b == 3:
		ans = 1
	 elif b == 4:
		ans = 1
	 elif b == 5:
		ans = 1
	 elif b == 6:
		ans = 2
	 elif b == 7:
		ans = 2
	 elif b == 8:
		ans = 2
	 elif b == 9:
		ans = 2
	 elif b == 10:
		ans = 3
	 elif b == 11:
		ans = 3
	 elif b == 12:
		ans = 3
	 elif b == 13:
		ans = 3
	 elif b == 14:
		ans = 4
	 elif b == 15:
		ans = 4
	 elif b == 16:
		ans = 4
	 elif b == 17:
		ans = 4
	 elif b == 18:
		ans = 5
	 elif b == 19:
		ans = 5
	 elif b == 20:
		ans = 5
elif a == 6: 
	 if b == 1:
		ans = 0
	 elif b == 2:
		ans = 1
	 elif b == 3:
		ans = 1
	 elif b == 4:
		ans = 1
	 elif b == 5:
		ans = 1
	 elif b == 6:
		ans = 1
	 elif b == 7:
		ans = 2
	 elif b == 8:
		ans = 2
	 elif b == 9:
		ans = 2
	 elif b == 10:
		ans = 2
	 elif b == 11:
		ans = 2
	 elif b == 12:
		ans = 3
	 elif b == 13:
		ans = 3
	 elif b == 14:
		ans = 3
	 elif b == 15:
		ans = 3
	 elif b == 16:
		ans = 3
	 elif b == 17:
		ans = 4
	 elif b == 18:
		ans = 4
	 elif b == 19:
		ans = 4
	 elif b == 20:
		ans = 4
elif a == 7: 
	 if b == 1:
		ans = 0
	 elif b == 2:
		ans = 1
	 elif b == 3:
		ans = 1
	 elif b == 4:
		ans = 1
	 elif b == 5:
		ans = 1
	 elif b == 6:
		ans = 1
	 elif b == 7:
		ans = 1
	 elif b == 8:
		ans = 2
	 elif b == 9:
		ans = 2
	 elif b == 10:
		ans = 2
	 elif b == 11:
		ans = 2
	 elif b == 12:
		ans = 2
	 elif b == 13:
		ans = 2
	 elif b == 14:
		ans = 3
	 elif b == 15:
		ans = 3
	 elif b == 16:
		ans = 3
	 elif b == 17:
		ans = 3
	 elif b == 18:
		ans = 3
	 elif b == 19:
		ans = 3
	 elif b == 20:
		ans = 4
elif a == 8: 
	 if b == 1:
		ans = 0
	 elif b == 2:
		ans = 1
	 elif b == 3:
		ans = 1
	 elif b == 4:
		ans = 1
	 elif b == 5:
		ans = 1
	 elif b == 6:
		ans = 1
	 elif b == 7:
		ans = 1
	 elif b == 8:
		ans = 1
	 elif b == 9:
		ans = 2
	 elif b == 10:
		ans = 2
	 elif b == 11:
		ans = 2
	 elif b == 12:
		ans = 2
	 elif b == 13:
		ans = 2
	 elif b == 14:
		ans = 2
	 elif b == 15:
		ans = 2
	 elif b == 16:
		ans = 3
	 elif b == 17:
		ans = 3
	 elif b == 18:
		ans = 3
	 elif b == 19:
		ans = 3
	 elif b == 20:
		ans = 3
elif a == 9: 
	 if b == 1:
		ans = 0
	 elif b == 2:
		ans = 1
	 elif b == 3:
		ans = 1
	 elif b == 4:
		ans = 1
	 elif b == 5:
		ans = 1
	 elif b == 6:
		ans = 1
	 elif b == 7:
		ans = 1
	 elif b == 8:
		ans = 1
	 elif b == 9:
		ans = 1
	 elif b == 10:
		ans = 2
	 elif b == 11:
		ans = 2
	 elif b == 12:
		ans = 2
	 elif b == 13:
		ans = 2
	 elif b == 14:
		ans = 2
	 elif b == 15:
		ans = 2
	 elif b == 16:
		ans = 2
	 elif b == 17:
		ans = 2
	 elif b == 18:
		ans = 3
	 elif b == 19:
		ans = 3
	 elif b == 20:
		ans = 3
elif a == 10: 
	 if b == 1:
		ans = 0
	 elif b == 2:
		ans = 1
	 elif b == 3:
		ans = 1
	 elif b == 4:
		ans = 1
	 elif b == 5:
		ans = 1
	 elif b == 6:
		ans = 1
	 elif b == 7:
		ans = 1
	 elif b == 8:
		ans = 1
	 elif b == 9:
		ans = 1
	 elif b == 10:
		ans = 1
	 elif b == 11:
		ans = 2
	 elif b == 12:
		ans = 2
	 elif b == 13:
		ans = 2
	 elif b == 14:
		ans = 2
	 elif b == 15:
		ans = 2
	 elif b == 16:
		ans = 2
	 elif b == 17:
		ans = 2
	 elif b == 18:
		ans = 2
	 elif b == 19:
		ans = 2
	 elif b == 20:
		ans = 3
elif a == 11: 
	 if b == 1:
		ans = 0
	 elif b == 2:
		ans = 1
	 elif b == 3:
		ans = 1
	 elif b == 4:
		ans = 1
	 elif b == 5:
		ans = 1
	 elif b == 6:
		ans = 1
	 elif b == 7:
		ans = 1
	 elif b == 8:
		ans = 1
	 elif b == 9:
		ans = 1
	 elif b == 10:
		ans = 1
	 elif b == 11:
		ans = 1
	 elif b == 12:
		ans = 2
	 elif b == 13:
		ans = 2
	 elif b == 14:
		ans = 2
	 elif b == 15:
		ans = 2
	 elif b == 16:
		ans = 2
	 elif b == 17:
		ans = 2
	 elif b == 18:
		ans = 2
	 elif b == 19:
		ans = 2
	 elif b == 20:
		ans = 2
elif a == 12: 
	 if b == 1:
		ans = 0
	 elif b == 2:
		ans = 1
	 elif b == 3:
		ans = 1
	 elif b == 4:
		ans = 1
	 elif b == 5:
		ans = 1
	 elif b == 6:
		ans = 1
	 elif b == 7:
		ans = 1
	 elif b == 8:
		ans = 1
	 elif b == 9:
		ans = 1
	 elif b == 10:
		ans = 1
	 elif b == 11:
		ans = 1
	 elif b == 12:
		ans = 1
	 elif b == 13:
		ans = 2
	 elif b == 14:
		ans = 2
	 elif b == 15:
		ans = 2
	 elif b == 16:
		ans = 2
	 elif b == 17:
		ans = 2
	 elif b == 18:
		ans = 2
	 elif b == 19:
		ans = 2
	 elif b == 20:
		ans = 2
elif a == 13: 
	 if b == 1:
		ans = 0
	 elif b == 2:
		ans = 1
	 elif b == 3:
		ans = 1
	 elif b == 4:
		ans = 1
	 elif b == 5:
		ans = 1
	 elif b == 6:
		ans = 1
	 elif b == 7:
		ans = 1
	 elif b == 8:
		ans = 1
	 elif b == 9:
		ans = 1
	 elif b == 10:
		ans = 1
	 elif b == 11:
		ans = 1
	 elif b == 12:
		ans = 1
	 elif b == 13:
		ans = 1
	 elif b == 14:
		ans = 2
	 elif b == 15:
		ans = 2
	 elif b == 16:
		ans = 2
	 elif b == 17:
		ans = 2
	 elif b == 18:
		ans = 2
	 elif b == 19:
		ans = 2
	 elif b == 20:
		ans = 2
elif a == 14: 
	 if b == 1:
		ans = 0
	 elif b == 2:
		ans = 1
	 elif b == 3:
		ans = 1
	 elif b == 4:
		ans = 1
	 elif b == 5:
		ans = 1
	 elif b == 6:
		ans = 1
	 elif b == 7:
		ans = 1
	 elif b == 8:
		ans = 1
	 elif b == 9:
		ans = 1
	 elif b == 10:
		ans = 1
	 elif b == 11:
		ans = 1
	 elif b == 12:
		ans = 1
	 elif b == 13:
		ans = 1
	 elif b == 14:
		ans = 1
	 elif b == 15:
		ans = 2
	 elif b == 16:
		ans = 2
	 elif b == 17:
		ans = 2
	 elif b == 18:
		ans = 2
	 elif b == 19:
		ans = 2
	 elif b == 20:
		ans = 2
elif a == 15: 
	 if b == 1:
		ans = 0
	 elif b == 2:
		ans = 1
	 elif b == 3:
		ans = 1
	 elif b == 4:
		ans = 1
	 elif b == 5:
		ans = 1
	 elif b == 6:
		ans = 1
	 elif b == 7:
		ans = 1
	 elif b == 8:
		ans = 1
	 elif b == 9:
		ans = 1
	 elif b == 10:
		ans = 1
	 elif b == 11:
		ans = 1
	 elif b == 12:
		ans = 1
	 elif b == 13:
		ans = 1
	 elif b == 14:
		ans = 1
	 elif b == 15:
		ans = 1
	 elif b == 16:
		ans = 2
	 elif b == 17:
		ans = 2
	 elif b == 18:
		ans = 2
	 elif b == 19:
		ans = 2
	 elif b == 20:
		ans = 2
elif a == 16: 
	 if b == 1:
		ans = 0
	 elif b == 2:
		ans = 1
	 elif b == 3:
		ans = 1
	 elif b == 4:
		ans = 1
	 elif b == 5:
		ans = 1
	 elif b == 6:
		ans = 1
	 elif b == 7:
		ans = 1
	 elif b == 8:
		ans = 1
	 elif b == 9:
		ans = 1
	 elif b == 10:
		ans = 1
	 elif b == 11:
		ans = 1
	 elif b == 12:
		ans = 1
	 elif b == 13:
		ans = 1
	 elif b == 14:
		ans = 1
	 elif b == 15:
		ans = 1
	 elif b == 16:
		ans = 1
	 elif b == 17:
		ans = 2
	 elif b == 18:
		ans = 2
	 elif b == 19:
		ans = 2
	 elif b == 20:
		ans = 2
elif a == 17: 
	 if b == 1:
		ans = 0
	 elif b == 2:
		ans = 1
	 elif b == 3:
		ans = 1
	 elif b == 4:
		ans = 1
	 elif b == 5:
		ans = 1
	 elif b == 6:
		ans = 1
	 elif b == 7:
		ans = 1
	 elif b == 8:
		ans = 1
	 elif b == 9:
		ans = 1
	 elif b == 10:
		ans = 1
	 elif b == 11:
		ans = 1
	 elif b == 12:
		ans = 1
	 elif b == 13:
		ans = 1
	 elif b == 14:
		ans = 1
	 elif b == 15:
		ans = 1
	 elif b == 16:
		ans = 1
	 elif b == 17:
		ans = 1
	 elif b == 18:
		ans = 2
	 elif b == 19:
		ans = 2
	 elif b == 20:
		ans = 2
elif a == 18: 
	 if b == 1:
		ans = 0
	 elif b == 2:
		ans = 1
	 elif b == 3:
		ans = 1
	 elif b == 4:
		ans = 1
	 elif b == 5:
		ans = 1
	 elif b == 6:
		ans = 1
	 elif b == 7:
		ans = 1
	 elif b == 8:
		ans = 1
	 elif b == 9:
		ans = 1
	 elif b == 10:
		ans = 1
	 elif b == 11:
		ans = 1
	 elif b == 12:
		ans = 1
	 elif b == 13:
		ans = 1
	 elif b == 14:
		ans = 1
	 elif b == 15:
		ans = 1
	 elif b == 16:
		ans = 1
	 elif b == 17:
		ans = 1
	 elif b == 18:
		ans = 1
	 elif b == 19:
		ans = 2
	 elif b == 20:
		ans = 2
elif a == 19: 
	 if b == 1:
		ans = 0
	 elif b == 2:
		ans = 1
	 elif b == 3:
		ans = 1
	 elif b == 4:
		ans = 1
	 elif b == 5:
		ans = 1
	 elif b == 6:
		ans = 1
	 elif b == 7:
		ans = 1
	 elif b == 8:
		ans = 1
	 elif b == 9:
		ans = 1
	 elif b == 10:
		ans = 1
	 elif b == 11:
		ans = 1
	 elif b == 12:
		ans = 1
	 elif b == 13:
		ans = 1
	 elif b == 14:
		ans = 1
	 elif b == 15:
		ans = 1
	 elif b == 16:
		ans = 1
	 elif b == 17:
		ans = 1
	 elif b == 18:
		ans = 1
	 elif b == 19:
		ans = 1
	 elif b == 20:
		ans = 2
elif a == 20: 
	 if b == 1:
		ans = 0
	 elif b == 2:
		ans = 1
	 elif b == 3:
		ans = 1
	 elif b == 4:
		ans = 1
	 elif b == 5:
		ans = 1
	 elif b == 6:
		ans = 1
	 elif b == 7:
		ans = 1
	 elif b == 8:
		ans = 1
	 elif b == 9:
		ans = 1
	 elif b == 10:
		ans = 1
	 elif b == 11:
		ans = 1
	 elif b == 12:
		ans = 1
	 elif b == 13:
		ans = 1
	 elif b == 14:
		ans = 1
	 elif b == 15:
		ans = 1
	 elif b == 16:
		ans = 1
	 elif b == 17:
		ans = 1
	 elif b == 18:
		ans = 1
	 elif b == 19:
		ans = 1
	 elif b == 20:
		ans = 1
print(ans)

Submission status: Runtime Error

Solution code:
for i in range(B):
    if A * i >= B:
        print(i)
        break

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
import math


def power():
  	A, B= map(int, input().split())
    return math.ceil(A / B)


print(power(8, 8))

Submission status: Runtime Error

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

using namespace std;

int main() {
	int A, B; cin >> A >> B;
	int ans = 0;
	int outlet = 1;
	while (outlet < B) {
		--outlet;
		outlet += A;
		++ans;
	}
	cout << ans << endl;
}

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
kuti = 1
k = 0
for i in range(100):
    if kuti>=B:
        print(k)
        break
    elif B == 1:
        print(0)
    else:
        kuti += A-1
        k += 1

Submission status: Runtime Error

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

print(-((-b+1)//(a-1)))

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
a = list(map(int,input().split()))
# sum_a = a[0]+(a[0]-1)+(a[0]-1)
sum_a=0
for i in range(100000000):
   if(sum_a>＝a[1]):
      break
   if(i==0):
      sum_a=a[0]
   else:
      sum_a=sum_a+(a[0]-1)

print(i)

Submission status: Runtime Error

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

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
n = int(input())


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

Submission status: Runtime Error

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

if b<=1:
	print("0")
else:
	while 1+(a-1)*c<b:
		c=c+1


print(c)

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
import math

A = int(input())
B = int(input())

x = ((B-1) // (A-1))+1
print(math.ceil(x))

Submission status: Runtime Error

Solution code:
import math

A = int(input())
B = int(input())

x = ((B-1) / (A-1))+0
print(math.ceil(x))

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
# from math import factorial
# from collections import defaultdict, deque
#  from heapq import heappush, heappop

# A, B = [int(i) for i in input().split(" ")]
# A = int(input())
# As = [int(i) for i in input().split(" ")]
# Ss = ["".join(sorted(input())) for _ in range(N)]
# A = int(input())

A, B = [int(i) for i in input().split(" ")]
total = A
ans = 1
if B == 1: return 0
while True:
   if B <= total: break
   ans += 1
   total += A  -1
print(ans)

Submission status: Runtime Error

Solution code:
tap,out = map(int,input().split()
print(int((out-1)/(tap-1)))

Submission status: Runtime Error

Solution code:
tap,out = map(int,input().split()
print((out-1)/(tap-1))

Submission status: Runtime Error

Solution code:
s=list(map(int,input().split()))
if s[1]==1:
	print(0)
else:
  	num=1
	cost=s[0]
	while cost < s[1]:
    	num+=1
    	cost+=(s[0]-1)
print(num)

Submission status: Runtime Error

Solution code:
a, b = (int(_) for _ in input().split())
total = 1
ans = 0
if b == 1:
    print(1)
else:
    while total < b:
      	total -= 1
        total += a
        ans += 1
        
print(ans)

Submission status: Runtime Error

Solution code:
a,b = map(int,input().split())
cnt = 0
x = 0
if a == b:
    print(1)
else:
    for _ in range(100):
    x = a - 1
    cnt += 1
    if x + a >= b:
        y = cnt + 1
        print(y)
        exit()

Submission status: Runtime Error

Solution code:

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

Submission status: Runtime Error

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

ans = 0

while b > 0:
	if b - ( a - 1 ) > a:
    	b -= a - 1
        ans += 1
    else:
        b -= a
        ans += 1

print(ans)

Submission status: Runtime Error

Solution code:
a = [int(i) for i in input().split()]
ans=0
num=0
while True:
  	if a[1]==1:
      break
    if (a[0]-1)*num+a[0] >= a[1]:
        ans = num+1
        break
    num += 1
print(ans)

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
    x,y = map(int,input().split())
    if x==2:
      print(x+1)
    else:  
    	print((y//(x+1))+1)

Submission status: Runtime Error

Solution code:
po=list(map(int,input().split()))
A=po[0]
B=po[1]
C=po[0]-1
ans=1
if B == 1:
    ans=0
elif:B == 0:
    ans=0
else:
    while A < B:
        ans=ans+1
        A=A+C
print(ans)
print(A)

Submission status: Runtime Error

Solution code:
    x,y = map(int,input().split())
    if x==2:
      print(x+1)
    print((y//(x+1))+1)

Submission status: Runtime Error

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

if A == B:
  print(1)
  exit()
for i in range(1,21):
	nokori = (A*i) + (-1 * i)
    if nokori >= B:
      print(i)
      exit()

Submission status: Runtime Error

Solution code:
po=list(map(int,input().split()))
A=po[0]
B=po[1]
C=po[0]-1
ans=1
if B == 1:
    ans=0
    break
else:
    while A < B:
        ans=ans+1
        A=A+C
print(ans)
print(A)

Submission status: Runtime Error

Solution code:
a, b = map(int, input().split())
count = 1
 
for i in range(20):
    if b > count:
        count += a-1
    else:
        break
if -(-count // a) >= 1:
    print(-(-count // a))
else:
    print(0