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())
val=1
cnt=0
if B==1:
    print(0)
else:
    while True:
        val=val-1+A
        cnt+=1
        if val>=B:
            break
    print(cnt)

Submission status: Accepted

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

x = 1
y = 0
while x < b:
  x += a - 1
  y += 1

print(y)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

from math import ceil

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

if __name__=='__main__':
  main()

Submission status: Accepted

Solution code:
import numpy as np
from functools import reduce
from operator import add,sub,mul,truediv
from fractions import gcd

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


ans = 1
x = a

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

Submission status: Accepted

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

Submission status: Accepted

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

ans = 0   #電源タップの個数
out = 1 #未使用の差込口


while out < B:
    out = out + (A - 1)
    ans = ans + 1

print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

while A*K-L+1 < B:
    K = K+1
    L = L+1
print(K)

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
import math

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

ans = math.ceil((B-1)/(A-1))

print(ans)

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

c = ((b - 2) // (a - 1) + 1)
print(c)

Submission status: Accepted

Solution code:
import sys

a, b = map(int, sys.stdin.readline().split())

def main():
    cur = 1
    cnt = 0
    while cur < b:
        cnt += 1
        cur += a - 1
    return cnt

if __name__ == '__main__':
    ans = main()
    print(ans)

Submission status: Accepted

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

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

Submission status: Accepted

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

p=1
res=0

while p<b:
  p=p-1+a
  res+=1
  
print(res)

Submission status: Accepted

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

for i in range (1,21):
    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())
res = 0
c = 1
while c < b :
	c += a-1
	res += 1

print(res)

Submission status: Accepted

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

cnt = 0
unused = 1
while unused < b:
    unused -= 1
    unused += a
    cnt += 1

print(cnt)

Submission status: Accepted

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

cnt = 0
d = 1
while True:
    if d >= B:
        break
    else:
        d -= 1

    cnt += 1
    d += A


print(cnt)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
a, b = map(int, input().split())
tap = 0
sasikomi = 1

while sasikomi < b:
    sasikomi += a-1
    tap += 1
print(tap)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
# https://atcoder.jp/contests/abc139/tasks/abc139_b

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

Submission status: Accepted

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

for i in range(b):
    if b == 1:
        break
    x += a
    # print(x, end=" ")
    ans += 1
    if x >= b:
        break
    x -= 1
print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

socket=1
tap=0
while socket<b:
    tap+=1
    socket-=1
    socket+=a
print(tap)

Submission status: Accepted

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

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

Submission status: Accepted

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


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


if __name__ == "__main__":
    main()

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-

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

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

print(count)

Submission status: Accepted

Solution code:
import sys, re
from collections import deque, defaultdict, Counter
from math import ceil, sqrt, hypot, factorial, pi, sin, cos, radians
from itertools import accumulate, permutations, combinations, product
from operator import itemgetter, mul
from copy import deepcopy
from string import ascii_lowercase, ascii_uppercase, digits
from bisect import bisect, bisect_left
from fractions import gcd
from heapq import heappush, heappop
from functools import reduce
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()))
sys.setrecursionlimit(10 ** 9)
INF = float('inf')
mod = 10 ** 9 + 7

A, B = MAP()

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

ins = 1
for i in range(B):
	ins = ins + A - 1
	if ins >= B:
		print(i + 1)
		exit()

Submission status: Accepted

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

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

Submission status: Accepted

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

plug = 1
ans = 0
while plug < b:
    plug -= 1
    plug += a
    ans += 1
    
print(ans)

Submission status: Accepted

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

print(Ans)

Submission status: Accepted

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

Submission status: Accepted

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

i = 1
ans = 0

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

Submission status: Accepted

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

Submission status: Accepted

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

x = 1
tap = 0

while x < B:
    x = x - 1 + A
    tap += 1

print(tap)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def solve():
    N, M = map(int, input().split())

    if M == 1:
        return 0
    
    # 等差数列
    diff = N-1
    sum = N
    c = 1
    while sum < M:
        sum += diff
        c += 1
    return c

