Problem:


Score : 200 points

Problem Statement

Takahashi's house has only one socket.

Takahashi wants to extend it with some number of power strips, each with A sockets, into B or more empty sockets.

One power strip with A sockets can extend one empty socket into A empty sockets.

Find the minimum number of power strips required.

Constraints

All values in input are integers.

2 \leq A \leq 20

1 \leq B \leq 20

Input

Input is given from Standard Input in the following format:

A B

Output

Print the minimum number of power strips required.

Sample Input 1

4 10

Sample Output 1

3

3 power strips, each with 4 sockets, extend the socket into 10 empty sockets.

Sample Input 2

8 9

Sample Output 2

2

2 power strips, each with 8 sockets, extend the socket into 15 empty sockets.

Sample Input 3

8 8

Sample Output 3

1



Sample input:
4 10


Sample output:
3

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
from sys import stdin
import math
# import numpy as np
# import sys
# sys.setrecursionlimit(10**4)

def _li(): return list(map(int, stdin.readline().split()))
def _li_(): return list(map(lambda x: int(x)-1, stdin.readline().split()))
def _lf(): return list(map(float, stdin.readline().split()))
def _ls(): return stdin.readline().split()
def _i(): return int(stdin.readline())
def _f(): return float(stdin.readline())
def _s(): return stdin.readline()[:-1]


A, B = _li()

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

Submission status: Accepted

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

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

print(ans)

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

A=AB[0]
B=AB[1]
plug=1
count=0

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

print(count)

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
#%%
def ceil(x, y):
    if x%y == 0:
        return x//y
    else:
        return x//y + 1

a, b = map(int, input().split())
c = b
if b <= a:
    ans = 1
else:
    ans = 0
    b -= a
    ans += 1
    ans += ceil(b,a-1)

if c == 1:
    ans = 0

print(ans)

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
count = 0

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

print(count)

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

count = 1
ans = 0

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

Submission status: Accepted

Solution code:
import math
a,b = (int(_) for _ in input().split())
print(math.ceil((b-1)/(a-1)))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
sys.setrecursionlimit(1000000)
from math import factorial, ceil, floor
from bisect import bisect_right as bsr
from operator import itemgetter as ig
from collections import defaultdict as dd
from collections import deque, Counter as cnt

# お約束
args = None
INF = float("inf")
MOD = int(1e9 + 7)
def input(*ps):
    if type(ps[0]) is list:
        return [input(*ps[0][:-1]) for _ in range(ps[0][-1])]
    elif len(ps) == 1:
        return ps[0](next(args))
    else:
        return [p(next(args)) for p in ps]
def nlist(n, v):
    if not n: return [] if type(v) is list else v
    return [nlist(n[1:], v) for _ in range(n[0])]

# エントリーポイント
def main():
    A, B = input(int, int)

    cur, c = 1, 0
    while cur < B:
        cur = cur - 1 + A
        c += 1
        if B <= cur:
            break
    print(c)

if __name__ == '__main__':
    args = iter(sys.stdin.read().split())
    main()

Submission status: Accepted

Solution code:
from sys import stdin

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

    n = 1
    ans = 0
    while 1:
        if n >= B:
            break
        else:
            n += A - 1
            ans += 1
    print(ans)

input = lambda: stdin.readline()[:-1]
main()

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
# abc139/abc139_b
import sys, math

s2nn = lambda s: [int(c) for c in s.split(' ')]
ss2nn = lambda ss: [int(s) for s in list(ss)]
ss2nnn = lambda ss: [s2nn(s) for s in list(ss)]
i2s = lambda: sys.stdin.readline().rstrip()
i2n = lambda: int(i2s())
i2nn = lambda: s2nn(i2s())
ii2ss = lambda n: [i2s() for _ in range(n)]
ii2nn = lambda n: ss2nn(ii2ss(n))
ii2nnn = lambda n: ss2nnn(ii2ss(n))

def main():
    A, B = i2nn()
    print(math.ceil((B - 1) / (A - 1)))
    return

