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

Submission status: Accepted

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

Submission status: Accepted

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

#複数入力
a,b=(int(x) for x in input().split())
if b==1:
    print(0)
    exit(0)
c=a
ans=1
while True:
    if c>=b:
        break
    c+=(a-1)
    ans+=1
print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import math


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

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

    print(c)


if __name__ == "__main__":
    main()

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

plug = 1
count = 0

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

if b == 1:
  print(0)
else:
  print(count)

Submission status: Accepted

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


if __name__ == "__main__":
    main()

Submission status: Accepted

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

cnt_s=1;
cnt_a=0;
while(s[1]>cnt_s):
    cnt_s=cnt_s-1+s[0]
    cnt_a+=1

print(cnt_a)

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
input1 = input()
x = []
y=[]
check=0

for i in input1:
    if i!=" " and check==0:
        x.append(i)
    elif i==" ":
        check=1
    elif i!=" " and check==1:
        check==1
        y.append(i)
xstring=''.join(x)
ystring=''.join(y)

xint=int(xstring)
yint=int(ystring)

if yint==1:
    print(0)
else:
    cnt=0
    while ((xint-1)*(cnt))+xint<yint:
        cnt=cnt+1
    cnt=cnt+1
    print(cnt)

Submission status: Accepted

Solution code:
import math

values = [float(s) for s in input().split(" ")] # 0 is min price, 1 increment, 2 is max price, 3 is decrement
print(int(1 + math.ceil((values[1]-values[0])/(values[0]-1))))

"""
sockets = values[0]
bars = 1
while sockets < values[1]:
    sockets +=values[0] - 1
    bars +=1
print(bars)
"""

Submission status: Accepted

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

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())
count_A = 0
total = 1
if B == 1:
    print(count_A)
else:
    while True:
        count_A += 1
        total += A-1
        if total >= B:
            break
    print(count_A)

Submission status: Accepted

Solution code:
#A口のタップでBコンセント欲しい
a, b = map(int, input().split())
ans , tap = 0, 1

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

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

ans = int(1)

for i in range(20):
    ans += a-1
    if ans < b:
        continue
    elif i == 0 and 1 == b:
        print(0)
        break
    else:
        print(i+1)
        break

Submission status: Accepted

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

if B == 1:
  print(0)
  exit()
if A >= B:
  print(1)
  exit()
if A < B:
  count = A
  tap = A-1
  answer = 1

  while(count<B):
    count += tap
    answer += 1
  print(answer)

Submission status: Accepted

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

Submission status: Accepted

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


def solve(A: int, B: int):

    plug_num = 1
    plugable_num = A

    while plugable_num < B:
        plugable_num += A - 1
        plug_num += 1

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

    return


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 = list(map(int,input().split()))
dengen = 1
count = 0
while dengen < B:
  new_dengen = dengen-1+A
  dengen = new_dengen
  count +=1
print(count)

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 math

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

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

print(ans)

Submission status: Accepted

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

print(add_tup)

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

Submission status: Accepted

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

Submission status: Accepted

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

while inlet < b:
    inlet = inlet -1 + a
    ause = ause+1

print(ause)

Submission status: Accepted

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

if(B == 1):
  count = 0
  print(count)
else:  
 num = B - A
 count = 1
 if(num <= 0):
   print(count)
 else:
  if(num%(A-1)==0): count += num//(A-1)
  else: count += num//(A-1)+1
  print(count)

Submission status: Accepted

Solution code:
s=[int(i) for i in input().split()]
n=1
ans=0
while(n<s[1]):
  ans+=1
  n+=s[0]-1
print(ans)

Submission status: Accepted

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

while num_entry < B:
    num_entry += A - 1
    total += 1
print(total)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
import math

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

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

Submission status: Accepted

Solution code:
import sys,math
sys.setrecursionlimit(100000)

def ins(): return input().split()
def ii(): return int(input())
def iil(): return list(map(int,ins()))
def lin(): return list(input())
def iin(): return map(int,ins())

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

Submission status: Accepted

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

b -= 1
a -= 1
ans = 0

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

