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: Wrong Answer

Solution code:
A,B=map(int,input().split(" "))
flag=True
N=A
co=0
while flag==True:
    if N==B or N>B:
        print(1)
        flag=False
    else:
        N+=A-1
        co+=1
        if N>=B:
            print(co)
            flag=False

Submission status: Wrong Answer

Solution code:
A,B=map(int,input().split(" "))
flag=True
N=A
co=1
while flag==True:
    if N==B:
        print(co)
        flag=False
    else:
        N+=A-1
        co+=1
        if N>=B:
            print(co)
            flag=False

Submission status: Wrong Answer

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

A = list1[0];   #A個口の電源タップ
B = list1[1];   #未使用の差込口を B口以上に拡張したい
#print(list1)
#print(list1[1])

lack   = B % (A-1); #足りない個数
supply = B / (A-1); #最低いる数 

if(lack >1) :
    print(int(supply+1));
else:
    print(int(supply));

Submission status: Wrong Answer

Solution code:
a,b=map(int,input().split(" "))
from math import*
if a==b:
    print(1)
elif a>b:
    print(1)
elif b%a==0:
    print(ceil(b/a)+1)
else:
    print(ceil(b/a))

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
a,b=map(int,input().split(" "))
from math import*
if a==b:
    print(1)
else:
    print(ceil(b/a))

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

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

print(ans)

Submission status: Wrong Answer

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

a = A
ans = 1
while a < B:
  a += A
  ans += 1

print(ans)

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

c = 0

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

print(c)

Submission status: Wrong Answer

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

c = 0

if b == 1:
    c = 0
elif b / a == 1:
    c = b // a
else:
    c = b // a + 1

print(c)

Submission status: Wrong Answer

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

c = 0

if b / a == 1:
    c = b // a
else:
    c = b // a + 1

print(c)

Submission status: Wrong Answer

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

c = 0

if b % a == 0:
    c = b // a
else:
    c = b // a + 1

print(c)

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

Solution code:
import math

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

