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: Accepted

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

if b == 1:
        print(0)
        exit()

count = 1
ans = 1

for i in range(b):
        
        count += a-1
        if count >= b:
                print(ans)
                exit() 
        ans += 1

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

ans = 0
while 1 + (A-1) * ans < B:
    ans += 1
print(ans)

Submission status: Accepted

Solution code:
input = raw_input

x,y = map(int, input().split(" "))
ans = 0
t = 1
while t < y:
    t += (x-1)
    ans += 1
print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#import pysnooper
#import os,re,sys,operator,math,heapq,string
#from collections import Counter,deque
#from operator import itemgetter
#from itertools import accumulate,combinations,groupby,combinations_with_replacement
from sys import stdin,setrecursionlimit
#from copy import deepcopy

setrecursionlimit(10**6)
input=stdin.readline

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

Submission status: Accepted

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


def solve(A: int, B: int):
    count_plug = 0
    count_available = 1
    if B==1:
        print(0)
        return
    while True:
        count_plug += 1
        count_available -= 1
        count_available += A
        if count_available >= B:
            break
    print(count_plug)
    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()
    A = int(next(tokens))  # type: int
    B = int(next(tokens))  # type: int
    solve(A, B)

if __name__ == '__main__':
    main()

Submission status: Accepted

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

ans = 0
plug=1

while True:
    if plug>=b:
        break
    plug+=(a-1)
    ans+=1

print(ans)

Submission status: Accepted

Solution code:
a,b = (int(i) for i in input().split())
if b == 1:
    print(0)
    exit()
tap = 0
ans = 0
while True:
    tap += a
    ans += 1
    if tap >= b: break
    tap -= 1
print(ans)

Submission status: Accepted

Solution code:
A, B = map(int, input().split())
q, mod = divmod(B, A-1)
if A == 2:
    print(B-1)
    exit(0)
if mod > 1:
    print(q+1)
else:
    print(q)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

# (A-1) * (n-1) + A >= B となる最小の n を求める
# (A-1) * n >= B - 1

n =  ((B-1) + (A-1) - 1) // (A-1)
print(n)

Submission status: Accepted

Solution code:
TS = input().split()
T = int(TS[0])
S = int(TS[1])

count = 0
soket = 1

while(soket < S):
  soket = soket -1 + T
  count += 1

print(count)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

if b == 1:
  print(0)
else:
  for i in range(100):
    if a + (a-1)*i >= b:
      print(i+1)
      break

Submission status: Accepted

Solution code:
import sys

A,B=map(int, sys.stdin.readline().split())
tap=0
sockets=1
while(sockets < B):
  tap +=1
  sockets=(A-1)*tap +1

print(tap)

Submission status: Accepted

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

needed = b - 1



plug = needed // (a-1)

if needed % (a-1) != 0:
    plug += 1

print(plug)

Submission status: Accepted

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

Submission status: Accepted

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

if B == 1:
    print(0)
else:
    total = 1
    B -= A

    while B > 0:
        B -= A - 1
        total += 1
    print(total)

Submission status: Accepted

Solution code:
import math

def main():
    A,B = map(int,input().split())
    print(math.ceil((B-1)/(A-1)))

main()

Submission status: Accepted

Solution code:
if __name__ == '__main__':
    a,b = map(int, input().split())

    plug_no = 1

    answer = 0
    while(True):
        if plug_no >= b:
            break
        answer += 1
        plug_no += (a-1)

    print(answer)

Submission status: Accepted

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

total_empty = 0
count = 0
while total_empty + 1 < B:
	total_empty += A-1
	count += 1
print(count)

Submission status: Accepted

Solution code:
import sys
a,b = map(int,input().split())
if b == 1:
  print('0')
  sys.exit()
tap = a
ans = 1
while b > tap:
  tap += a-1
  ans += 1

print(ans)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#B
#差込口: 
#1, a, (a-1)+a, (a-1)+(a-1)+a
from math import ceil
a,b = map(int, input().split())

if b == 1:
    print(0)
elif b < a:
    print(1)