main()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
kuchi,need=map(int,input().split())

c = 0
c_kuchi = 1
while True:
    if c_kuchi >= need:
        break
    else:
        c += 1
        c_kuchi -= 1
        c_kuchi += kuchi
print(c)

Submission status: Accepted

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

Submission status: Accepted

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

cnt = 1

s = A

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

if B == 1:
    print(0)
else:
    print(cnt)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
from math import log, ceil, floor

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

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

Submission status: Accepted

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

Submission status: Accepted

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

    ans += 1

print(ans)

Submission status: Accepted

Solution code:
import sys

def resolve():
    a, b = map(int, input().split())

    if b == 1:
        print(0)
        return

    ans = 1
    b -= a

    tmp = (b) // (a-1)
    if (b % (a-1)) > 0:
        tmp += 1

    print(ans + tmp)

if __name__ == "__main__":
    resolve()

Submission status: Accepted

Solution code:
#!/usr/bin/env python

from sys import stdin, stderr

def main():
   A, B = map(int, stdin.readline().split())
   res = 0
   E = 1
   while E < B:
      E -= 1
      E += A
      res += 1

   print(res)

   return 0

if __name__ == '__main__': main()

Submission status: Accepted

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

Submission status: Accepted

Solution code:

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

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

Submission status: Accepted

Solution code:
from sys import stdin
A,B = [int(x) for x in stdin.readline().rstrip().split()]
sasi = A
ans = 1
for i in range(200):
    if sasi >= B:
        break
    else:
        sasi += (A-1)
        ans += 1
if B == 1:
    ans = 0
print(ans)

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:

def MAP():
    return map(int, input().split())

a,b=MAP()

t=1
cnt=0
while True:
    if b <= t:
        break
    t -= 1
    t += a
    cnt += 1
print(cnt)

Submission status: Accepted

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

count = 1
res = 0

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

print(res)

Submission status: Accepted

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

ans = 0

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

if (b - 1) % (a - 1) != 0 :
  ans += 1

print(ans)

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 numpy as np
A, B = list(map(int,input().split()))
print(int(np.ceil((B-A)/(A-1)+1)))

Submission status: Accepted

Solution code:
from sys import stdin
import math

A, B = [int(x) for x in stdin.readline().rstrip().split()]

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

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

Submission status: Accepted

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

Submission status: Accepted

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

All=1
count=0

while True:
    if All>=B:
        break
    else:
        All+=A-1
        count+=1

print(count)

Submission status: Accepted

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

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

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

print(n)

Submission status: Accepted

Solution code:
a, b = map(int, input().split(' '))
cnt = 0
avi = 1
while 1:
    if avi >= b:
        break

    cnt += 1
    avi += a - 1

print(cnt)

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

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

print(i)

Submission status: Accepted

Solution code:
import sys
input = sys.stdin.readline
#-------------------------------------
a,b = map(int,input().split())

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


print(taps)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
a, b = map(int, input().split())
ans, tmp = 0, 1
while (tmp < b):
    ans += 1
    tmp -= 1
    tmp += a
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 = [int(item) for item in input().split()]

count = 0
tap = 1

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

print(count)

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


def main(a, b):
    ans = math.ceil((b-a)/(a-1))
    return ans+1


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

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

num = 1
for t in range(100):
  if B <= num:
    print(t)
    break
  num -= 1
  num += A

Submission status: Accepted

Solution code:
A, B = [int(x) for x in input().split()]
ans = 0
while(1):
    cnt = 1 + ans*(A-1)
    if (cnt >= B):
        break
    ans += 1
print(ans)

Submission status: Accepted

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

ans = 0
t = 0
while True:
  t += A
  ans += 1
  if t >= B:
    break
  t -= 1

print(ans)

Submission status: Accepted

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

cnt = 0
t = 1

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

print(cnt)

Submission status: Accepted

Solution code:
from sys import stdin
import math

a, b = [int(x) for x in stdin.readline().rstrip().split()]

ans = 0

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

print(ans)

Submission status: Accepted

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

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

print(ans)

