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:
#https://atcoder.jp/contests/abc139/tasks/abc139_b

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import math


socket_on_tap, target = map(int, input().split(' '))

print(math.ceil((target - 1) / (socket_on_tap - 1)))
exit(0)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
sys.setrecursionlimit(1000000000)

a,b=map(int,input().split()[:2])

i=0
while True:

    if (a*i -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:
    print(0)
elif A >= B:
    print(1)
else:
    if (B - A) % (A - 1) > 0:
        print(int((B - A) // (A - 1)) + 2)
    else:
        print(int((B - A) // (A - 1)) + 1)

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

outlets = 1
taps = 0
while outlets < b:
    taps += 1
    outlets += a-1

print(taps)

Submission status: Accepted

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

Submission status: Accepted

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


if B <= 1:
    print(0)
    quit()

if A >= B:
    print(ans)
    quit()

for i in range(2,20):
    ans+=1
    if A*i-i+1 >= B:
        break
print(ans)

Submission status: Accepted

Solution code:
a,b=input().split(" ")
#b個ほしい
a=int(a)
b=int(b)
if (b-1)%(a-1)==0:
    print (int((b-1)/(a-1)))
else:
    print(int((b-1)//(a-1)+1))

Submission status: Accepted

Solution code:
a = [int(_) for _ in input().split()]
plug = 1
tap = 0
if len(a) == 2 and 2 <= a[0] <= 20 and 1 <= a[1] <= 20:
    while a[1] > plug:
        plug += a[0] - 1
        tap += 1
    print(tap)
else:
    print('hoge!')

Submission status: Accepted

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

i = 0
s = 1
while s < n:
    i += 1
    s = a * i - (i - 1)

print(i)

Submission status: Accepted

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

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

if b != 1:
    div = b // (a-1)
    mod = b % (a-1)

    if a != 2:
        if mod <= 1:
            print(div)
        else:
            print(div+1)
    else:
        print(div-1)
else:
    print(0)

Submission status: Accepted

Solution code:
import sys


def input():
    return sys.stdin.readline()[:-1]


def main():
    A, B = map(int, input().split())
    if B == 1:
        print("0")
        exit()
    else:
        for i in range(1, 100):
            if (A-1)*(i-1) + A >= B:
                print(i)
                exit()


if __name__ == '__main__':
    main()

Submission status: Accepted

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

A, B = map(int, input().split())
ans = 0
x = 0

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

print(ans)

Submission status: Accepted

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

cnt = B
cnt -= A
ans = 1
while cnt > 0:
    cnt -= (A-1)
    ans += 1

if B == 1:
    ans = 0

print(ans)

Submission status: Accepted

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

n=1

if b == 1:
    n = 0

else:
    for i in range(1000000):
        tap_num = n*(a-1)+1
        if tap_num >= b:
            break
        else:
            n +=1

print(n)

Submission status: Accepted

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

    while True:
        if a >= b:
            break
        a += i
        cnt += 1

    if(b == 1):
        cnt = 0

    print(cnt)
if __name__ == "__main__":
    main()

Submission status: Accepted

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

while (num*A+1) < B:
    num = num+1

print(num)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import numpy as np
p, q = map(int, input().split())
t = (q - 1) / ( p - 1)
print(int(np.ceil(t)))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
S = input()
L = [int(x.strip()) for x in S.split(' ')]
num = 0
while (L[0]*num - (num - 1) < L[1]):
    num += 1
print(num)

Submission status: Accepted

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

if __name__ == '__main__':
    p_b()

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

print(kotae)

Submission status: Accepted

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

ans = (B-1) // (A-1)
if (B-1) % (A-1) != 0:
    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:
#coding: utf-8
a,b = map(int, input().split())

count = 0
plug = 1

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

print(count)

Submission status: Accepted

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

ans = 1
i = 0
while ans < b:
    ans += a-1
    i += 1

print(i)

Submission status: Accepted

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

Submission status: Accepted

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

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

if B < A:
    print(1)
    exit(0)

remain = B - A
count = remain // (A-1)
mod = remain % (A-1)
if not mod == 0:
    count += 1
count += 1
print(count)

Submission status: Accepted

Solution code:
A,B=(int(x) for x in input().split())
Y = (B-1)/(A-1)
for i in range(30):
  if i >= Y:
    print(i)
    break

Submission status: Accepted

Solution code:
#B問題
A,B = map(int,input().split())
kuti = 1
kaisu = 0
for i in range(1,1000):
    if i == 1 and B == 1:
        kaisu = 0
        break
    kuti += A-1
    if kuti >= B:
        kaisu = i
        break
print(kaisu)

Submission status: Accepted

Solution code:
a,b=map(int, input().split())
res=1
plugs=a
if b == 1:
  print(0)
  quit()
while plugs < b:
  res += 1
  plugs += (a - 1)
print(res)

Submission status: Accepted

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

Submission status: Accepted

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

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

print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

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

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:
#B
A, B = map(int, input().split())

ans = (B-1) / (A-1)
if (B-1) % (A-1) == 0:
    pass
else:
    ans += 1

print(int(ans))

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 = [int(x) for x in input().split(' ')]

c = 1
d = a - 1
if b == 1:
    print(0)
    exit()

while a < b:
    a += d
    c += 1

print(c)

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
ab= list(map(int, input().split())) 
a = ab[0]
b = ab[1]
ans = 0
aaa = 0
for i in range (20):
    ans = (a * i) - (i-1)
    if ans >= b:
        aaa = i
        break
print(i)

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())
ans=-((1-b)//(a-1))

print(ans)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import math

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

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

Submission status: Accepted

Solution code:
list1=input().split(" ")
a=1
b=0
while True:
	if a>=int(list1[1]):
		break
	b+=1
	a+=int(list1[0])-1
print(b)

Submission status: Accepted

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

if b <= 1:
    ans = 0
elif b <= a:
    ans = 1
else:
    ans = (b+a-3)//(a-1)

print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

ret = 0
kuti = 1

for i in range(1, 1000):
  if kuti >= B:
    break
    
  ret += 1
  kuti += A-1
  


print(ret)

Submission status: Accepted

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

if B >= 2:
    m = 0
    while (A-1) * m + 1 < B:
        m += 1
    print(m)

if B == 1:
    print(0)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
S, T = map(int, open(0).read().split())
result = 0
currentCount = 1
while currentCount < T:
    result += 1
    currentCount += S - 1

print(result)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

cnt = 0
x = 1

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

print(cnt)

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
a, b = [int(i) for i in input().split()]
 
nums = a-1
now = 1
ans = 0
while(True):
  if b <= now:
    break
  else:
    ans += 1
    now += nums
print(ans)

Submission status: Accepted

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

print(kosu)

Submission status: Accepted

Solution code:
import math

A, B = [int(s) for s in input().split(" ")]
print(math.ceil((B-1)/(A-1)))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# coding: utf-8

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

result = 0
for i in range(20):
    if (B <= A * i - (i - 1)):
        result = i
        break

print(result)

Submission status: Accepted

Solution code:
"""
A個口の電源タップをいくつか使って未使用の差込口をB口以上に拡張
A個口の電源タップ1つと未使用の差込口1口を使って、新たに差込口をA口増やすことができます。
"""

data = list(map(int, input().split()))
a = data[0]
b = data[1]

q = (b-a) // (a-1)
mod = (b-a) % (a-1)

ans = 0

if mod == 0:
  ans = q + 1
else:
  ans = q + 2

print(ans)

Submission status: Accepted

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

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

if int(B) != 1:
    i = 1
    while i<=100000000:
        if int(B) <= (int(A)-1)*(i-1)+int(A):
            print(i)
            break
        i +=1

Submission status: Accepted

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

if B == 1:
    ans = 0
elif A >= B:
    ans = 1
else:
    if (B - 1) % (A - 1) > 0:
        ans = (B - 1) // (A - 1) + 1
    else:
        ans = (B - 1) // (A - 1)

print(ans)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys

A = list(map(int, input().split()))
a, b = A[0], A[1]
kazu = 0
kuti = 1
while True:
    if kuti >= b:
        print(kazu)
        sys.exit()
    kazu += 1
    kuti = kuti - 1 + a

Submission status: Accepted

Solution code:
import math

A, B = map(lambda x: int(x), input().split(' '))

ans = 1
if B - A == 0:
    print(ans)
else:
    ans += math.ceil((B - A) / (A - 1))
    print(ans)

Submission status: Accepted

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

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

print(taps)

Submission status: Accepted

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

Submission status: Accepted

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

tap = 0
out = 1

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

Submission status: Accepted

Solution code:
# coding: utf-8


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

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

print(count)

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())
C = (B-1)//(A-1)
if (B-1)%(A-1)==0 :print(C)
else:print(C+1)

Submission status: Accepted

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

for i in range(1, 20):
  if B > 1:
    c = (A-1)*(i-1) + A
    if c >= B:
      break
  else:
    i = 0
    break

print(i)

Submission status: Accepted

Solution code:
# B - Power Socket
inputNum = list(map(int, input().split()))
A = inputNum[0]
B = inputNum[1]

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

print(num)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

count = 0
plug = 1

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

print(count)

Submission status: Accepted

Solution code:
import sys

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

tap = 0
num = 0

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

while num < B:
  if tap >= 1:
    num -= 1
  tap += 1
  num += A

print(tap)

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
import sys
import math
from bisect import bisect_left
from bisect import bisect_right
import collections
import copy
import heapq
from collections import defaultdict
from heapq import heappop, heappush
import itertools
input = sys.stdin.readline

##### リストの 二分木検索 #####
# bisect_left(lists, 3)
# bisect_right(lists, 3)

##### プライオリティキュー #####
# heapq.heapify(a) #リストaのheap化
# heapq.heappush(a,x) #heap化されたリストaに要素xを追加
# heapq.heappop(a) #heap化されたリストaから最小値を削除＆その最小値を出力

# heapq.heappush(a, -x) #最大値を取り出す時は、pushする時にマイナスにして入れよう
# heapq.heappop(a) * (-1) #取り出す時は、-1を掛けて取り出すこと

##### タプルリストのソート #####
# sorted(ans) #(a, b) -> 1st : aの昇順, 2nd : bの昇順
# sorted(SP, key=lambda x:(x[0],-x[1])) #(a, b) -> 1st : aの昇順, 2nd : bの降順
# sorted(SP, key=lambda x:(-x[0],x[1])) #(a, b) -> 1st : aの降順, 2nd : bの昇順
# sorted(SP, key=lambda x:(-x[0],-x[1])) #(a, b) -> 1st : aの降順, 2nd : bの降順

# sorted(SP, key=lambda x:(x[1])) #(a, b) -> 1st : bの昇順
# sorted(SP, key=lambda x:(-x[1])) #(a, b) -> 1st : bの降順

def inputInt(): return int(input())
def inputMap(): return map(int, input().split())
def inputList(): return list(map(int, input().split()))

def main():
	A,B = inputMap()

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

	ans = 0
	to = 0
	flg = False
	while True:
		ans += 1
		if flg == False:
			to += A
			flg = True
		else:
			to = (to-1) + A

		if to >= B:
			break

	print(ans)

if __name__ == "__main__":
	main()

Submission status: Accepted

Solution code:
import math

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

i = 0
while 1:
    #print((A - 1) * i + 1)
    if (A - 1) * i + 1 >= B:
        break
    i += 1
print(i)

Submission status: Accepted

Solution code:
import math

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

x = (b -a) / (a - 1)

print(math.ceil(x + 1))

Submission status: Accepted

Solution code:
A,B = map(int, input().split())
if B == 1:
    print(0)
else:
    count = 1
    d = A #未使用

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

    print(count)

Submission status: Accepted

Solution code:
def MAP(): return map(int,input().split())
import math

a,b = MAP()
print(math.ceil((b-a)/(a-1))+1)

Submission status: Accepted

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

plug, sumPlug = 0, 1
while sumPlug < B:
    sumPlug += A-1
    plug += 1

print(plug)

Submission status: Accepted

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

ans = 0

if B != 1:
    for i in range(1,30):
        X = (A-1)*i + 1
        if X >= B:
            ans = i
            break
            
print(ans)

Submission status: Accepted

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

if x[1]==1:
	print(0)
else:
	for i in range(1,20):
		if (x[0]-1)*(i-1)+x[0]>=x[1]:
			print(i)
			break

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
A, B = map(int, input().split())
# 1 + R * (A - 1) >= B

if __name__ == "__main__":
    print((B - 1 + A - 2) // (A - 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())
now = 1
ans = 0
for i in range(10000):
    if now >= B:
        break
    else:
        now += A-1
        ans += 1
print(ans)

Submission status: Accepted

Solution code:
import sys

input = sys.stdin.readline


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


if __name__ == "__main__":
    main()

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys


def input(): return sys.stdin.readline().strip()


def solve():
    pass


def main():
    A, B = map(int, input().split())
    ans = 0
    total = 1
    while total < B:
        total += A-1
        ans += 1

    print(ans)


if __name__ == "__main__":
    main()

Submission status: Accepted

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

count = 0
current = 1 # 今あるタップの個数
while current < B:
    current += (A-1)
    count += 1

print(count)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

A, B = int(A), int(B)

total = 1
num = 0

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

Submission status: Accepted

Solution code:
import math

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

Submission status: Accepted

Solution code:

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

kuti = 1
num = 0

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

print(num)

Submission status: Accepted

Solution code:
import queue

"""
N = int(input())
#S = input()
# (N,M) = (int(i) for i in input().split(" "))
# A = [int(i) for i in input().split()]
A = []
for i in range(N):
	A.append(int(input()))

print(A)

"""
#N = int(input())
#print("{:.0f}".format((N*(N-1)/2)))
(A,B) = (int(i) for i in input().split(" "))
print(int((B-1+A-2)/(A-1)))

Submission status: Accepted

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

if B == 1:
	print(0)
else:
	for i in range(1000000000000):
		gate += A - 1
		if gate >= B:
			break
	print(i + 1)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
A, B, = (int(i) for i in input().split())  
from math import ceil,floor


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

Submission status: Accepted

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

tap_num = 1
count_num = 0
while tap_num < B:
  tap_num = tap_num + (A - 1)
  count_num = count_num + 1
print(count_num)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:


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

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

ans=1

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

print(ans)

Submission status: Accepted

Solution code:
N = list(map(int, input().split()))
init = 1
sum = 0

while init < N[1]:
    init += N[0] - 1
    sum += 1

print(sum)

Submission status: Accepted

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

Submission status: Accepted

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

tap = 0
count = 0

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

	print(tap)

Submission status: Accepted

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

answer = 0
number = 1

if A < B:
  while number < B:
    number += A-1
    answer += 1
elif A == B:
  answer = 1
elif B == 1:
  answer = 0
else:
  answer = 1

print(answer)

Submission status: Accepted

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

ans=1

c=b-a

ans+=(c-1)//(a-1)+1

print(ans)

Submission status: Accepted

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

if __name__ == "__main__":
    f_b()

Submission status: Accepted

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

for i in range(100):
  if total<b:
    total+=a-1
    count+=1
print(count)

Submission status: Accepted

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

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

Submission status: Accepted

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

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

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

Submission status: Accepted

Solution code:
import sys
A,B = map(int, input().split())
if B == 1:
  print('0')
  sys.exit()
else:  
  tap = 1
  for i in range(1,30):
    tap = tap + A - 1
    if tap >= B:
      print(i)
      sys.exit()

Submission status: Accepted

Solution code:
#!/usr/bin/env python
# -*- coding: UTF-8 -*-

import math


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


main()

Submission status: Accepted

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

Submission status: Accepted

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

print(x)

Submission status: Accepted

Solution code:
# coding: utf-8
import math

if __name__ == "__main__":
    A, B = map(int, input().split(" "))
    print(math.ceil(((B-A)/(A-1))+1))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

n = 0
N = 1

while True:
    if(B <= N):
        break
    N = N + (A - 1)
    n = n + 1

print(n)

Submission status: Accepted

Solution code:
a, b = (int(i) for i in input().split())
a_sum = 1
ans = 0
while a_sum < b:
    a_sum = a_sum - 1 + a
    ans += 1

print(ans)

Submission status: Accepted

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


def solve(A: int, B: int):
    n = 1
    c = 0
    while(n < B):
        n += (A-1)
        c += 1

    print(c)
    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:
# -*- coding: utf-8 -*-
# スペース区切りの整数の入力
tap, target = map(int, input().split(" "))

for x in range(0,target):
    y = (tap-1)*x + 1
    if y >= target:
        print(x)
        break

Submission status: Accepted

Solution code:
import sys


def main():
    ab = sys.stdin.readline().strip()
    a, b = [int(s) for s in ab.split(' ')]

    need = b - 1
    inc = a - 1

    if need % inc:
        plus_one = 1
    else:
        plus_one = 0

    ans = need // inc + plus_one
    print(ans)


main()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def solve():
    a, b = map(int, input().split())
    k = 0
    while True:
        plugs = k * a - (k - 1)
        if plugs >= b:
            return k
        else:
            k += 1


def resolve():
    print(solve())


if __name__ == "__main__":
    resolve()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
A, B = map(int, input().split())
hole = 1
ans = 0
for i in range(20):
    if B <= hole:
        break
    else:
        ans += 1
        hole += A-1

print(ans)

Submission status: Accepted

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

temp=0
count=0
for i in range(100):
    if B>temp+1:
        temp +=(A-1)
        count+=1
print(count)

Submission status: Accepted

Solution code:
def main():
    A, B = list(map(int, input().strip().split()))
    
    n_taps = 0
    n_output = 1
    while n_output < B:
        n_output += (A - 1)
        n_taps += 1
    print(n_taps)


if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
from sys import stdin,stdout
I = lambda : map(int,stdin.readline().split())
import math

a,b = I()
x = math.ceil((float(b)-1.0)/(a-1))
print int(x)