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:
# -*- coding: utf-8 -*-
y1,y2 = map(int,input().split())
ans = (y2-2) // (y1-1) + 1
print(ans)

Submission status: Accepted

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

cons=1
count=0

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

Submission status: Accepted

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

cnt = 0
if B == 1:
    cnt = 0
elif A >= B:
    cnt = 1
else:
    # A < B
    cnt = 0
    while True:
        # A -= 1
        # A += A
        # cnt += 1
        if A - cnt + (A * cnt) >= B:
            break
        cnt += 1

    cnt += 1

print(cnt)

Submission status: Accepted

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

Submission status: Accepted

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

kuti = 1
count = 0 #tap

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

print(count)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
input = sys.stdin.readline
sys.setrecursionlimit(100000)

def getN():
    return int(input())
def getList():
    return list(map(int, input().split()))
import math

a, b = getList()

for i in range(b):
    if (a-1)*i + 1 >= b:
        print(i)
        sys.exit()
# print(math.ceil((b-1)/a))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# ABC139
from math import ceil


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


if __name__ == "__main__":
    main()

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

if B==1:
  print(0)
  exit()
cnt = A
cnt_A = 1
while True:
  if cnt >= B:
    break
  cnt += A-1
  cnt_A += 1
print(cnt_A)

Submission status: Accepted

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


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

Submission status: Accepted

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

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

    print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

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

count = 0
sum = 1
while True:
  count += 1
  sum += a - 1
  if sum >= r:
    break

print(count)

Submission status: Accepted

Solution code:

I0 = lambda :map(int,input().split())
I1 = lambda :int(input())
I2 = lambda :list(map(int,input().split()))
#####################################################
from math import ceil
A,B = I0()
A-=1
res=1
c=0
while res < B:
    res+=A
    c+=1
print(c)

Submission status: Accepted

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

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

print(ans)

Submission status: Accepted

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

if N[1]==1:
    print(0)
else:
    i=1
    while N[0]*i-i+1 < N[1]:
        i+=1
    print(i)

Submission status: Accepted

Solution code:
AB = input().split()

A = int(AB[0])
B = int(AB[1])
r = 1
c = 0
while r < B:
  r = r - 1 + A
  c += 1
print(c)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
"""
Created on Sat Apr 20 20:47:47 2019

@author: Owner
"""

import numpy as np
import sys
import collections
import scipy.misc
import math
from operator import itemgetter
import itertools
import copy
import bisect
import heapq

#素因数を並べる
def prime_decomposition(n):
  i = 2
  table = []
  while i * i <= n:
    while n % i == 0:
      n /= i
      table.append(int(i))
    i += 1
  if n > 1:
    table.append(int(n))
  return table   