print(ans)

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
A_B = input().split()
print(-(-(int(A_B[1])-1)//(int(A_B[0])-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:
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(' '))
kuchi = 1
count = 0
while kuchi < b:
    kuchi += a - 1
    count += 1
print(count)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

while cal < b:
  cal += a-1
  result += 1
  
print(result)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
a, b = map(int, input().split())
cur = 1
for i in range(21):
    # print("i={0}; cur = {1}".format(i, cur))
    if cur >= b:
        break
    cur -= 1
    cur += a

print(i)

Submission status: Accepted

Solution code:

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

ans = 0
count = 1

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

print(ans)

Submission status: Accepted

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

print(count)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
A,B = list(map(int, input().split()))
count = 0
tappu = 1

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

print(count)

Submission status: Accepted

Solution code:
def solve(A, B):
    available = 1
    ans = 0
    while available < B:
        available += A-1
        ans += 1
    return ans

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

A,B = inp[0],inp[1]
print(solve(A,B))

Submission status: Accepted

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

Submission status: Accepted

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

num = 1
ans = 0

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

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

print(ans)

Submission status: Accepted

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

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

Submission status: Accepted

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

ans = 0
outlet = 1
while outlet < B:
    outlet -= 1
    outlet += 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:

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys

A, B = [int(i) for i in input().split()]
ana= A
count = 1
if B == 1:
    print(0)
    sys.exit()
while(ana < B):
    ana += A -1
    count += 1

print(count)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
A,B=map(int,input().split())
T = []
cnt = 0

while len(T)< B:

    if B==1:

        break

    if len(T)==0:

        T.extend([0]*A)

        cnt += 1

    else :

        
        T.extend([0]*(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())
s = 1
for i in range(30):
    if s >= B:
        print(i)
        break
    s += (A-1)

Submission status: Accepted

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

if need_outlets == 1:
    print(0)
else:
    print(-(-(need_outlets-1)//(holes-1)))

Submission status: Accepted

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

Submission status: Accepted

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

if B!=1:
  if B<=A:
    print("1")
  else:
    B -= A
    print(math.ceil(B/(A-1))+1)
else:
  print("0")

Submission status: Accepted

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

plug = 1
for i in range(0, 20):
  if plug >= b:
    print(i)
    exit()
  plug += (a - 1)

Submission status: Accepted

Solution code:
num_power_taps, target_tap_num = map(int, input().split())

if target_tap_num == 1:
  print(0)
else:
  print(-(-(target_tap_num - 1) // (num_power_taps - 1)))

Submission status: Accepted

Solution code:
A,B=map(int,input().split(" "))
a=0
concent=1
if concent<B:
	concent=A
	a+=1

while concent<B:
	concent+=A-1
	a+=1

print(a)

Submission status: Accepted

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

count = 1
result = 0

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

Submission status: Accepted

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

tmp = 1
res = 0

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
A,B=list(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())
import math
print(math.ceil((b - 1) / (a - 1)))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# coding: utf-8
# Your code here!
a, b = [int(item ) for item in input().split()]

cnt = 0

for i in range(b):
    num = i * a - (i-1)
    if num >= b:
        cnt = i
        break
    
print(cnt)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

plgcnt = 0
tapcnt = 1

flg=0

while(True):
    if tapcnt >= b:
        print(plgcnt)
        break
    tapcnt += a - 1
    plgcnt += 1

Submission status: Accepted

Solution code:
import math

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

Submission status: Accepted

Solution code:
import math

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#n = input()
a = list(map(int, input().split()))
#b = list(map(int, input().split()))
#c = list(map(int, input().split()))
r = 1
c = 0
if a[1] == 1:
    print(0)
elif a[0] == a[1]:
    print(1)
else:
    while r < a[1]:
        c += 1
        r -= 1
        r += a[0]
    print(c)

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

Submission status: Accepted

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

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

Submission status: Accepted

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

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

ans = 1
now = a
while 1:
    if now >= b:
        print(ans)
        break
    now += a-1
    ans += 1

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

X = A
count = 1
if B > 1:
    while X < B:
        X = X + (A-1)
        count += 1

    print(count)

else:
    print(0)

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

count = 1
ans = 0

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

print(ans)

Submission status: Accepted

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

print(cnt)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# https://atcoder.jp/contests/abc139/tasks/abc139_b

l = [input() for i in range(1)]
nums = [int(i) for i in l[0].split(' ')]
tap = nums[0]
want = nums[1]
plug = 1
num = 0
while plug < want:
    plug -= 1
    plug += tap
    num += 1
print(num)

Submission status: Accepted

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

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

if ans * (a-1) + a < b:
    print(ans+2)
else:
    print(ans+1)

Submission status: Accepted

Solution code:
import math

a, b = [int(x) for x in input().strip().split()]

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

print(math.ceil(sockets))

Submission status: Accepted

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

ans = 0
if B != 1:
    ans += 1
    rem = B - A
    if rem > 0:
        div, mod = divmod(rem, A - 1)
        ans += div
        if mod:
            ans += 1
    
print(ans)

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
a, b = map(int, input().split())
if b == 1:
    print(0)
    exit(0)
sum = a
ct = 1

while sum  < b:
    ct += 1
    sum += a - 1

print(ct)

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

MOD = 10 ** 9 + 7

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

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

print(ans)

Submission status: Accepted

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

print(ans)

Submission status: Accepted

Solution code:
import math


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

Submission status: Accepted

Solution code:
import sys

# -----------------------------------------
# import os
# fdr = os.open('python/abc139/sample.txt', os.O_RDONLY)
# os.dup2(fdr, sys.stdin.fileno())
# -----------------------------------------

str = sys.stdin.readline().split()

A = int(str[0])
B = int(str[1])
c = (B-1) // (A-1)
if (B-1)%(A-1) != 0:
    c+=1

print(c)

Submission status: Accepted

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

Submission status: Accepted

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

plug = 1
ans = 0

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

print(ans)

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

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())
ans = 0
sum = 0

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

Submission status: Accepted

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

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

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

A = temp[0]
B = temp[1]

tap = 1
count = 0

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

print(count)

Submission status: Accepted

Solution code:
def slove():
    import sys
    input = sys.stdin.readline
    a, b = list(map(int, input().rstrip('\n').split()))
    d = a - 1
    print((b - 1 + d - 1) // d)


if __name__ == '__main__':
    slove()

Submission status: Accepted

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


now_tap = 1
count = 0

for i in range(B):
  if now_tap < B:
    now_tap = now_tap + A - 1
    count += 1
    
print(count)

Submission status: Accepted

Solution code:
i = list(map(int, input().split()))
tap_cnt=0
sock_cnt=1

while sock_cnt < i[1]:
  tap_cnt=tap_cnt+1
  sock_cnt = sock_cnt + i[0] - 1
    
print(tap_cnt)

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

print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

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

print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

cnt = 0
tap = 1

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
a,b = list(map(int,input().split()))
i = 0 #問題設定においてBが1の時、電源タップを差し込む必要がないので使わない時も考慮
tap = 1 #差し込み口の数
while tap < b:
    tap += a-1
    i += 1
print(i)

Submission status: Accepted

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

Submission status: Accepted

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

a_ = a - 1
c = 0
while(1):
    if(b <= 1):
        break
    b -= a_
    c += 1
print(c)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
from math import ceil

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

Submission status: Accepted

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

Submission status: Accepted

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

a = [int(i) for i in input().rstrip().split()]
count = 0
while (a[0]-1)*count+1 < a[1]:
    count += 1


print(count)

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def read_input():
	s = raw_input()
	v = s.split()
	return (int(v[0]), int(v[1]))

A, B = read_input()
# (A-1)*N+1 >= B
print (B+A-3)/(A-1)

Submission status: Accepted

Solution code:
import math

A,B = [int(x) for x in input().split()]
print(math.ceil((B-A)/(A-1)) + 1)

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:

def calc(a, b):
    r = 0
    n = 1
    while True:
        if n >= b:
            break
        n += (a-1)
        r += 1
    return r


arr = input().split(" ")

r = calc(int(arr[0]), int(arr[1]))
print(r)

Submission status: Accepted

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

ans, r=divmod(b-1, a-1)
if r!=0: ans+=1 

print(ans)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
stdin = [int(x) for x in input().split()]
entry = 1
adptr = 0
while entry < stdin[1]:
    entry -= 1
    entry += stdin[0]
    adptr += 1
print(adptr)

Submission status: Accepted

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

count = 0
suma = 1


if B <= 1:
    pass
else:
    while True:
        count += 1
        suma = suma + A - 1
        if suma >= B:
            break

print(count)

Submission status: Accepted

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

if b == 1:
    print(0)
else:
    cnt = 0
    while Stop:
        cnt += 1
        if cnt*a - (cnt-1) >= b:
            Stop = False
    print(cnt)

Submission status: Accepted

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

if B == 1:
    print(0)
    exit()
    
for i in range(1, 400):
    count = count + A - 1
    if count >= B:
        print(i)
        exit()

Submission status: Accepted

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

print(ans)

Submission status: Accepted

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

res = 0
if B != 1:
    while (A - 1) * res + 1 < B:
        res += 1

print(res)

Submission status: Accepted

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