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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#-*-coding:utf-8-*-
import sys
input=sys.stdin.readline

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

    while True:
        if plug >= b:
            break
        plug+=a-1
        ans+=1
#        print("count={},plug={}".format(count,plug))
    print(ans)

if __name__=="__main__":
    main()

Submission status: Accepted

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

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

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

Submission status: Accepted

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

ans = 0
for n in range(0, 20):
    if A * n - (n - 1) >= B:
        ans = n
        break

print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
ma = lambda :map(int,input().split())
lma = lambda :list(map(int,input().split()))
tma = lambda :tuple(map(int,input().split()))
ni = lambda:int(input())
yn = lambda fl:print("Yes") if fl else print("No")
import collections
import math
import itertools
import heapq as hq
a,b = ma()
cnt=1
ans=0
while cnt<b:
    cnt=cnt-1 +a
    ans+=1
print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

if b == 1:
    print(0)

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

Submission status: Accepted

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

Submission status: Accepted

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

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

print(ans)

Submission status: Accepted

Solution code:
A, B = map(int, input().split())
 
  
#  "B%(A-1)==1" だとB=1をケアできないので注意。
if (B-1)%(A-1) == 0:
  print(int((B-1)/(A-1)))
else:
  print((B-1)//(A-1) +1)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
a = list(map(int,input().split()))
c = 1
ans = 0
if a[1] == 1:
  print(0)
else:
  while a[1] > c:
    c += (a[0]-1)
    ans += 1
  print(ans)

Submission status: Accepted

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

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

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:
r=input().split()
A=int(r[0])
B=int(r[1])
x=1
n=0
while x<B:
    x+=A-1
    n+=1
print(n)

Submission status: Accepted

Solution code:
import sys

readline = sys.stdin.readline
MOD = 10 ** 9 + 7
INF = float('INF')
sys.setrecursionlimit(10 ** 5)


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

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

    print(ans)


if __name__ == '__main__':
    main()

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import math as m

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

Submission status: Accepted

Solution code:
# coding: utf-8

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:
"""
A:プラグの数
B:必要なプラグの数
"""

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

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

    print(count)

Submission status: Accepted

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

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

Submission status: Accepted

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

print(ans)

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
import math

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

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

Submission status: Accepted

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

if  b==1:
    print(0)
elif a >= b:
    print(1)
else:
    SumPowerSocket = a
    NumUsePowerTap = 1
    while True:
        if b > SumPowerSocket:
            SumPowerSocket += a - 1
            NumUsePowerTap += 1
        else:
            print(NumUsePowerTap)
            break

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
from math import ceil


def main():
    input = sys.stdin.buffer.readline
    a, b = map(int, input().split())
    print(ceil((b - 1) / (a - 1)))


if __name__ == "__main__":
    main()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
a = input("").split(" ")
a = [int(b) for b in a]
A = a[0]
B = a[1]
n = 1
ans = 0
while n < B:
    ans += 1
    n += A-1
print(ans)

Submission status: Accepted

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

if b == 1:
    print('0')
elif b <= a :
    print('1')
else:
    b -= a
    a -= 1
    y = b % a
    if y==0:
        print(1 + b//a)
    else:
        print(2 + b//a)

Submission status: Accepted

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

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

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

print(cnt-1)

Submission status: Accepted

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

Submission status: Accepted

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

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

  print(i)

Submission status: Accepted

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

if b==1:
    ans=0
    
else:
    ans=int((b-2)/(a-1))+1

print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

    print(ans)


if __name__ == "__main__":
    main()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
a,b=[int(x) for x in input().split()]
ans=1
for i in range(1,30):
    c=a*1+(a-1)*(i-1)
    if c>=b:
        ans=i
        break
if b==1:
    print(0)
else:
    print(ans)

Submission status: Accepted

Solution code:
from sys import stdin
from math import ceil
a, b = [int(x) for x in stdin.readline().rstrip().split()]

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

Submission status: Accepted

Solution code:
import sys, re
from math import ceil, floor, sqrt, pi, factorial, gcd
from copy import deepcopy
from collections import Counter, deque
from heapq import heapify, heappop, heappush
from itertools import accumulate, product, combinations, combinations_with_replacement
from bisect import bisect, bisect_left, bisect_right
from functools import reduce
from decimal import Decimal, getcontext
# input = sys.stdin.readline 
def i_input(): return int(input())
def i_map(): return map(int, input().split())
def i_list(): return list(i_map())
def i_row(N): return [i_input() for _ in range(N)]
def i_row_list(N): return [i_list() for _ in range(N)]
def s_input(): return input()
def s_map(): return input().split()
def s_list(): return list(s_map())
def s_row(N): return [s_input for _ in range(N)]
def s_row_str(N): return [s_list() for _ in range(N)]
def s_row_list(N): return [list(s_input()) for _ in range(N)]
def lcm(a, b): return a * b // gcd(a, b)
sys.setrecursionlimit(10 ** 6)
INF = float('inf')
MOD = 10 ** 9 + 7
num_list = []
str_list = []

def main():
    a, b = i_list()
    if b == 1:
        print(0)
    else:
        i = 1
        while (a + (a - 1) * (i - 1) < b):
            i += 1
        print(i)
        

if __name__ == '__main__':
    main()

Submission status: Accepted

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

c = (b - 1)/(a - 1)
add = 1 - (c == int(c))
c = int(c) + add

print(c)

Submission status: Accepted

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

Submission status: Accepted

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

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

ans = a
cnt = 1
for i in range(50):
    if ans >= b:
        print(cnt)
        exit()
    ans += a -1
    cnt += 1

Submission status: Accepted

Solution code:
import sys
input = lambda: sys.stdin.readline().rstrip() 
sys.setrecursionlimit(10**7)
INF = 10**20
def I(): return int(input())
def F(): return float(input())
def S(): return input()
def LI(): return [int(x) for x in input().split()]
def LI_(): return [int(x)-1 for x in input().split()]
def LF(): return [float(x) for x in input().split()]
def LS(): return input().split()

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

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

if __name__ == '__main__':
    resolve()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
input = lambda : sys.stdin.readline().rstrip()
sys.setrecursionlimit(max(1000, 10**9))
write = lambda x: sys.stdout.write(x+"\n")


a,b = list(map(int, input().split()))
ans = (b-1) // (a-1) + int((b-1)%(a-1)!=0)
print(ans)

Submission status: Accepted

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

count = 0
total = 1

if total >= b:
    print(count)
else:
    total = a
    count = 1
    if total >= b:
        print(count)
        exit()
    while True:
        total += (a-1)
        count += 1
        if total >= b:
            print(count)
            break

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())
print(1+(b-2)//(a-1))

Submission status: Accepted

Solution code:
import math

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

outlet = 1
answer = 0

while(outlet < b):
    outlet -= 1
    outlet += a
    answer += 1

print(answer)

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

Submission status: Accepted

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

Submission status: Accepted

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

port = 1
plug = 0
while port < B:
    port += A - 1
    plug += 1

print(plug)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# coding: utf-8
import math
a, b = map(int, input().split())
ans = 1
now_consent = a
plusplug = a - 1
if b == 1:
  print(0)
elif a >= b:
    print(1)
elif a < b:
    other = b - a
    ans += math.ceil(other / plusplug)
    print(ans)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# 標準出力を取得（strデータ）
# A タップの口数　B 必要な口数
A, B = input().split()

# A, B を integerに変換
A = int(A)
B = int(B)

# OAタップの数を表す変数の初期値を 1 とする
num = 1

# B(必要な口数) が 1 の時はタップは必要ない
if B == 1:
    num = 0
else:
    while (A - 1) * (num - 1) + A < B:
        num = num + 1

# 結果を出力
print(num)

Submission status: Accepted

Solution code:
# 標準出力を取得（strデータ）
A, B = input().split()

# A, B を integerに変換
A = int(A)
B = int(B)

# OAタップの数を表す変数の初期値を 1 とする
num = 1


if B == 1:
    num = 0
else:
    while (A - 1) * (num - 1) + A < B:
        num = num + 1

# 結果を出力
print(num)

Submission status: Accepted

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

if b == 1:
  print("0")
else:
  while cnt1 < b:
    cnt1 += (a-1)
    cnt2 += 1
  print(cnt2)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
a,b=input().split()
a=int(a)
b=int(b)
i=0
sum=0
if b==1:
    print(0)
else:
    while True:
        if i==0:
            b=b-a
            sum+=1
            i+=1
        elif b<=0:
            print(sum)
            break
        else:
            b=b-a+1
            sum+=1
            i+=1

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

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
def input(): return sys.stdin.readline().strip()
def mapint(): return map(int, input().split())
sys.setrecursionlimit(10**9)

A, B = mapint()
print(-(-(B-1)//(A-1)))

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
from math import ceil

inputs = input()
a = int(inputs.split(" ")[0])
b = int(inputs.split(" ")[1])
print(ceil((b - 1) / (a - 1)))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys, bisect, math, itertools, string, queue, copy
# import numpy as np
# import scipy
# from collections import Counter,defaultdict,deque
# from itertools import permutations, combinations
# from heapq import heappop, heappush
# # input = sys.stdin.readline
# sys.setrecursionlimit(10**8)
mod = 10**9+7
def inp(): return int(input())
def inpm(): return map(int,input().split())
def inpl(): return list(map(int, input().split()))
def inpls(): return list(input().split())
def inplm(n): return list(int(input()) for _ in range(n))
def inplL(n): return [list(input()) for _ in range(n)]
def inplT(n): return [tuple(input()) for _ in range(n)]
def inpll(n): return [list(map(int, input().split())) for _ in range(n)]
def inplls(n): return sorted([list(map(int, input().split())) for _ in range(n)])

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

Submission status: Accepted

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

Submission status: Accepted

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

if B % A == 0:
    print (B // A)
else:
    print(B // 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:
a,b=map(int,input().split())

ans=[]

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

else:
  for i in range(20):
    if b<=a+(a-1)*i:
      ans.append(i+1)
  print(min(ans))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
A, B = [int(x) for x in input().split()]
ans = -(-(B-1)//(A-1))
print(ans)

Submission status: Accepted

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

if b == 1:
  cnt = 0
else:
  socket = a
  cnt = 1
  while socket < b:
    socket += (a-1)
    cnt += 1
  
print(cnt)

Submission status: Accepted

Solution code:
x,y=map(int,input().split())
print((y+x-3)//(x-1))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
a,b = map(int, input().split())
print((b+a-3)//(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:
a, b = map(int, input().split())
inc=1
ans=0
while inc<b:
  inc+=a-1
  ans+=1
  #print(inc, ans,a)
print(ans)

Submission status: Accepted

Solution code:
a,b=map(int, input().split())
c="必要な電源タップ数は"
d="個です。"
count=0
total=1
while True:
    
#    total+=a
    
#    if total<b:
#        total-=1
#        count+=1
#    else:
#        break
    if total >= b:
        break
    total += (a-1)
    count+=1
print(count)

Submission status: Accepted

Solution code:
import math

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

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

Submission status: Accepted

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

Submission status: Accepted

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

print(cnt)

Submission status: Accepted

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

Submission status: Accepted

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

s=0

while B-(A-1)*s-1>0:
     s+=1
print(s)

Submission status: Accepted

Solution code:
import math
a,b = map(int, input().split())
strips = 0
socket = 1
while socket < b:
    socket = socket-1+a
    strips += 1
print(strips)

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

print(cnt)

Submission status: Accepted

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

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

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


print(count)

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

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

    num += 1

  print(num)

Submission status: Accepted

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

taps = 1
i = 0
while taps < B:
    taps -= 1
    i += 1
    taps += A

print(i)

Submission status: Accepted

Solution code:
a, b = map(int, input().split())
# a：電源タップ1個あたりの口数
# b：増やしたいタップ口数

def calc(a, b):
    ans_list = [a]
    add_tap = a
    
    # タップを増やさなくてもよい場合を考慮
    if b == 1:
        print(0)
    else:      
        for i in range(19):
            add_tap += a-1
            ans_list.append(add_tap)

        for i, value in enumerate(ans_list):
            if value >= b:
                print(i+1)
                break
            
calc(a, b)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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


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

Submission status: Accepted

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

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

  print(count)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
a,b = [int(x) for x in input().split()]
sum_outlet = a
taps = 1
# A口ある電源タップを一個取り付けると、差込口はA-1個増える

if b == 1:
      print(0)
else:
      while(sum_outlet < b):
            #print(sum_outlet,taps)
            taps += 1
            sum_outlet += a-1
      print(taps)

Submission status: Accepted

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

for n in range(20):
  if plg>=B:
    print(tap)
    exit()
  else:
    plg+=A-1
    tap+=1
    
print(tap)

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

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

print(cnt)

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
a , b = map(int, input().split())
if b==1:
    print(0)
elif b <=a:
    print(1)
elif b > a and (b - 1)%(a - 1)== 0:
    print((b - 1)// (a - 1))
elif b > a and (b - 1)%(a - 1)!= 0:
    print((b - 1)//(a - 1)+ 1)

Submission status: Accepted

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

if B <= 1:
    print(0)

elif A >= B:
    print(1)

elif (B-A) % (A-1) == 0:
    print((B-A) // (A-1) + 1)

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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