# 桁数を吐く
def digit(i):
    if i > 0:
        return digit(i//10) + [i%10]
    else:
        return []
    
def getNearestValueIndex(list, num):
    """
    概要: リストからある値に最も近い値のインデックスを取得する関数
    @param list: データ配列
    @param num: 対象値
    @return 対象値に最も近い値
    """

    # リスト要素と対象値の差分を計算し最小値のインデックスを取得
    idx = np.abs(np.asarray(list) - num).argmin()
    return idx

def find_index(l, x, default=False):
    if x in l:
        return l.index(x)
    else:
        return default

class UnionFind(object):
    def __init__(self, n=1):
        self.par = [i for i in range(n)]
        self.rank = [0 for _ in range(n)]
        self.size = [1 for _ in range(n)]

    def find(self, x):
        """
        x が属するグループを探索
        """
        if self.par[x] == x:
            return x
        else:
            self.par[x] = self.find(self.par[x])
            return self.par[x]

    def union(self, x, y):
        """
        x と y のグループを結合
        """
        x = self.find(x)
        y = self.find(y)
        if x != y:
            if self.rank[x] < self.rank[y]:
                x, y = y, x
            if self.rank[x] == self.rank[y]:
                self.rank[x] += 1
            self.par[y] = x
            self.size[x] += self.size[y]

    def is_same(self, x, y):
        """
        x と y が同じグループか否か
        """
        return self.find(x) == self.find(y)

    def get_size(self, x):
        """
        x が属するグループの要素数
        """
        x = self.find(x)
        return self.size[x]
    

"""
N, X = map(int, input().split())

x = list(map(int, input().split()))

P = [0]*N
Y = [0]*N
for n in range(N):
    P[n], Y[n] = map(int, input().split())

# 多次元配列の宣言（あとでintにすること。）（タプルにすること。）
dp = np.zeros((N+1, 4,4,4))
    
all(nstr.count(c) for c in '753')

# 複数配列を並び替え
ABT = zip(A, B, totAB)
result = 0
# itemgetterには何番目の配列をキーにしたいか渡します
sorted(ABT,key=itemgetter(2))
A, B, totAB = zip(*ABT)
A.sort(reverse=True)

# 2進数のbit判定
(x >> i) & 1

# dp最小化問題
dp = [np.inf]*N
for n in range(N):
    if n == 0:
        dp[n] = 0
    else:
        for k in range(1,K+1):
            if n-k >= 0:
                dp[n] = min(dp[n], dp[n-k] + abs(h[n]-h[n-k]))
            else:
                break
# 累積和
add = 1 # 問題によって決まる
res = 0
sums = [0]*(len(nums)+1)
for i in range(len(nums)):
    sums[i+1] = sums[i] + nums[i]
for i in range(0, len(nums), 2):
    left = i
    right = min(i+add, len(nums))
    tmp = sums[right] - sums[left]
    res = max(tmp, res)

#２分探索
li, ri = bisect.bisect_left(p_ac, l[i]-1), bisect.bisect_right(p_ac, r[i]-1)    

#ソート関数
org_list = [3, 1, 4, 5, 2]
new_list = sorted(org_list)
print(org_list)
print(new_list)
# [3, 1, 4, 5, 2]
# [1, 2, 3, 4, 5]

#Distance Transformation
    for h in range(0,H):
        for w in range(0,W):
            if h == 0 and w == 0:
                pass
            elif h == 0:
                D[H-h-1][W-w-1]= min(D[H-h-1][W-w-1], D[H-h-1][W-w]+1)
            elif w == 0:   
                D[H-h-1][W-w-1]= min(D[H-h-1][W-w-1], D[H-h][W-w-1]+1)
            else:
                D[H-h-1][W-w-1]= min(D[H-h-1][W-w-1], D[H-h][W-w-1]+1, D[H-h-1][W-w]+1, D[H-h][W-w]+2)
            d_max = max(D[H-h-1][W-w-1], d_max)

"""


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

    
def main(): 
    if B == 1:
        return print(0)
    if A >= B:
        return print(1)
    else:
        for n in range(100):
            if n >= (B-1)/float(A-1):
                return print(n)
                
                
            
            
                

    
if __name__ == '__main__':
    main()

Submission status: Accepted

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

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=1
num=A
while num<B:
  ans+=1
  num+=(A-1)
if B>1:
  print(ans)
else:
  print('0')

Submission status: Accepted

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

Submission status: Accepted

Solution code:
A, B = [int(i) for i in input().split()]
# rest = B % (A - 1)
# if rest <= 1:
#     print(int(B / (A - 1)))
# else:
#     print(int(B / (A - 1) + 1))

taps = 1
num = 0
while True:
    if taps >= B:
        break
    taps -= 1
    taps += A
    num += 1
print(num)

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

cnt=0
ana=1

for i in range(20):
    if ana<b:
        ana=ana-1+a
        cnt=cnt+1

print(cnt)

Submission status: Accepted

Solution code:
# coding: utf-8

a,b=map(int, input().split())
c = 0
while a < b:
    t = (a-1) * c + a
    if t >= b: break
    c += 1
    
if b == 1: print(0)
else :print(c+1)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
def main():
    input = sys.stdin.readline
    AB = list(map(int, input().split()))
    A = AB[0]
    B = AB[1]

    ans = 0
    cnt = 1
    while cnt < B:
        ans += 1
        cnt = A * ans - ans + 1
        #print(ans)
        #print(cnt)
    print(ans)
if __name__ == '__main__':
    main()

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())
for i in range(20):
    if a*i-(i-1) >= b:
        print(i)
        break

Submission status: Accepted

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

Submission status: Accepted

Solution code:

a = input().split()

tap = int(a[0])
last = int(a[1])

start = 1
num = 0

if start == last:
    print(0)
else:
    while start < last:
        start += tap - 1
        num += 1
        
    print(num)

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
A,B=(int(x) for x in input().split())
  
result = 0
s_count = 1
while(1):
  if s_count >= B:
    break;
  s_count += A - 1
  result += 1

print(result)

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
#ABC139 B

import sys
import math
import bisect
sys.setrecursionlimit(1000000000)
from heapq import heappush, heappop,heappushpop
from collections import defaultdict
from itertools import accumulate
from collections import Counter
from collections import deque
from operator import itemgetter
from itertools import permutations
mod = 10**9 + 7
inf = float('inf')
def I(): return int(sys.stdin.readline())
def LI(): return list(map(int,sys.stdin.readline().split()))