if B % A == 0:
  print(B // A)
else:
  print((B // A) + 1)

Submission status: Wrong Answer

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


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

    return socket


print(solve(A, B))

Submission status: Wrong Answer

Solution code:
import math

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


def solve(A, B):
    return math.ceil(B / A)


print(solve(A, B))

Submission status: Wrong Answer

Solution code:
A,B = map(int,input().split( ))
c=int(B/A)
if B==1:
    print('0')
else:
    if c < B/A:

        print(c+1)
    else:
        print(c)

Submission status: Wrong Answer

Solution code:
A,B = map(int,input().split( ))
c=int(B/A)
if c < B/A:

    print(c+1)
else:
    print(c)

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

ans = b//a
if a*ans < b:
    print(ans+1)
else:
    print(ans)

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

cnt = 1

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

Submission status: Wrong Answer

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

cnt = 1

while True:
  if ((x[0]-1) * cnt) + 1  >= x[1]:
    break
  cnt += 1
  
print(int(cnt))

Submission status: Wrong Answer

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

cnt = 1

while True:
  if (x[0] * cnt) - (cnt - 1) >= x[1]:
    break
  cnt += 1
  
print(int(cnt))

Submission status: Wrong Answer

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

cnt = 1

while True:
  if (x[0] * cnt) - (cnt - 1) >= x[1]:
    break
  cnt += 1
  
print(cnt)

Submission status: Wrong Answer

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

cnt = 1

while True:
  if ((x[0] * cnt) - (cnt - 1)) >= x[1]:
    break
  cnt += 1
  
print(cnt)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

res = 0
num = 1
while True:
    num -= 1
    num += A
    res += 1
    if num >= B:
        print(res)
        exit()

Submission status: Wrong Answer

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

res = 0
num = 0
while True:
    num += A
    res += 1
    if num >= B:
        print(res)
        exit()
    else:
        num -= 1

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

i=1
c=a
count=1
while c < b:
    c += c-1
    count +=1

print(count)

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

num=1

res = 0
for i in range(0,10000):
        res+=1

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

print(res)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
import sys, re
from collections import deque, defaultdict, Counter
from math import ceil, sqrt, hypot, factorial, pi, sin, cos, radians
from itertools import permutations, combinations, product, accumulate
from operator import itemgetter, mul
from copy import deepcopy,copy
from string import ascii_lowercase, ascii_uppercase, digits
from fractions import gcd

def input(): return sys.stdin.readline().strip()
def INT(): return int(input())
def MAP(): return map(int, input().split())
def LIST(): return list(map(int, input().split()))
sys.setrecursionlimit(10 ** 9)
INF = float('inf')
mod = 10 ** 9 + 7

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

if  __name__=='__main__':
    main()

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
import math

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

Submission status: Wrong Answer

Solution code:
import math

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

Submission status: Wrong Answer

Solution code:
import math

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

Submission status: Wrong Answer

Solution code:
import math

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

Submission status: Wrong Answer

Solution code:
import math

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

Submission status: Wrong Answer

Solution code:
import math

a,b = map(int, input().split())
av = num =  a
n = 1
if num < b:
  n+=1
  num = num+av-1
elif num > b:
  pass
print(n)

Submission status: Wrong Answer

Solution code:
import math

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

Submission status: Wrong Answer

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

ans = 0
use = 0
if B == 0:
    print(ans)
else:
    ans = 1
    use = A
    while use < B:
        use += A - 1
        ans += 1
    print(ans)

Submission status: Wrong Answer

Solution code:
import math

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

cn = 0
sa = 1

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

Submission status: Wrong Answer

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

cn = 0
sa = 1

for i in range(b):
    sa += a-1
    cn += 1
    if(sa>=b):
        break
    
print(cn)

Submission status: Wrong Answer

Solution code:
import math

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

Submission status: Wrong Answer

Solution code:
import math

a,b = map(int, input().split())
#print(a,b)
x = b/a
xi = (round(x,1))
xi = math.ceil(xi)
print(xi)

Submission status: Wrong Answer

Solution code:
import math

a,b = map(int, input().split())
#print(a,b)
x = b/a
xi = (round(x,1))
xs = str(xi)[-1]
fxi = int(xs)
if fxi >= 5:
  xi = math.ceil(xi)
elif fxi <= 5:
  xi = math.floor(xi)
print(xi)

Submission status: Wrong Answer

Solution code:
import math

a,b = map(int, input().split())
x = b/a
print(math.ceil(x))

Submission status: Wrong Answer

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

    print(counter)

Submission status: Wrong Answer

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

    print(counter)

Submission status: Wrong Answer

Solution code:
A, B = map(int, input().split())
counter = 0
rem = 0
while rem < B:
    rem += A
    counter += 1
    if rem == B:
        break
    rem -= 1
    
print(counter)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

B = B - A

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

Submission status: Wrong Answer

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

B = B - A

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

print(tap)

Submission status: Wrong Answer

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

hole = 1
tap = 0

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

Submission status: Wrong Answer

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

print(b//a+1)

Submission status: Wrong Answer

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

print(b%a+1)

Submission status: Wrong Answer

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

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

print(i)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

print(i)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
import copy

def j(n):
    if n:print("yes")
    else:print("no")
    exit(0)
rem = 10 ** 9 + 7

"""
def ct(x,y):
    if (x>y):print("+")
    elif (x<y): print("-")
    else: print("?")
"""

def ip():
    return int(input())
def iprow():
    return [int(i) for i in input().split()]
def ips():
    return (int(i) for i in input().split())
def ipmultiplerow(n):
    a = []
    for i in range(n):
        a.append(ip())
    return a
def printrow(a):
    for i in a:
        print(i)

a,b = ips()
s = a
n=1
while s<b:
    s+=(a-1)
    n+=1
print(n)

Submission status: Wrong Answer

Solution code:
a,b=map(int,input().split())
m=1#初期値
n=0#初期値

while True:
  m += a-1
  n += 1
  if m>=b:
    break
print(n)

Submission status: Wrong Answer

Solution code:
a,b=map(int,input().split())
#aは電源タップの口の数
#bは求める受け口の数
#mはその時の受け口の数
m=1#初期値
#nは必要な電源タップの個数
n=0#初期値

while True:
  m += a-1
  n += 1
  if m>=b:
    break
print(n)

Submission status: Wrong Answer

Solution code:
a,b=map(int,input().split())
#aは電源タップの口の数
#bは求める受け口の数
#mはその時の受け口の数
m=1#初期値
#nは必要な電源タップの個数
n=0#初期値

while True:
  m += a-1
  print("m:"+str(m))
  n += 1
  print("n:"+str(n))
  if m>=b:
    break
print(n)

Submission status: Wrong Answer

Solution code:
import copy

def j(n):
    if n:print("yes")
    else:print("no")
    exit(0)
rem = 10 ** 9 + 7

"""
def ct(x,y):
    if (x>y):print("+")
    elif (x<y): print("-")
    else: print("?")
"""

def ip():
    return int(input())
def iprow():
    return [int(i) for i in input().split()]
def ips():
    return (int(i) for i in input().split())
def ipmultiplerow(n):
    a = []
    for i in range(n):
        a.append(ip())
    return a
def printrow(a):
    for i in a:
        print(i)

a,b = ips()
s = a
n=1
while s<b:
    s+=a-1
    n+=1
print(n)

Submission status: Wrong Answer

Solution code:
import copy

def j(n):
    if n:print("yes")
    else:print("no")
    exit(0)
rem = 10 ** 9 + 7

"""
def ct(x,y):
    if (x>y):print("+")
    elif (x<y): print("-")
    else: print("?")
"""

def ip():
    return int(input())
def iprow():
    return [int(i) for i in input().split()]
def ips():
    return (int(i) for i in input().split())
def ipmultiplerow(n):
    a = []
    for i in range(n):
        a.append(ip())
    return a
def printrow(a):
    for i in a:
        print(i)

a,b = ips()
b-=1
n = 1
n+=b//(a-1)
print(n)

Submission status: Wrong Answer

Solution code:
import copy

def j(n):
    if n:print("yes")
    else:print("no")
    exit(0)
rem = 10 ** 9 + 7

"""
def ct(x,y):
    if (x>y):print("+")
    elif (x<y): print("-")
    else: print("?")
"""

def ip():
    return int(input())
def iprow():
    return [int(i) for i in input().split()]
def ips():
    return (int(i) for i in input().split())
def ipmultiplerow(n):
    a = []
    for i in range(n):
        a.append(ip())
    return a
def printrow(a):
    for i in a:
        print(i)

a,b = ips()
b-=1
n = 1
n+=b//a
print(n)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

tmp = ls[1] // (ls[0] - 1)
print(tmp)

Submission status: Wrong Answer

Solution code:
import math

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

C = []

# 要求穴 // タップ穴
C.append(B // A)

if B != A:
    for i in range(0, B):
        C.append(math.ceil(C[i] / A))
        if C[i + 1] == 1:
            break

print(sum(C))

Submission status: Wrong Answer

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

c = B // A

d = ((B - c * A) + c) // A
if (B - c * A + c) % A != 0:
    d += c // A + 1
if B == A:
    d = 0

print(c + d)

Submission status: Wrong Answer

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

# 要求穴だけで埋まるタップ
c = B // A

# 要求穴の余りとタップのソケット用に必要なタップ
d = ((B - c * A) + c) // A
if (B - c * A + c) % A != 0:
    d += 1
if B / A == 1.0:
    d = 0

print(c + d)

Submission status: Wrong Answer

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

if B % A == 0:
    print(B // A)
else:
    print(B // A + 1)

Submission status: Wrong Answer

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

if B % A == 0:
    print(B / A)
else:
    print(B // A + 1)

Submission status: Wrong Answer

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

if B / A == 1:
    print(B // A)
else:
    print(B // A + 1)

Submission status: Wrong Answer

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

import numpy as np

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

Submission status: Wrong Answer

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

import numpy as np

a, b = mi()
if a<b:
    cnt = 1
    for i in range(20):
        if a<b:
            a += a-1
            cnt+=1
    print(cnt)
else:
    print(1)

Submission status: Wrong Answer

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

import numpy as np

a, b = mi()

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

Submission status: Wrong Answer

Solution code:
import math
n,m = map(int,input().split())
if m == 1:
    s= 0
else:
    s = math.ceil(m/n)
    while(m-s*n +s>= n):
        s = s+1
print(s)

Submission status: Wrong Answer

Solution code:
import math
n,m = map(int,input().split())
s = math.ceil(m/n)
while(m-s*n +s>= n):
    s = s+1
print( s if n!=1 else '1')

Submission status: Wrong Answer

Solution code:
import math
n,m = map(int,input().split())
print( math.ceil(m/n))

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

if a >= b:
    result = b // a

if a < b:
    if (b - a) < a:
        result = b // a + 1
    else:
        result = (b - a) // (a - 1) + 2

print(result)

Submission status: Wrong Answer

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

if a >= b:
    result = b // a

if a < b:
    if (b - a) < b:
        result = b // a + 1
    else:
        result = (b - a) // (a - 1) + 1

print(result)

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

Solution code:
x=input()
X=x.split()
ans=1
a=int(X[0])
while int(X[0])<int(X[1]):
    ans+=1
    X[0]=int(X[0])+a-1
print(ans)

Submission status: Wrong Answer

Solution code:
x=input()
X=x.split()
ans=1
a=int(X[0])
while int(X[0])<int(X[1]):
    ans+=1
    X[0]=int(X[0])+a
print(ans)

Submission status: Wrong Answer

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

res = 1
tap = A
while True:
  if tap >= B:
    break
  tap += A-1
  res += 1
print(res)

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

Solution code:
a,b = map(int,input().split())
c = 0
e = 0
while e == 0:
    for n in range(30):
        sum = 0.5*n*(2*a + (n-1)*(a-1))
        if sum < b:
            c += 1
        else:
            e += 1

print(c+1)

Submission status: Wrong Answer

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

while e == 0:
    for n in range(100):
       if  b <= (a-1)*n:
           e += 1
           break
       else:
           c += 1

print(c-1)

Submission status: Wrong Answer

Solution code:
'''B - Power Socket
https://atcoder.jp/contests/abc139/tasks/abc139_b

>>> main(4, 10)
3
>>> main(8, 9)
2
>>> main(8, 8)
1'''


def main(A, B):
    # A + N*(A-1)
    outlet = 1
    i = 0

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

    print(i)


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