Submission status: Accepted

Solution code:
def solve():
  a,b = (int(i) for i in input().split())
  ans = 1
  now = a
  if b == 1:
    print(0)
    exit()
  for i in range(10000):
    if now >= b:
      print(ans)
      exit()
    else:
      now += a-1
      ans +=1
    
solve()

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
from math import ceil

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

answer = ceil((b - 1) / (a - 1))
print(answer)

Submission status: Accepted

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

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

Submission status: Accepted

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

print(ans)

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

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

stdin = sys.stdin

ni = lambda: int(ns())
na = lambda: list(map(int, stdin.readline().split()))
ns = lambda: stdin.readline().rstrip()

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

Submission status: Accepted

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

print(sockets)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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


sum = 1
count = 0

while True:

    if sum >= B:
        break

    sum = ((sum+A)-1)
    count = count + 1

print(count)

Submission status: Accepted

Solution code:
import math

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

Submission status: Accepted

Solution code:
import sys
import math
def input(): return sys.stdin.readline().strip()

mi = lambda: map(int, input().split())

A, B = mi()

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

Submission status: Accepted

Solution code:

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

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

Submission status: Accepted

Solution code:
a, b = map(int, input().split())
n = 1
for i in range(30):
    if b <= n:
        break
    n += (a - 1)
print(i)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

C = 1

num = 0

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

print(num)

Submission status: Accepted

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

count = (B-1)//(A-1) + (1 if (B-1)%(A-1)!=0 else 0)

print(count)

Submission status: Accepted

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

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

if B == 1:
    ans = 0

print(ans)

Submission status: Accepted

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

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

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

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

abab = 1
ans = 0

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

print(ans)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
from sys import stdin
from math import ceil

a, b = [int(x) for x in stdin.readline().rstrip().split()]
print(ceil((b-1) / (a-1)))

Submission status: Accepted

Solution code:
A,B=(int(i) for i in input().split())
ans=1
t=0
while True:
    if B<=ans:
        print(t)
        break
    t+=1
    ans+=A-1

Submission status: Accepted

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

Submission status: Accepted

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

if b==1:
    print(0)
    exit()
ans=1
c=a
while c<b:
    ans+=1
    c+=a-1
print(ans)

Submission status: Accepted

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

main()

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#B - Power Socket
a,b=list(map(int, input().split()))
if (b-1)%(a-1)==0:
    answer=(b-1)//(a-1)
else:
    answer=1+((b-1)//(a-1))
print(answer)

Submission status: Accepted

Solution code:
import sys


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


def main():
    A, B = map(int, input().split())
    ans = 1
    count = A

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

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

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

a = 1

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
''' بِسْمِ اللَّهِ الرَّحْمَٰنِ الرَّحِيمِ '''
#codeforces
gi = lambda : list(map(int,input().split()))
a, b = gi()
ans = 0
sock = 1
while sock < b:
	sock += a - 1
	ans += 1
print(ans)

Submission status: Accepted

Solution code:
#!/usr/bin/env python
from __future__ import division, print_function

import os
import sys
import math
from io import BytesIO, IOBase

if sys.version_info[0] < 3:
    from __builtin__ import xrange as range
    from future_builtins import ascii, filter, hex, map, oct, zip


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

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


# region fastio

BUFSIZE = 8192


class FastIO(IOBase):
    newlines = 0

    def __init__(self, file):
        self._fd = file.fileno()
        self.buffer = BytesIO()
        self.writable = "x" in file.mode or "r" not in file.mode
        self.write = self.buffer.write if self.writable else None

    def read(self):
        while True:
            b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
            if not b:
                break
            ptr = self.buffer.tell()
            self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr)
        self.newlines = 0
        return self.buffer.read()

    def readline(self):
        while self.newlines == 0:
            b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
            self.newlines = b.count(b"\n") + (not b)
            ptr = self.buffer.tell()
            self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr)
        self.newlines -= 1
        return self.buffer.readline()

    def flush(self):
        if self.writable:
            os.write(self._fd, self.buffer.getvalue())
            self.buffer.truncate(0), self.buffer.seek(0)