a,b = LI()
n = 1
if b == 1:
    print(0)
    quit()
while 1:
    if a + (n-1)*(a-1) >= b:
        print(n)
        quit()
    n += 1

Submission status: Accepted

Solution code:
import sys

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

cond = True
tmp = 0
cnt = 0
while cond:
	cnt += 1
	tmp += A
	if tmp >= B:
		cond = False
	else:
		tmp -= 1
print(cnt)

Submission status: Accepted

Solution code:
import sys
a, b = map(int, input().split())
i = 1
if b == 1:
    print(0)
    sys.exit()

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

Submission status: Accepted

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

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

print(ans)

Submission status: Accepted

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

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

Submission status: Accepted

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

available, used = 1, 0
while available < target:
  available = available + a - 1
  used = used + 1
print(used)

Submission status: Accepted

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

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

print(ans)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
i = input()
a = int(i.split(' ')[0])
b = int(i.split(' ')[1])
r = (b - 1) // (a - 1)
if (b - 1) % (a - 1) != 0:
    r += 1
print(r)

Submission status: Accepted

Solution code:
import math
i = input().split()
a = int(i[0])
b = int(i[1])
c = math.ceil((b-a)/(a-1))
print(c+1)

Submission status: Accepted

Solution code:
import sys
INPUT = lambda: sys.stdin.readline().rstrip()
MAP = lambda: map(int, INPUT().split())
sys.setrecursionlimit(10 ** 9)


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

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


if __name__ == '__main__':
    main()

Submission status: Accepted

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

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

n = 1
kuchi = a

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

print(n)

Submission status: Accepted

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

res = (b - 1) // (a - 1)
if (b - 1) % (a - 1) != 0:
    res = res + 1
print(res)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

num = 1

for i in range(1000):
    num += (A-1)
    if num >= B:
        print(i+1)
        sys.exit()

Submission status: Accepted

Solution code:
a,b = map(int,input().split())
if (b - 1) // (a-1) == (b - 1) / (a-1):
    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(30):
    memo = (a-1)*i+1
    
    if memo >= b:
        print(i)
        break

Submission status: Accepted

Solution code:
A, B = list(map(int, input().split()))
c = -1
x = 1

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

c = max(0, c)
print(c)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import math

A, B = map(int, input().split())
ans = int(0)
count =int(1)
plug = int(A)
if B==1:
    ans = 0
else:
    while plug < B:
        plug += A - 1
        count += 1

    ans = count

print(ans)

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())
import math
#n = math.ceil(B/A)
n=0
if B==1:
    print(0)
elif B<=A :
    print(1)
else:
    n=A
    counter =1
    while n <B:
        n+=(A-1)
        counter += 1
    print(counter)

Submission status: Accepted

Solution code:
# coding:utf-8
import sys

def main():
    a,b = map(int, input().split())
    count = 1
    cosuu = 0

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

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

if __name__ == '__main__' :
    main()

Submission status: Accepted

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

if b == 1:
	print(0)
elif b <= A:
	print(1)
elif b <= 2*A - 1:
	print(2)
elif b <= 3*A - 2:
	print(3)
elif b <= 4*A - 3:
	print(4)
elif b <= 5*A - 4:
	print(5)
elif b <= 6*A - 5:
	print(6)
elif b <= 7*A - 6:
	print(7)
elif b <= 8*A - 7:
	print(8)
elif b <= 9*A - 8:
	print(9)
elif b <= 10*A - 9:
	print(10)
elif b <= 11*A - 10:
	print(11)
elif b <= 12*A - 11:
	print(12)
elif b <= 13*A - 12:
	print(13)
elif b <= 14*A - 13:
	print(14)
elif b <= 15*A - 14:
	print(15)
elif b <= 16*A - 15:
	print(16)
elif b <= 17*A - 16:
	print(17)
elif b <= 18*A - 17:
	print(18)
else:
	print(19)

Submission status: Accepted

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

if b == 1:
	ans = 0
else:
	ans = 1
	n = a
	while n < b:
		n += a-1
		ans += 1

print(ans)

Submission status: Accepted

Solution code:
import math

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

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

Submission status: Accepted

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

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

Submission status: Accepted

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

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

print(math.ceil(c))

Submission status: Accepted