else:
    n = ceil((b-a) / (a-1)) + 1
    print(n)

Submission status: Accepted

Solution code:
A, B = [int(x) for x in input().split()]
count = 0
total_kuchi = 1
while True:
    if total_kuchi >= B:
        break
    total_kuchi += A - 1
    count += 1

print(count)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import math
[a, b] = [int(i) for i in input().split()]

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

Submission status: Accepted

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

while num < B:
    cnt = cnt + 1
    num = num + A - 1

print(cnt)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def makelist(n, m):
    return [[0 for _ in range(m)] for _ in range(n)]

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

Submission status: Accepted

Solution code:
A,B=map(int,input().split())
n=0
s=1
while s<=B:
    s=1+(A-1)*n
    if s>=B:
        print(n)
        exit()
    n+=1

Submission status: Accepted

Solution code:
#coding:utf-8
import sys
sys.setrecursionlimit(10**6)
write = sys.stdout.write
dbg = lambda *something : print(*something) if DEBUG else 0
DEBUG = False
def main(given = sys.stdin.readline):
    input = lambda : given().rstrip()
    LMIIS = lambda : list(map(int,input().split()))
    II = lambda : int(input())
    XLMIIS = lambda x : [LMIIS() for _ in range(x)]
    import math
    A,B = LMIIS()
    print(math.ceil((B-A)/(A-1))+1)



if __name__ == '__main__':
    main()

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

if B == 1:
    print(0)
    exit(0)

if A >= B:
    print(1)
    exit(0)

ans = 1
t = A-1
while A < B:
    ans += 1
    A += t

print(ans)

Submission status: Accepted

Solution code:
str_list = input().split(' ')
int_list = [int(x) for x in str_list]
A, B = int_list[0], int_list[1]
count=0
while A+(A-1)*(count-1)<B:
    count+=1
print(count)

Submission status: Accepted

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

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

Submission status: Accepted

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

increas = A -1
plugin = 1

i = 0
while True:
    if plugin >= B:
        break
    i += 1
    plugin += increas

print(i)

Submission status: Accepted

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

Submission status: Accepted

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

amari = (b - 1) % (a - 1)
syo = (b - 1) // (a - 1)

if amari == 0:
    print(syo)
else:
    print(syo + 1)

Submission status: Accepted

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

Submission status: Accepted

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

if b == 1:
  print(0)
  exit()

ans = 1
c = a
while c < b:
  c += (a - 1)
  ans += 1

print(ans)

Submission status: Accepted

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

count = 0
if B == 1:
    count = 0
else:
    while B > 0:
        B -= A
        count += 1
        if B > 0:
            B += 1

print(count)

Submission status: Accepted

Solution code:
import math 

A, B = list(map(int, input().split()))
print(math.ceil((B-1)/(A-1)))

Submission status: Accepted

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

if b == 1:
    print(0)
    exit(0)

r = 0

rest_b = b - a

r += 1

if rest_b <= 0:
    print(r)
    exit(0)


while 0 < rest_b:
    rest_b -= a - 1
    r += 1

print(r)

Submission status: Accepted

Solution code:
import sys
from pprint import pprint

def solve(a, b):
    ans = 0
    emp = 1
    while emp < b:
        emp += a - 1
        ans += 1
    print(ans)

if __name__ == '__main__':
  a, b = map(int, sys.stdin.readline().strip().split(" "))
  solve(a, b)

Submission status: Accepted

Solution code:
a, b = [int(x) for x in input().split()]

if b == 1:
  print(0)
else:
  taps, anum = a, 1
  while taps < b:
    anum += 1
    taps = taps - 1 + a  
  print(anum)

Submission status: Accepted

Solution code:
# 2019/09/01

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#import sys
A, B = list(map(int,input().split()))
count = 0
tukaeru = A
if B > 1 :
    while True :
        count += 1
        if tukaeru >= B :
            break
        else :
            tukaeru += A -1
print(count)

Submission status: Accepted

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

count = 1
n = 1
while count < consent:
    count = n * tap - (n-1)
    n += 1

