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 = (int(i) for i in input().split())
n = 1
if B == 1:
    print(0)
    exit(0)
    
while True:
    a = A * n - (n-1)
    if a >= B:
        print(n)
        exit(0)
    n += 1

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def main(A, B):
    outlet = 1
    i = 0

    while outlet < B:
        outlet += A - 1
        i += 1

    print(i)


if __name__ == "__main__":
    A, B = map(int, input().split())

    main(A, B)

Submission status: Accepted

Solution code:
#A＝口、B＝必要数
a,b=map(int,input().split())
if b==1:
    print(0)
elif a > b:
    print(1)
else:
    #x=(B-1)//(A-1)
    x=-(-(b-1)//(a-1))
    print(x)

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())
cnt=0
c=1
while c<b:
  c+=a-1
  cnt+=1
print(cnt)

Submission status: Accepted

Solution code:
def inpl():
    return list(map(int, input().split()))


A, B = inpl()
now = 1
ans = 0
while now < B:
    ans += 1
    now -= 1
    now += A

print(ans)

Submission status: Accepted

Solution code:
#139
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())
for i in range(30):
    if a * i - (i - 1) >= b:
        print(i)
        break

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
from collections import defaultdict, Counter
from itertools import product, groupby, count, permutations, combinations
from math import pi, sqrt
from collections import deque
from bisect import bisect, bisect_left, bisect_right
from string import ascii_lowercase
from functools import lru_cache
import sys
sys.setrecursionlimit(10000)
INF = float("inf")
YES, Yes, yes, NO, No, no = "YES", "Yes", "yes", "NO", "No", "no"
dy4, dx4 = [0, 1, 0, -1], [1, 0, -1, 0]
dy8, dx8 = [0, -1, 0, 1, 1, -1, -1, 1], [1, 0, -1, 0, 1, 1, -1, -1]


def inside(y, x, H, W):
    return 0 <= y < H and 0 <= x < W


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


# 初項s, 交差dのn個の数列の和
def sum_of_arithmetic_progression(s, d, n):
    return n * (2 * s + (n - 1) * d) // 2


# aとbの最大公約数
def gcd(a, b):
    if b == 0:
        return a
    return gcd(b, a % b)


# aとbの最小公倍数
def lcm(a, b):
    g = gcd(a, b)
    return a / g * b


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


if __name__ == '__main__':
    main()

Submission status: Accepted

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

if b == 1:
    print(0)
elif a >= b:
  	print(1)
else:
    n = 1
    while (a * n - (n - 1)) < b:
        n += 1

    print(n)

Submission status: Accepted

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

Submission status: Accepted

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


def main():
    sc = Scan()
    a, b = sc.intarr()
    count = 1
    index = 0
    while count < b:
        count += a-1
        index += 1

    print(index)


class Scan():

    def intarr(self):
        line = input()
        array = line.split(' ')
        num_array = [int(n) for n in array]
        return num_array

    def strarr(self):
        line = input()
        array = line.split(' ')
        array[-1] = array[-1].strip('\n')
        return array


main()

Submission status: Accepted

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

plug = 1
tap = 0

for i in range(20):
    if plug >= B:
        break
    else:
        plug += A - 1
        tap += 1

print(tap)

Submission status: Accepted

Solution code:
from collections import defaultdict,deque
import sys,heapq,bisect,math,itertools,string,queue,copy,time
import numpy as np
sys.setrecursionlimit(10**8)
INF = float('inf')
mod = 10**9+7
eps = 10**-7
def inp(): return int(sys.stdin.readline())
def inpl(): return list(map(int, sys.stdin.readline().split()))
def inpl_str(): return list(sys.stdin.readline().split())