Solution code:
a,b=(int(i) for i in input().split())
a=a-1
b=b-1
if b//a==b/a:
  print(b//a)
else:
  print((b//a)+1)

Submission status: Accepted

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

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:
a,b = map(int,input().split())
for i in range(20):
  if a*i-(i-1)>=b:
    print(i)
    break

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
def main():
    A,B = map(int,input().split())
    if B == 1:
        print(0)
        return
    tap = A
    ans = 1
    while True:
        if tap >= B:
            print(ans)
            return
        tap+=A-1
        ans+=1


if __name__ == '__main__':
    main()

Submission status: Accepted

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

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

        if b <= 0:
            break
        
print(c)

Submission status: Accepted

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

n = 1
ans = 0

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

for i in range(22):
  n += (A-1)
  ans += 1
  if n >= B:
    break
  
print(ans)

Submission status: Accepted

Solution code:
def main():
    a, b = [int(x) for x in input().split()]
    if b == 1:
        print(0)
        return
    n = 1
    b -= a
    while b > 0:
        b -= a-1
        n += 1
    print(n)
    return


if __name__ == "__main__":
    main()

Submission status: Accepted

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

    raw = (B - 1) / (A - 1)
    ans = int((B - 1) / (A - 1))
    if raw == ans:
        print(ans)
    else:
        print(ans + 1)

if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

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

print(N)

Submission status: Accepted

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

elif b%a ==0:
  print(c)
else:
  print(c+1)

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:
import math

def main():
    line = input().split(" ")
    a = int(line[0])
    b = int(line[1])
    result = math.ceil((b-1)/(a-1))
    print(result)

if __name__ == "__main__":
    main()

Submission status: Accepted

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

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

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

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

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

result=1
sum_=a

if b==1:
  print(0)
  exit()
while(sum_<b):
  result+=1
  sum_+=(a-1)
print(result)

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())
ans = (b-1)/(a-1)
if ans % 1 == 0:
    print(int(ans))
else:
    print(int(ans // 1 + 1))

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

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

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:
n1, n2 = [int(i) for i in input().split()]

t1 = (((n2 - n1) - 1) // (n1 - 1)) + 2

print(t1)

Submission status: Accepted

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


def count(n_i, i):
    if n_i >= b:
        return i
    return count(n_i - 1 + a, i + 1)


print(count(1, 0))

Submission status: Accepted

Solution code:
import math

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

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

print(N)

Submission status: Accepted

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

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

R = 1
i = 0
while R < B :
    R = (R - 1) + A
    i = i + 1

print(i)

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, b = map(int, input().split())
print(math.ceil((b-1) / (a-1)))

Submission status: Accepted

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

plug = 0

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

print(plug)

Submission status: Accepted

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

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

Submission status: Accepted

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

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_available += A
        count_plug += 1
        count_available -= 1

        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())
from math import ceil,floor
# print(ceil(b/a))
ans = ceil((b-1)/(a-1))
# print(ans)
print(int(ans))

Submission status: Accepted

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

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

print(count)

Submission status: Accepted

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

if b==1:
    print(0)
elif t!=0:
    print(s+1)
else:
    print(s)

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

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

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

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

Submission status: Accepted

Solution code:
#!/Library/Frameworks/Python.framework/Versions/3.5/bin/python3

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

ans = 0
u = 1
while 1:
    if u >= b:
        break
    ans += 1
    u -= 1
    u += a

print(ans)

Submission status: Accepted

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

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

print (cnt)

Submission status: Accepted

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

def ri():
    return int(input())

def rl():
    return list(input().split())

def rli():
    return list(map(int, input().split()))

def main():
    a, b = rli()
    start = 1
    print(((b-1)+a-2)//(a-1))


if __name__ == '__main__':
    main()

Submission status: Accepted

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

for i in range(100) :
    kuti = ((A-1)*i)+1
    if kuti >=B :
        break
print(i)

Submission status: Accepted

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

while (sum_ < b):
    count +=1
    sum_ += a-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:
import sys
a,b=map(int,input().split())

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

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

Submission status: Accepted

Solution code:
a,b=[int(_) for _ in input().split()]
print((b+a-3)//(a-1))

Submission status: Accepted

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

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

Submission status: Accepted

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

count = 0
counter = 1
for i in range(20):
    if counter < B:
        counter += (A - 1)
        count += 1
    else:
        break

print(count)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
def solve():
  import sys
  import math

  sys.setrecursionlimit(10**7)

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


if __name__ == '__main__':
  solve()

Submission status: Accepted

Solution code:
import math


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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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