print(n-1)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
a,b = [int(s) for s in input().split()]
p = 0
count = 1

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

Submission status: Accepted

Solution code:
#!/usr/bin/python3
# -*- coding: utf-8 -*-
import math


A,B = map(int, input().split())
B -= A
print(math.ceil(B/(A-1))+1)

Submission status: Accepted

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

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

Submission status: Accepted

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

print(ans)

Submission status: Accepted

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

power_strip = 0
slot = 1

while slot < b:
    power_strip += 1
    slot += a-1

print(power_strip)

Submission status: Accepted

Solution code:
import math

A,B=map(int, input().split())
sub=B-A
print(math.ceil(sub/(A-1))+1)

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
a,b = list(map(int,input().split()))
check = 1
c = 0
for i in range(1,21):
        if check >= b:break
        check -= 1
        check += a
        c += 1
print(c)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import math

A, B = list(map(int, input().split()))
print(math.ceil((B - 1) / (A - 1)))

Submission status: Accepted

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


if (b-1)%(a-1)==0:
  ans=(b-1)//(a-1)
else:
  ans=((b-1)//(a-1))+1

  
print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
input = sys.stdin.readline
sys.setrecursionlimit(10 ** 7)

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

ans = 0
tmp = 1
while B > tmp:
    ans += 1
    tmp = tmp + A - 1

print(ans)

Submission status: Accepted

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


def solve(A: int, B: int):
    res = 0
    if B == 1:
        res = 0
    elif B <= A:
        res = 1
    else:
        B -= A
        res = 1
        res += B // (A-1)
        if B % (A-1) > 0:
            res += 1
    
    print(res)
        

    return


# Generated by 1.1.4 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()
    A = int(next(tokens))  # type: int
    B = int(next(tokens))  # type: int
    solve(A, B)

if __name__ == '__main__':
    main()

Submission status: Accepted

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

num_sockets = 1
count = 0

while True:
    if num_sockets >= B:
        break
    count += 1
    num_sockets += (A - 1)

print(count)

Submission status: Accepted

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

a = A
c = 1
while(1):

    if B == 1:
        c = 0
        break

    if a >= B:
        break

    a = a + A - 1
    c += 1

print(c)

Submission status: Accepted

Solution code:
A,B = map(int,input().split(' '))
if B == 1:
	print(0)
	exit()

for i in range(30):
	num = A+(A-1)*i
	if num >= B:
		break

print(i+1)

Submission status: Accepted

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

if b==1:
    ans=0
elif b<=a:
    ans=1
else:
    i =1
    check=a
    while check<b:
        check +=a-1
        i+=1
    ans=i
print(ans)

Submission status: Accepted

Solution code:
import math

A,B = map(int,input().split())
print(math.ceil((B-1)/(A-1)))

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
#coding:utf-8

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

cnt = 0

if B == 1:
    print('0')

if B > 1:
    B -= A
    cnt += 1
    while B > 0:
        cnt += 1
        B -= A-1

    print(cnt)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import math

A, B = (int(x) for x in input().split())

N = (B-1)/(A-1)

print(math.ceil(N))

Submission status: Accepted

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

num_plugs = 1;
for i in range(25):
    if num_plugs < B:
        num_plugs += A-1
    else:
        print(i)
        break

Submission status: Accepted

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

ans = 1
cnt = 0
while True:
  if ans >= b:
    break
  else:
    ans += a - 1
  cnt += 1

print(cnt)

Submission status: Accepted

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

Submission status: Accepted

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

ret = 0
tap = 1
while(True):

  if tap >= b:
    break
  tap += a - 1
  ret += 1
print(ret)

Submission status: Accepted

Solution code:
A,B = map(int,input().split())
if B == 1:
    print(0)
    exit()
ans = B - A
cnt = 1
if ans <= 0:
    print(cnt)
else:
    while(ans>0):
        ans -= A-1
        cnt += 1
    print(cnt)

Submission status: Accepted

Solution code:
A,B = list(map(int, input().split()))
if B == 1:
    print(0)
    exit()
i=1
total = A
while total < B:
    total += (A - 1)
    i += 1

print(i)

Submission status: Accepted

Solution code:
line = input().split()
a,b = int(line[0]),int(line[1]) 

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

Submission status: Accepted

Solution code:
import numpy as np

AB=input().split()

A=int(AB[0])
B=int(AB[1])

count=1

T=B-A

count=T/(A-1)+count

print(int(np.ceil(count)))

Submission status: Accepted

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

res = 0
X = 1
while X < B:
    X += A - 1
    res += 1

print(res)

Submission status: Accepted

Solution code:
import sys
def input(): return sys.stdin.readline().strip()
def INT(): return int(input())
def MAP(): return map(int, input().split())
def LIST(): return list(map(int, input().split()))

counter = 0
N = 1
A,B = MAP()

while N<B:
    N -= 1
    N+= A
    counter+=1

print(counter)

Submission status: Accepted

Solution code:
a, b = map(int, raw_input().split())
# 1 + d(a - 1) > b
# d(a - 1) > b - 1
# d > (b - 1) / (a - 1)
d, m = divmod(b - 1, a - 1)
if m > 0:
	d += 1
print d

Submission status: Accepted

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

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

Submission status: Accepted

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

ans = 0
c = 1
if b == 1:
    print(0)
    exit()

while 1:
    ans += 1
    c += a - 1
    if c >= b:
        print(ans)
        exit()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def solve(S, T):
    count = 0
    for s, t in zip(S, T):
        count += (s == t)
    return count


if __name__ == '__main__':
    A, B = map(int, input().split())
    answer = -(-(B - 1) // (A - 1))
    print(answer)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

print(ans)

Submission status: Accepted

Solution code:
# coding: utf-8
# Your code here!
cnt=0
k=1
A,B=map(int,input().split())

while k<B:
    k+=A-1
    cnt+=1

print(cnt)

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
A, B = map(int, input().split())
cnt = 1
ans = 0
while True:
    if B <= cnt:
        print(ans)
        exit()
    cnt += A -1
    ans += 1

Submission status: Accepted

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

for i in range(21):
    if b <= tmp:
        print(i)
        break
    
    tmp = tmp-1 + a

Submission status: Accepted

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

Submission status: Accepted

Solution code:
a,b=list(map(int,input().split()))
k=0
n=1

while n < b:
    k += 1
    n = n+a-1

print(k)

Submission status: Accepted

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

ans = 0
count = 1

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

print(ans)

Submission status: Accepted

Solution code:
import math

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

ret = math.ceil((b-1)/(a-1))

print(ret)

Submission status: Accepted

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

init_num = 1

count = 0
flag = True

while flag:
    if init_num >= B:
        flag = False
        continue
    init_num += (A -1)
    count += 1
print(count)

Submission status: Accepted

Solution code:
from sys import stdin

if __name__ == '__main__':
    A, B = [ int(x) for x in stdin.readline().rstrip().split() ]
    num_of_tup = 0
    total_plugs = 1
    while True:
        if total_plugs >= B:
            break
        else:
            total_plugs = total_plugs - 1 + A
            num_of_tup += 1
    print(num_of_tup)

Submission status: Accepted

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

def main():
    # a = int(input())
    a, b = map(int, input().split())
    # a = list(map(int, input().split()))
    
    if b == 1:
        print(0)
    else:
        tmp = (b-a)/(a-1)
        if tmp - int(tmp) > 0:
            print(1 + int(tmp) + 1)
        else:
            print(1 + int(tmp))
        # print(1 + (b-a)//(a-1))


if __name__ == "__main__":
    main()

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys

sys.setrecursionlimit(4100000)


def inputs(num_of_input):
    ins = [input() for i in range(num_of_input)]
    return ins


def solve(inputs):
    [A, B] = string_to_int(inputs[0])

    count = 0
    i = 0
    if B == 1:
        return 0
    while count < B:
        if i != 0:
            count -= 1

        count += A

        i += 1
    return i


def string_to_int(string):
    return list(map(lambda x: int(x), string.split()))


if __name__ == "__main__":
    ret = solve(inputs(1))
    print(ret)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
A,B=map(int,input().split())
if (B-1)//(A-1)==(B-1)/(A-1):
    print(((B-1)//(A-1)))
else:
    print(((B-1)//(A-1)+1))

Submission status: Accepted

Solution code:
import sys

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

ava = 1
count = 0

if b == 1:
    print(0)
    sys.exit()

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

print(count)

Submission status: Accepted

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

Submission status: Accepted

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

count = 0
ans = 0

for i in range(1000):
    if count + 1 < B:
        count += A-1
        ans += 1
    else:
        break

print(ans)

Submission status: Accepted

Solution code:
a, b = [int(i) for i in input().split()]
if b == 1:
    print(0)
else:
    n_taps = 1
    n_sockets = a
    while n_sockets < b:
        n_sockets += a - 1
        n_taps += 1
    print(n_taps)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
A, B = map(int, input().split())
k, l = 0, 0
if B != 1:
  while l < B:
    if k == 0:
      l += A
    else:
      l += A - 1
    k += 1
  print(k)
elif B == 1:
  print(0)

Submission status: Accepted

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

while socket < B:
    socket += A-1
    times += 1
    
print(times)

Submission status: Accepted

Solution code:
def main():
    a,b=map(int,input().split(' '))
    print(int(-1*(-1*((b-a)/(a-1)+1)//1)))


if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
import math

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

print(math.ceil((B-1)/(A-1)))

Submission status: Accepted

Solution code:
# coding: utf-8
import sys
a,b = map(int,input().split())
ans = 0
tap = 1
if(b==1):
    print(0)
    sys.exit()
while(1):
    tap += a-1
    ans+=1
    if(tap>=b):
        print(ans)
        break

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#import numpy as np
#from numpy import*
#from scipy.sparse.csgraph import shortest_path #shortest_path(csgraph=graph) # dijkstra# floyd_warshall
#from scipy.sparse import csr_matrix
 
from collections import* #defaultdict Counter deque appendleft
from fractions import gcd
from functools import* #reduce
from itertools import* #permutations("AB",repeat=2) combinations("AB",2) product("AB",2) groupby accumulate
from operator import mul,itemgetter
from bisect import* #bisect_left bisect_right
from heapq import* #heapify heappop heappushpop
from math import factorial,pi
from copy import deepcopy
import sys
sys.setrecursionlimit(10**8)
#input=sys.stdin.readline  #危険！基本オフにしろ！
 
def main():
    a,b=map(int,input().split())
    if b>1:
        if b<=a:
            print(1)
        else:
            b-=a
            print((b-1)//(a-1)+2)
    else:
        print(0)
if __name__ == '__main__':
    main()

Submission status: Accepted

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

print(ceil((B-1)/(A-1)))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

N = 1
count = 0
while(N<B):
    N+=A
    N-=1
    count+=1

print(count)

Submission status: Accepted

Solution code:
import math

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

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

Submission status: Accepted

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

for i in range(b):
    if (a*i)-i+1 >= b:
        print(i)
        break

Submission status: Accepted

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

Submission status: Accepted

Solution code:
A , B = map(int , input().split())
ans = 1
tmp = A
if B == 1:
    print("0")
else:
    while(tmp < B):
        tmp += A - 1
        ans += 1
    print(ans)

Submission status: Accepted

Solution code:
A,B = map(int, input().strip().split(' '))
now = 1
ans = 0
while True:
  if now >= B:
    print(ans)
    exit()
  else:
    ans += 1
    now += A-1

Submission status: Accepted

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

n = 1
ans = 0
while n < B:
#  print (n, ans, B)
  n += A-1
  ans += 1
print (ans)

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

dengen = 1
count = 0

for i in range(0, 100):
    if dengen >= B:
        print(i)
        break
    dengen += A - 1

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

x = 1
k = 0
while x < B:
  x = x + A - 1
  k = k + 1
print(k)