[A,B] = inpl()
print((B-1)//(A-1)+((B-1)%(A-1)>0))

Submission status: Accepted

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

Submission status: Accepted

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

tap=0
count=0

if B==1:
  print(int(0))
elif A >=B:
  print(int(1))
else:
  tap=A
  count=1
  while tap <B:
    tap +=A-1
    count+=1
  print(count)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
a,b=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:
def main():
    A, B = map(int, input().split())
    if B == 1:
        print(0)
        exit()
    
    cnt = A
    tap = 1
    while True:
        if cnt >= B:
            print(tap)
            exit()
        cnt += (A - 1)
        tap += 1




if __name__ == "__main__":
    main()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
import math
import bisect
from collections import defaultdict, deque, Counter
from heapq import heappush, heappop


def LI(): return [int(x) for x in sys.stdin.readline().split()]


def I(): return int(sys.stdin.readline())


def S():
    res = list(sys.stdin.readline())
    if res[-1] == "\n":
        return res[:-1]
    return res


def IR(n):
    return [I() for i in range(n)]


# A
def A():
    s = S()
    t = S()
    ans = 0
    for i in range(3):
        if s[i] == t[i]:
            ans += 1
    print(ans)
    return


# B
def B():
    a,b=LI()
    print(-(-(b-1)//(a-1)))
    return


# C
def C():
    return


# D
def D():
    return


# E
def E():
    return


# F
def F():
    return


# Unittest
def resolve():
    B()
    return


# Solve
if __name__ == "__main__":
    B()

Submission status: Accepted

Solution code:
a, b = (int(i) for i in input().split())
count = a
tap = 1

if b == 1:
    tap = 0
else:
    while count < b:
        count += a - 1
        tap += 1

print(tap)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

out=1
cnt=0

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

Submission status: Accepted

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

print(tapcount)

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
import sys
input = sys.stdin.readline
import math
def print_ans(input_line):
    """Test Case
    >>> print_ans("4 10")
    3
    >>> print_ans("8 9")
    2
    >>> print_ans("8 8")
    1
    """
    A, B = map(int,input_line.split())
    print(math.ceil((B-1)/(A-1)))

if __name__ == '__main__':
    s = input().rstrip()
    print_ans(s)

Submission status: Accepted

Solution code:
import sys
input = sys.stdin.readline
import math
def print_ans(input_line):
    """Test Case
    >>> print_ans("4 10")
    3
    >>> print_ans("8 9")
    2
    >>> print_ans("8 8")
    1
    """
    A, B = list(map(int,input_line.split()))
    # a_sum = A
    # counter = 1
    # while a_sum < B:
    #     a_sum += A -1
    #     counter += 1
    # print(counter)
    print(math.ceil((B-1)/(A-1)))

if __name__ == '__main__':
    s = input().rstrip()
    print_ans(s)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

if b == 1:
    cnt = 0
elif b <= a:
    cnt = 1
else:
    cnt = 1 + (b-a)//(a-1)
    if (b-a) % (a-1) > 0:
        cnt+=1

print(cnt)

Submission status: Accepted

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

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

print(ans)

Submission status: Accepted

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

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

i = 1
t = a

while t < b:
  i += 1
  t += a - 1

print(i)

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
from math import ceil

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

Submission status: Accepted

Solution code:
import math

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

C = (B - A)/(A - 1) + 1

print(math.ceil(C))

Submission status: Accepted

Solution code:
list1 = [int(i) for i in input().split()];

A = list1[0];   #A個口の電源タップ
B = list1[1];   #未使用の差込口を B口以上に拡張したい
#print(list1)
#print(list1[1])
addSupply = 1;
lack   = (B-A); #足りない個数
if lack >0:
    addSupply = 1;
    addSupply += lack / (A-1); #残りの個数 
 
    if lack % (A-1) >0:
        addSupply +=1;
elif B==1 :
    addSupply = 0;

print(int(addSupply));

Submission status: Accepted

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

for i in range(30):
	s = a * i - (i-1)
	#print(s)
	if s >= b:
		ans = i
		break #if文を抜ける
		
print(ans)

Submission status: Accepted

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

print(ans)

Submission status: Accepted

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

outlet = 1
ans = 0

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

print(ans)

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
import math


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

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

Submission status: Accepted

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

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

Submission status: Accepted

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

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())
C = B - A
count = 1
tap = A -1
if B == 1:
    print(0)
elif C <= 0:
    print(count)
else:
    while(C > 0):
        C -= tap 
        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 = [int(i) for i in input().split()]
#print('A=',A)
#print('B=',B)

num_power_strip = 0
num = 1

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

print(num_power_strip)

Submission status: Accepted

Solution code:
import math

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

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

Submission status: Accepted

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

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

Submission status: Accepted

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

con=1
for ans in range(21):
    if(con >= b):
        print(ans)
        break
    con+=a-1

Submission status: Accepted

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

while True:
  if capacity>=B:
    print(ans)
    break
  capacity += A-1
  ans +=1

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
A, B = [int(x) for x in sys.stdin.readline().split()]
ans = 0
if B == 1:
    print(0)
else:
    while True:
        ans += 1
        if 1 + ans * A - ans >= B:
            print(ans)
            exit()

Submission status: Accepted

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

Submission status: Accepted

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

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:
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())
x=1
cnt=0
while(x<b):
  x-=1
  x+=a
  cnt+=1
print(cnt)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
A,B=map(int,input().split()); tmp=1; c=0

while tmp<B:
    tmp+=A-1
    c+=1
print(c)

Submission status: Accepted

Solution code:
a,b = map(int, input().split())
# n >= (b-1)/(a-1)を満たす最小のnを求める。
ans = 0
if (b-1)%(a-1) == 0:
    ans = (b-1)/(a-1)
elif (b-1)%(a-1) != 0:
    ans = (b-1)//(a-1) + 1
print(int(ans))

Submission status: Accepted

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

import math

socket=1;ans=0

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

print(ans)

Submission status: Accepted

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

import math

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

print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

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(" "))
print((A + B - 3) // (A - 1))

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

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

Submission status: Accepted

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

out = 1
count = 0

while (b > out) :
    count += 1
    out = a-1 + out

print(count)

Submission status: Accepted

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

Submission status: Accepted

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

c = 0

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

print(c)

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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


def solve(A, B):
    socket = 1
    tab = 0
    while socket < B:
        socket -= 1
        socket += A
        tab += 1
    
    return tab


print(solve(A, B))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys


def solve():
    input = sys.stdin.readline
    mod = 10 ** 9 + 7
    a, b = list(map(int, input().rstrip('\n').split()))
    cnt = 0
    t = 1
    while t < b:
        cnt += 1
        t += (a - 1)
    print(cnt)


if __name__ == '__main__':
    solve()

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

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


print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

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

print(count)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
x = [int(i) for i in input().split()]

cnt = 0

while ((x[0]-1) * cnt) + 1  < x[1]:
  cnt += 1
  
print(int(cnt))

Submission status: Accepted

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

Submission status: Accepted

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



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

Submission status: Accepted

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

#a,b=(4,20)

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())
cap = 1
count = 0
while cap < b:
    cap -= 1
    cap += a
    count += 1