print(solve())

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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


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

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:
from math import ceil
A, B = list(map(int, input().split()))
print(ceil((B-1)/(A-1)))

Submission status: Accepted

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

Submission status: Accepted

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


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

ans = 1
tap = a
while tap < b:
    tap = tap + a - 1
    ans += 1

print(ans)

Submission status: Accepted

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

print(soc)

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
a, b = map(int, input().split())
q, m = divmod(b-a, a-1)
print(q + 1 if m == 0 else q + 2)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

total = 1
answer = 0
while True:
    if total < B:
        total += A-1
        answer += 1
    else:
        break
#print(total)
print(answer)

Submission status: Accepted

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

n = sum(1 for _ in range(1, B, A - 1))
print(n)

Submission status: Accepted

Solution code:
a,b=map(int,input().split())
if b==1:print(0)
else:
 c=1
 for x in range(100):
   c=c-1+a
   if b<=c:
       print(x+1)
       break

Submission status: Accepted

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

Submission status: Accepted

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

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

print(count)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import math
a, b = map(int, input().split())
tap = 1
count = 0
while tap < b:
    tap += -1 + a
    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 = map(int,input().split())
c = 1
count = 0
while  c < b:
    c += a-1
    count += 1

print(count)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
a,b=map(int,input().split())
d=(b-1)//(a-1)
c=(b-1)/(a-1)
if c-d>0:
    d+=1
print(d)

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
import sys

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

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

sum = A
count = 1
if sum >= B:
    print(1)
else:
    while(True):
        sum += (A - 1)
        count += 1
        if sum >= B:
            break;
    print(count)

Submission status: Accepted

Solution code:
from math import ceil

def solve(a, b):
    return ceil((b - 1) / (a - 1))

_a, _b = map(int, input().split())
print(solve(_a, _b))

Submission status: Accepted

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

Submission status: Accepted

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

def solve(A: int, B: int):
    open = 1
    count = 0
    while(open<B):
        open -= 1
        open += A 
        count += 1
    print(count)
    return


# Generated by 1.1.6 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())
t= 1
count = 0
while t < b:
  t += a - 1
  count += 1
print(count)

Submission status: Accepted

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

while True:
    if 1 + (a-1)*i < b:
        i += 1
    else:
        break

print(i)

Submission status: Accepted

Solution code:
A, B = (int(ab) for ab in input().split())

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

print(count)

Submission status: Accepted

Solution code:
def solve(inp):
    import math
    (A, B) = map(int, inp.readline().strip().split(' '))

    r = math.ceil((B - 1) / (A - 1))

    return str(r)


def main():
    import sys
    result = solve(sys.stdin)
    if result:
        print(result)


if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
lst = list(map(int,input().split(" ")))
socket_n = 1
tap = 0
while socket_n < lst[1]:
  tap += 1
  socket_n = socket_n-1+lst[0]
print("%d" % tap)

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

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

ans = ceil((B - A) / (A-1)) + 1
# if B % A :
#     ans += 1

# elif B == A :
#     continue

print(ans)

Submission status: Accepted

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

sum = 1
cnt = 0
while sum < B:
    sum += A - 1
    cnt += 1
print(cnt)

Submission status: Accepted

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

count = 0
val = 1
while val < B:
    val += A - 1
    count += 1

print(count)

Submission status: Accepted

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

Submission status: Accepted

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

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

print(cnt)

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import math

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

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

current = 1
ret = 0
while current < B:
  current += A - 1
  ret += 1
  
print(ret)

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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


if b==1:
  print(0)
  exit()
elif a >= b:
  print(1)
  exit()

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

Submission status: Accepted

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

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

print(i)

Submission status: Accepted

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

t = 1
cnt = 0
while t < b:
    t = t - 1 + a
    cnt += 1

print(cnt)

Submission status: Accepted

Solution code:
a, b = map(int, input().split())
hole = 1
i = 0
check = True

while check:
    if hole >= b:
        check = False
    else:
        hole = a*(i + 1) - i
        i += 1

