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:
import math,string,itertools,fractions,heapq,collections,re,array,bisect,sys,random,time,queue,copy

sys.setrecursionlimit(10**7)
inf=10**20
mod=10**9+7
dd=[(-1,0),(0,1),(1,0),(0,-1)]
ddn=[(-1,0),(-1,1),(0,1),(1,1),(1,0),(1,-1),(0,-1),(-1,-1)]

def LI(): return [int(x) for x in sys.stdin.readline().split()]
def LI_(): return [int(x)-1 for x in sys.stdin.readline().split()]
def I(): return int(sys.stdin.readline())
def LS(): return sys.stdin.readline().split()
def S(): return input()

def main():
  a,b=LI()
  c=1
  ans=0
  while True:
    if c>=b:
      return ans
    ans+=1
    c-=1
    c+=a

# main()
print(main())

Submission status: Accepted

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

Submission status: Accepted

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

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

print(cnt)

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())
ans=0
num=1
while num<b:
    num+=(a-1)
    ans+=1

print(ans)

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
import sys

def input(): return sys.stdin.readline()[:-1]
def ceil(x, y=1): return int(-(-x // y))
def INT(): return int(input())
def MAP(): return map(int, input().split())
def LIST(): return list(map(int, input().split()))
def MATINT(h): return [list(map(int, input().split())) for _ in range(h)]
def MATSTR(h): return [input() for _ in range(h)]
def Yes(): print('Yes')
def No(): print('No')
def YES(): print('YES')
def NO(): print('NO')
sys.setrecursionlimit(10 ** 9)
inf = float('inf')
mod = 10 ** 9 + 7

def main():
    A, B = MAP()
    A -= 1
    B -= 1
    print(ceil(B / A, 1))

if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
a,b=map(int,input().split())
if b==1:
  print(0)
  sys.exit()
ct=0
x=1
for i in range(100):
  x+=a-1
  ct+=1
  if x>=b:
    print(ct)
    break

Submission status: Accepted

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

Submission status: Accepted

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

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

if __name__=='__main__':
    code()

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
import sys

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

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

main()

Submission status: Accepted

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

Submission status: Accepted

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

print(int(res))

Submission status: Accepted

Solution code:
# encoding:utf-8
import copy
import random
import bisect #bisect_left　これで二部探索の大小検索が行える
import fractions #最小公倍数などはこっち
import math
import sys
import bisect

mod = 10**9+7
sys.setrecursionlimit(mod) # 再帰回数上限はでdefault1000

def LI(): return list(map(int, sys.stdin.readline().split()))

A,B = LI()
now = 1
ans = 0
while now < B:
    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())
    n = 0
    while True:
        if 1 + (A-1)*n >= B:
            break
        n += 1
    print(n)

if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

F = 1
cnt = 0

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

print(cnt)

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

A,B = map(int,input().split())
if B == 1:
    print(0)
    sys.exit()
num = A
count=1
while num < B:
    num+=A-1
    count+=1
print(count)

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
# coding: utf-8
from math import ceil
A, B = map(int, input().split())
ans = 0
socket = 1
while socket < B:
    socket += A - 1
    ans += 1
    if socket >= B:
        break
print(ans)

Submission status: Accepted

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

x = 1
c = 0
while x < b:
    x += a - 1
    c += 1
print(c)

Submission status: Accepted

Solution code:

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
import math

sys.setrecursionlimit(10**7)
INF = 10 ** 18
MOD = 10 ** 9 + 7
def LI(): return list(map(int, sys.stdin.readline().split()))
def II(): return int(sys.stdin.readline())
def LS(): return list(map(list, sys.stdin.readline().split()))
def S(): return list(sys.stdin.readline())[:-1]

def main():
    a, b = LI()
    print(math.ceil((b-1)/(a-1)))

if __name__ == '__main__':
    main()

Submission status: Accepted

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

count=0
check=0
co=1
while check==0:

    if B<=co:
        check=1
    else:
        co=co+(A-1)
        count+=1

print(count)

Submission status: Accepted

Solution code:
class Solution:
    def main(self):
        A, B = map(int, input().split())
        i = 0
        while 1 + (A-1) * i < B:
            i += 1
        print(i)

if __name__ == '__main__':
    Solution().main()

Submission status: Accepted

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

num = 1

taps = 0

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

print(taps)

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
from math import ceil
def solve():
    A, B = map(int, input().split())
    res = ceil((B-1)/(A-1))
    return str(res)

if __name__ == '__main__':
    print(solve())

Submission status: Accepted

Solution code:
import sys
from heapq import heappop, heappush
from operator import itemgetter
from collections import deque, defaultdict, Counter
from bisect import bisect_left, bisect_right
input = sys.stdin.readline
sys.setrecursionlimit(10 ** 7)
MOD = 10**9 + 7
INF = float('inf')

def sol():
    A, B = map(int, input().split())

    if B == 1:
        print(0)
        return

    now = 1
    for i in range(1, 1000):
        now += A - 1
        if now >= B:
            print(i)
            return


sol()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import math
import copy
from operator import mul
from functools import reduce
from collections import defaultdict
from collections import Counter
from collections import deque
# 直積 A={a, b, c}, B={d, e}:のとき，A×B={(a,d),(a,e),(b,d),(b,e),(c,d),(c,e)}: product(A, B)
from itertools import product
# 階乗 P!: permutations(seq), 順列 {}_len(seq) P_n: permutations(seq, n)
from itertools import permutations
# 組み合わせ {}_len(seq) C_n: combinations(seq, n)
from itertools import combinations
# 一次元累積和
from itertools import accumulate
from bisect import bisect_left, bisect_right
from heapq import heappush, heappop

import re
# import numpy as np
# from scipy.misc import comb

# 再帰がやばいとき
import sys
sys.setrecursionlimit(10**9)

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

# 四方向: 右, 下, 左, 上
dy = [0, -1, 0, 1]
dx = [1, 0, -1, 0]
 
def i_inpl(): return int(input())
def l_inpl(): return list(map(int, input().split()))
def line_inpl(x): return [i_inpl() for _ in range(x)]

INF = int(1e30)
MOD = int(1e9)+7 # 10^9 + 7

# field[H][W]
def create_grid(H, W, value = 0):
    return [[ value for _ in range(W)] for _ in range(H)]

########

def main():
    A, B = l_inpl()
    ans = 0
    cnt = 1
    while True:
        if cnt >= B:
            break
        cnt -= 1
        cnt += A
        ans += 1
    print(ans)
if __name__ == "__main__":
    main()

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import itertools


def solve(a, b):
    if b == 1:
        return 0
    cur_num = 1
    for i in itertools.count(1):
        cur_num += a - 1
        if cur_num >= b:
            return i


def main():
    a, b = (int(z) for z in input().split())
    res = solve(a, b)
    print(res)


if __name__ == "__main__":
    main()

Submission status: Accepted

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

Submission status: Accepted

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


def solve(A: int, B: int):
    x = 1
    count = 0
    while (x < B):
        x += A - 1
        count += 1
    print(count)
    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())