class IOWrapper(IOBase):
    def __init__(self, file):
        self.buffer = FastIO(file)
        self.flush = self.buffer.flush
        self.writable = self.buffer.writable
        self.write = lambda s: self.buffer.write(s.encode("ascii"))
        self.read = lambda: self.buffer.read().decode("ascii")
        self.readline = lambda: self.buffer.readline().decode("ascii")


def print(*args, **kwargs):
    """Prints the values to a stream, or to sys.stdout by default."""
    sep, file = kwargs.pop("sep", " "), kwargs.pop("file", sys.stdout)
    at_start = True
    for x in args:
        if not at_start:
            file.write(sep)
        file.write(str(x))
        at_start = False
    file.write(kwargs.pop("end", "\n"))
    if kwargs.pop("flush", False):
        file.flush()


if sys.version_info[0] < 3:
    sys.stdin, sys.stdout = FastIO(sys.stdin), FastIO(sys.stdout)
else:
    sys.stdin, sys.stdout = IOWrapper(sys.stdin), IOWrapper(sys.stdout)

input = lambda: sys.stdin.readline().rstrip("\r\n")

# endregion

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

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

Submission status: Accepted

Solution code:
import collections as c
ip = lambda : map(int, input().split())
# ##############
mod = 1e9+7
a,b = ip()
ans = 0
n = 1
while n<b:
    n = n - 1 + a
    ans+=1
print(ans)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import math

def resolve():
    a, b = map(int, input().split())

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



resolve()

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
A, B = (map(int, input().split()))
now = 1
cnt = 0
if B==1:
    print(0)
    exit()

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


print(cnt)

Submission status: Accepted

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

print(cnt)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import math

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#!/usr/bin/env python

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

    return i

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

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
import numpy as np

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

    num = 1
    tap = 0

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

    while True:
        tap += 1
        num -= 1
        num += A

        if num >=B:
            break

    print(tap)

Submission status: Accepted

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

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

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

Submission status: Accepted

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

print(cnt)

Submission status: Accepted

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

Submission status: Accepted

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

tap = 0
concent = 1

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

print(tap)

Submission status: Accepted

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

b = B - A

s = b // (A - 1)
if(b % (A - 1) == 0) :
	print(s + 1)
else :
	print(s + 2)

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

Submission status: Accepted

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

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

print(ans)

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
import sys
sys.setrecursionlimit(10**6)
readline = sys.stdin.readline
a,b = [int(i) for i in readline().split()]

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

Submission status: Accepted

Solution code:
import math
a, b = (int(_) for _ in input().split())
print(math.ceil((b-1) / (a-1)))

Submission status: Accepted

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

Submission status: Accepted

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

ct = 0
c = 1

while b > c:
    c -= 1
    c += a
    ct += 1

print(ct)

Submission status: Accepted

Solution code:
import math

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

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

print(x)

Submission status: Accepted

Solution code:
# coding: utf-8

import sys
import math
import collections
import itertools
from inspect import currentframe
INF = 10 ** 10
MOD = 10 ** 9 + 7
def input() : return sys.stdin.readline().strip()
def gcd(x, y) : return y if x % y == 0 else gcd(y, x % y)
def lcm(x, y) : return (x * y) // gcd(x, y)
def I() : return int(input())
def MI() : return map(int, input().split())
def LI() : return [int(x) for x in input().split()]
def RI(N) : return [int(input()) for _ in range(N)]
def LRI(N) : return [[int(x) for x in input().split()] for _ in range(N)]
def chkprint(*args) : names = {id(v):k for k,v in currentframe().f_back.f_locals.items()}; print(', '.join(names.get(id(arg),'???')+' = '+repr(arg) for arg in args))

A, B = MI()

tap = 1
ans = 0
for i in range(A * B) :
    if tap >= B :
        break
    
    tap += (A - 1)
    ans += 1

print(ans)

Submission status: Accepted

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

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

print(cnt)

Submission status: Accepted

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