print(i)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def main():
    branch_num, target = map(int, input().split())
    result = 1
    count = 0
    while result < target:
        result += branch_num - 1
        count += 1
    print(count)


main()

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

cnt = 0
outlet = 1

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

print(cnt)

Submission status: Accepted

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

print(count)

Submission status: Accepted

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

Submission status: Accepted

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

    count = 1
    ans = 0

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

    print(ans)


if __name__ == '__main__':
    main()

Submission status: Accepted

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

ans = 0
out = 1
while (out < b):
   out += a - 1
   ans += 1
print(ans)

Submission status: Accepted

Solution code:
a,b = map(int, input().split())
plag = 1
count = 0

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

print(count)

Submission status: Accepted

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

Submission status: Accepted

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

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

x = -(-(B - 1) // (A - 1))
print(x)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import math, string, itertools, fractions, heapq, collections, re, array, bisect, copy, functools, random
import sys
from collections import deque, defaultdict, Counter; from heapq import heappush, heappop
from itertools import permutations, combinations, product, accumulate, groupby
from bisect import bisect_left, bisect_right, insort_left, insort_right
from operator import itemgetter as ig
def main():
    sys.setrecursionlimit(10 ** 7)
    """inf = 10 ** 20; INF = float("INF"); ans = 0; tmp = 0; cnt = 0; ansli = []; tmpli = []; candili = []; stillset = set()
    eps = 1.0 / 10 ** 10; mod = 10 ** 9 + 7
    dd = [(-1, 0), (0, 1), (1, 0), (0, -1)]; ddn = dd + [(-1, 1), (1, 1), (1, -1), (-1, -1)]; ddn9 = ddn + [(0, 0)]"""
    """for dx, dy in dd:
            nx = j + dx; ny = i + dy
                if 0 <= nx < w and 0 <= ny < h:"""
    def wi(): return list(map(int, sys.stdin.readline().split()))
    def wip(): return [int(x) - 1 for x in sys.stdin.readline().split()]#WideIntPoint
    def ws(): return sys.stdin.readline().split()
    def i(): return int(sys.stdin.readline())
    def s(): return input()
    def s_list(): return list(input())
    def hi(n): return [i() for _ in range(n)]
    def hs(n): return [s() for _ in range(n)]#HeightString
    def mi(n): return [wi() for _ in range(n)]#MatrixInt
    def num_grid(n): return [[int(i) for i in sys.stdin.readline().split()[0]] for _ in range(n)]#NumberGrid
    def mip(n): return [wip() for _ in range(n)]
    def ms(n): return [ws() for _ in range(n)]
    def grid(n): return [s_list() for _ in range(n)]

    a, b = wi()
    print(((b - 1) + (a - 1) - 1) // (a - 1))


if __name__ == '__main__':
    main()

Submission status: Accepted

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

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

Submission status: Accepted

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

ans = 0
taps = 1
while taps < B:
    taps += A - 1
    ans += 1

print(ans)

Submission status: Accepted

Solution code:
import sys

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

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

ans = 1
taps = A
while True:
    if B <= taps:
        break
    ans += 1
    taps += A - 1

print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

outlet = 1
res = 0

while outlet < b:
    outlet -= 1
    outlet += a
    res += 1

print(res)

Submission status: Accepted

Solution code:
"""
author : halo2halo
date : 10, Jan, 2020
"""

import sys

read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
sys.setrecursionlimit(10 ** 7)

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

print(1+(B-2)//(A-1))

Submission status: Accepted

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

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

Submission status: Accepted

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

if __name__ == '__main__':
    main()

Submission status: Accepted

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

outlet = 1
tap = 0
while outlet < B:
    outlet += A-1
    tap += 1

print(tap)

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

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

if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
A, B = map(int, input().split())
num = 0
c = 1
if B == 1:
    print("0")
    tf = exit(0)
    
while c < B:
    if c < B:
      c += A - 1
      num += 1
print(num)

Submission status: Accepted

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

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

ans = 0
current = 1

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

Submission status: Accepted

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

Submission status: Accepted

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

ans = 0
current = 1

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