print((B-1+A-2)//(A-1))

Submission status: Accepted

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

Submission status: Accepted

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

print(ans)

Submission status: Accepted

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

ans = 1
count = A

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

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

print(ans)

Submission status: Accepted

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

ans = 0

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

print(ans)

Submission status: Accepted

Solution code:
"""
N = int(input())
A, B = map(int,input().split())
lst = [list(map(int,input().split())) for i in range(M)]
A = list(map(int,input().split()))
"""

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

print(math.ceil(b/a))

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

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

cnt = 0
res = 1

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

Submission status: Accepted

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

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

if __name__ =="__main__":
    main()

Submission status: Accepted

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

print(count)

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

a -= 1
c = 1
cnt = 0
while b > c:
    c += a
    cnt += 1

print(cnt)

Submission status: Accepted

Solution code:
def InputToInt():
    A = input().split()
    for i in range(len(A)):
        A[i] = int(A[i])
    return A
    
if __name__ == '__main__':
    A, B = InputToInt()
    print((B-2)//(A-1)+1)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
def input():
    return sys.stdin.readline()[:-1]
a,b=map(int,input().split())
tmp=1
i=0
while b>tmp:
    tmp+=(a-1)
    i+=1
print(i)

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:
# -*- coding: utf-8 -*-
import bisect
import heapq
import math
import random
import sys
from collections import Counter, defaultdict, deque
from decimal import ROUND_CEILING, ROUND_HALF_UP, Decimal
from functools import lru_cache, reduce
from itertools import combinations, combinations_with_replacement, product, permutations
from operator import add, mul, sub

sys.setrecursionlimit(100000)
input = sys.stdin.readline


def read_int():
    return int(input())


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


def read_float():
    return float(input())


def read_float_n():
    return list(map(float, input().split()))


def read_str():
    return input().strip()


def read_str_n():
    return list(map(str, input().split()))


def error_print(*args):
    print(*args, file=sys.stderr)


def mt(f):
    import time

    def wrap(*args, **kwargs):
        s = time.time()
        ret = f(*args, **kwargs)
        e = time.time()

        error_print(e - s, 'sec')
        return ret

    return wrap


@mt
def slv(A, B):
    ans = 0
    c = 1
    while c < B:
        c += A - 1
        ans += 1
    return ans


def main():
    A, B = read_int_n()
    print(slv(A, B))


if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
import math
from functools import reduce
from collections import deque
import sys
sys.setrecursionlimit(10**7)

def s(generator, splitter, mapper):
    return [ mapper(s) for s in generator().split(splitter) ]

# スペース区切りの入力を読み込んで数値リストにして返します。
def get_nums_l():
    return [ int(s) for s in input().split(" ")]

# 改行区切りの入力をn行読み込んで数値リストにして返します。
def get_nums_n(n):
    return [ int(input()) for _ in range(n)]

a,b = get_nums_l()


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

Submission status: Accepted

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

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

print(ans)

Submission status: Accepted

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

socket = 1
buy = 0

while socket < B:
    buy += 1
    socket += A - 1

print(buy)

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 sys
sys.setrecursionlimit(10**7)
def LI(): return [int(x) for x in sys.stdin.readline().split()]
def LI_(): return [int(x) - 1 for x in sys.stdin.readline().split()]
def LF(): return [float(x) for x in sys.stdin.readline().split()]
def LS(): return sys.stdin.readline().split()
def II(): return int(sys.stdin.readline())
def SI(): return sys.stdin.readline().strip()
INF = 10 ** 18
MOD = 10 ** 9 + 7

debug = True
#debug = False

def dprint(*objects):
    if debug == True:
        print(*objects)

def solve():
    a, b = LI()

    cnt = 0
    ana = 1
    for i in range(1000):
        if ana >= b:
            break
        cnt += 1
        ana += (a - 1)

    print(cnt)

solve()

Submission status: Accepted

Solution code:
import sys
sys.setrecursionlimit(10**7)
def LI(): return [int(x) for x in sys.stdin.readline().split()]
def LI_(): return [int(x) - 1 for x in sys.stdin.readline().split()]
def LF(): return [float(x) for x in sys.stdin.readline().split()]
def LS(): return sys.stdin.readline().split()
def II(): return int(sys.stdin.readline())
def SI(): return sys.stdin.readline().strip()
INF = 10 ** 18
MOD = 10 ** 9 + 7

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

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

main()

Submission status: Accepted

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

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

Submission status: Accepted

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

ans = 0
ko = 1

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

print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

count = 1
ans = 0
for i in range(20):
    if count >= b:
        break
    count += a-1
    ans += 1

print(ans)

Submission status: Accepted

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

import sys
sys.setrecursionlimit(10**6)
readline = sys.stdin.readline

#n = int(input())
a,b = [int(i) for i in readline().split()]
#lr = [[int(i)-1 for i in readline().split()] for _ in range(q)]


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

print(c)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
A, B = [int(i) for i in input().split()]
socket = 1
strip = 0
while socket < B:
    socket += A - 1
    strip += 1
print(strip)

Submission status: Accepted

Solution code:
n,m = map(int,input().split())
# n = int(input())
# s = input()
# t = input()
ans = 0
while m > 1:
    m -= n - 1
    ans += 1
print(ans)

Submission status: Accepted

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

Submission status: Accepted

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


if __name__ == "__main__":
    [a, b] = li()

    tap_count = 1
    use_count = 0
    while tap_count < b:
        use_count = use_count + 1
        tap_count = tap_count + a - 1
    print(use_count)

Submission status: Accepted

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

print(math.ceil(B/A))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
from math import ceil

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

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

print(ceil(t))

Submission status: Accepted

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

print(ans)

Submission status: Accepted

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

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

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

print(ans)

Submission status: Accepted

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

cnt = 1
if B == 1:
    print(0)
    os.sys.exit()
for i in range(B):
    cnt += A - 1
    if cnt >= B:
        break
print(i+1)

Submission status: Accepted

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

count = a - 1

res = (b - 1) // count

if (b -1) % count != 0:
    res += 1

print(res)

Submission status: Accepted

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

Submission status: Accepted

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

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

print(ans)

Submission status: Accepted

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

# input = sys.stdin.readline

sys.setrecursionlimit(1000000000)

MIN = -10 ** 9
MOD = 10 ** 9 + 7


def main():
    # N = int(input())
    A, B = [int(a) for a in input().split()]
    # B = [int(a) for a in input().split()]
    # A = [
    #     [int(a) for a in input().split()]
    #     for _ in range(N)
    # ]
    # print(A + B)
    for k in range(1000000000):
        if 1 + (A - 1) * k >= B:
            print(k)
            return


if __name__ == '__main__':
    main()

Submission status: Accepted

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

n = 1
count = 0

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

print(count)

Submission status: Accepted

Solution code:
import sys
sys.setrecursionlimit(10000000)
def input():
    return sys.stdin.readline()[:-1]
from collections import *
import math
from bisect import *
import functools
INF = float('inf')
mod = 10**9+7

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

Submission status: Accepted

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

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

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

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

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

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

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

Submission status: Accepted

Solution code:
def main():
    A, B = map(int, input().split())
    v = 1
    count = 0
    while v < B:
        v = v -1 + A
        count += 1
    return count
    
if __name__ == '__main__':
    print(main())

Submission status: Accepted

Solution code:
#

import itertools
from collections import Counter
from collections import defaultdict
from collections import deque
import bisect
from heapq import heappush, heappop

def main():
    a, b = map(int, input().split())
    ans = 0
    if b == 1:
        print(0)
        return
    count = 1
    while count < b:
        count += (a - 1)
        ans += 1
    print(ans)


if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
if __name__ == '__main__':
    A, B = map(int, input().split())
    num = 1
    count = 0
    while(num < B):
        num -= 1
        num += A
        count += 1
    print(count)

Submission status: Accepted

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

Submission status: Accepted

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

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

tmp = 1
tmp_ans =0
while(tmp<B):
    tmp -=1
    tmp += A
    tmp_ans+=1

print(tmp_ans)

Submission status: Accepted

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

kuti = 1
kosuu = 0

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

print(kosuu)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
ii = lambda : int(input())
mi = lambda : map(int,input().split())
li = lambda : list(map(int,input().split()))



def main():
    a,b = mi()
    cnt = 0
    a1 = a-1
    fin = 1
    for i in range(50):
        if fin >= b:
            break
        else:
            fin+=a1
            cnt+=1
    print(cnt)


main()

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
import math,string,itertools,fractions,heapq,collections,re,array,bisect,sys,copy,functools
import time

sys.setrecursionlimit(10**7)
inf = 10**20
eps = 1.0 / 10**10
mod = 10**9+7
dd = [(-1,0),(0,1),(1,0),(0,-1)]
ddn = [(-1,0),(-1,1),(0,1),(1,1),(1,0),(1,-1),(0,-1),(-1,-1)]

def LI(): return list(map(int, sys.stdin.readline().split()))
def LLI(): return [list(map(int, l.split())) for l in sys.stdin.readlines()]
def LI_(): return [int(x)-1 for x in sys.stdin.readline().split()]
def LF(): return [float(x) for x in sys.stdin.readline().split()]
def LS(): return sys.stdin.readline().split()
def I(): return int(sys.stdin.readline())
def F(): return float(sys.stdin.readline())
def S(): return input()
def pf(s): return print(s, flush=True)
def pe(s): return print(str(s), file=sys.stderr)
def JA(a, sep): return sep.join(map(str, a))
def JAA(a, s, t): return s.join(t.join(map(str, b)) for b in a)

def main():
    a,b = LI()
    c = 1
    r = 0
    for i in range(30):
        if c >= b:
            return r
        c += a-1
        r += 1

    return -1


print(main())

Submission status: Accepted

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

Submission status: Accepted

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

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

print(n)