print(count)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

print(res)

Submission status: Accepted

Solution code:
import math

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

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

print(n+1)

Submission status: Accepted

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

Submission status: Accepted

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

if B ==1:
  Answer = 0
elif B <= A:
  Answer = 1
elif (B -A) %(A-1)==0:
  Answer = 1 + (B-A)//(A-1)
else:
  Answer = 2 + (B-A)//(A-1)
  
print(Answer)

Submission status: Accepted

Solution code:
import math

tap,goal = list(map(int, input().split()))

print(math.ceil((goal - tap) / (tap - 1)) + 1)

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

now_socket = 1
count = 0
while now_socket < need_socket:
  count += 1
  now_socket += one_socket -1
  
print(count)

Submission status: Accepted

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

Submission status: Accepted

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

while True:
    if  b <= socket:
        print(count)
        exit()
    else:
        count = count + 1
        socket = socket - 1 + a

Submission status: Accepted

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

num=1

res = 0




for i in range(0,10000):
        if B == 1:
                break

        res+=1

        num -=1
        num += A
        if num >= B:
                break

print(res)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
"""
author : halo2halo
date : 18,Oct,2019
"""

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

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

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

Submission status: Accepted

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

a,b = input().split()
a = int(a)
b = int(b)
ngo = 1
ans = 0
while ngo < b:
    ngo += a-1
    ans += 1
print(ans)

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 permutations, combinations, product, accumulate
from operator import itemgetter, mul
from copy import deepcopy,copy
from string import ascii_lowercase, ascii_uppercase, digits
from fractions import gcd

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

def main():
    a, b = MAP()
    print(1 + ceil((b-a) / (a-1)))

if  __name__=='__main__':
    main()

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 permutations, combinations, product
from operator import itemgetter, mul
from copy import deepcopy
from string import ascii_lowercase, ascii_uppercase, digits

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()
print(ceil((B-1)/(A-1)))

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def t(a, b):
    c = 1
    r = 0
    while c < b:
        c += a - 1
        r += 1
    return r


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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import math

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

Submission status: Accepted

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

ans = 0
use = (A-1)*ans + 1

while 1:
    if use >= B:
        print(ans)
        break
    ans += 1
    use = (A-1)*ans + 1

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

cn = 0
sa = 1

while(1):
    if(sa>=b):
        break
    sa += a-1
    cn += 1
    
print(cn)

Submission status: Accepted

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

sum = 1
p_count = 0

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

Submission status: Accepted

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

Submission status: Accepted

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

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

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())
counter = 0
rem = 0
if B == 1:
    print(0)
elif A > B:
    print(1)
else:
    while rem < B:
        rem += A
        counter += 1
        if rem == B:
            break
        rem -= 1

    print(counter)

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

if b==1:
    ans=0
elif a>=b:
    ans=1
elif  (b-a)%(a-1)==0:
    ans=(b-a)//(a-1)+1
else:
    ans=(b-a)//(a-1)+2
print(ans)

Submission status: Accepted

Solution code:
import math

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

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


if __name__ == '__main__':
    main()

Submission status: Accepted

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