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:
num = list(input().split(" "))
a = int(num[0])
b = int(num[1])

count = 1

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

print(count)

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

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

if a >= 2 and a <= 20:
    if b >= 1 and b <= 20:
        while True:
            add_value += 1
            a *= add_value
            if a >= b:
                break
else:
    sys.exit()


print(add_value)

Submission status: Wrong Answer

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

for i in range(2, 12):
    if A == B:
        print(1)
        break
    A_new = A * i
    if A_new >= B:
        print(i)
        break

Submission status: Wrong Answer

Solution code:
# from math import factorial
# from collections import defaultdict, deque
#  from heapq import heappush, heappop

# A, B = [int(i) for i in input().split(" ")]
# A = int(input())
# As = [int(i) for i in input().split(" ")]
# Ss = ["".join(sorted(input())) for _ in range(N)]
# A = int(input())

A, B = [int(i) for i in input().split(" ")]
print(1 if B <= A else ((B-A) // (A-1)) + 1)

Submission status: Wrong Answer

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

a = A
num = 1

while True:
    if a >= B:
        break
    a += (A-1)
    num += 1
print(num)

Submission status: Wrong Answer

Solution code:
def _input():
    array = input().split()
    number_array = []
    for i in array:
        number_array.append(int(i))
    return number_array[0], number_array[1]

def number_of_taps(a, b):
    result = 1
    while True:
        if a >= b:
            break
        result += 1
        a = result * a
        
    return result

if __name__ == "__main__":
    a,b = _input()
    print(number_of_taps(a,b))

Submission status: Wrong Answer

Solution code:
s = input().split()
a = int(s[0])
b = int(s[1])
#print(a,b)
n = 1
x = a
if a <= b:
  print(n)
  exit()
while b > x:
  n +=1
  x = a + (a-1)*n-1
print(n)

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

Solution code:
a, b = map(int, input().split())
cnt = 0
cnt_total = 0
if a == b: print(1)
elif a < b:
        for i in range(b):
                cnt += a
                cnt_total += 1
                if cnt >= b:
                        break
        print(cnt_total)
elif a > b and b == 1: print(1)
elif a > b:
        for i in range(b):
                cnt += a
                cnt_total += 1
                if cnt >= b:
                        break
        print(cnt_total)

Submission status: Wrong Answer

Solution code:
import math

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

ans = 0

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

print(ans)

Submission status: Wrong Answer

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

tmp = 0

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

if b <= a:
  c = 1
else:
  c = math.ceil((b-a) / (a-1)) + 1
  #c = int((b-a) / (a-1)) + 1

print(c)

Submission status: Wrong Answer

Solution code:
a,b = map(int, input().split())
check = b
ans = 0
while check >= a:
    ans += check//a
    check = check//a + check%a

print (ans+1)

Submission status: Wrong Answer

Solution code:
def main():
    # A, B = [int(x) for x in input().split()]
    A, B = map(int, raw_input().split())
    count = 1
    B -= A
    while B > 0:
        B -= (A - 1)
        count += 1
    print (count)

if __name__ == "__main__":
    main()

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
# from math import factorial
# from collections import defaultdict, deque
#  from heapq import heappush, heappop

# A, B = [int(i) for i in input().split(" ")]
# A = int(input())
# As = [int(i) for i in input().split(" ")]
# Ss = ["".join(sorted(input())) for _ in range(N)]
# A = int(input())

A, B = [int(i) for i in input().split(" ")]
print(1 if B <= A else (B-1) // (A-1))

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

if a[1]%a[0]==0:
    print(int(a[1]/a[0]))

else :
    print(int(a[1]/a[0]+1))

Submission status: Wrong Answer

Solution code:
# -*- coding: utf-8 -*-
A, B = [int(i) for i in input().split()]

l = [0]
X = 0
if A == B:
    print(1)
else:
    while X < B:
        for i in l:
            X += A + (A - 1) * i
    Y = int((X - A) / (A - 1))
    if (X - A) % (A - 1) == 0:
       print(Y)
    else:
        print(Y + 1)

Submission status: Wrong Answer

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

if b <= a:
  c = 1
else:
  #c = math.ceil((b-a) / (a-1)) + 1
  c = int((b-a) / (a-1)) + 1

print(c)

Submission status: Wrong Answer

Solution code:
import sys

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

def main():
  a, b = na()

  if a == b:
    print(1)
    exit()
  tmp = a - 1
  cnt = 1
  while tmp < b:
    tmp += a
    cnt += 1
    if tmp < b:
      tmp -= 1
  print(cnt)
main()

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

ans = 1
c = a
while True:
  if c < b:
    c = c -1 + a
    ans = ans + 1
  else:
    print(ans)
    break

Submission status: Wrong Answer

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

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

print(cnt)

Submission status: Wrong Answer

Solution code:

A,B = map(int, input().split())
akikuti =A
ans =1
if (akikuti >= B ):
    print(ans)

else:
    
    for i in range(1000):
        akikuti += A-1
        ans +=1
        if(akikuti >=B):
            print(ans)
            break
        else:
            continue

Submission status: Wrong Answer

Solution code:
s = input().split()
a = int(s[0])
b = int(s[1])
#print(a,b)
n = 1
x = 0
if a >= b:
  print(n)
  exit()
while b > x:
  n +=1
  x = a + (a-1)*n-1
print(n)

Submission status: Wrong Answer

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

cnt=0

if B % A == 0:
  cnt += 1
elif (B//A) % A != 0:
  C=B//A
  cnt = C + 1

print(cnt)

Submission status: Wrong Answer

Solution code:
import sys
A, B = map(int, input().split())
if B != 1:
    for i in range(1,10):
        C = A * i - i + 1
        if C >= B:
            print(i)
            sys.exit()
else:
    print(0)

Submission status: Wrong Answer

Solution code:
def test_b():
    A,B=(int(x) for x in input().split())
    tap_n=0
    while True:
        tap_n+=1
        out=A+(A-1)*(tap_n-1)
        if out>=B:
            tap_num=tap_n
            break
    print(tap_num)
test_b()

Submission status: Wrong Answer

Solution code:
A, B = map(int,input().split())
ans = 0
# 口の増え方　A,A+(A-1),A+(A-1)+(A-1),・・
if B-A == 0:
    ans = 1
    print(ans)
    exit()
if (B-A)%A > 0:
    ans = ((B-A)//A)+2
else:
    ans = ((B-A)//A)+1
print(ans)

Submission status: Wrong Answer

Solution code:
a = list(map(int,input().split()))
t = 0
if a[1] > a[0]:
  t = a[1] // a[0] +1
  print(t)
  
elif a[1] == 1:
  print(0)
else :
  print(1)

Submission status: Wrong Answer

Solution code:
# -*- coding: utf-8 -*-
a, b = map(int, input().split())
plugs = a
ans = 1
if a == b:
    print(ans)
else:
    while True:
        if plugs >= b:
            break
        else:
            ans += 1
            plugs += a - 1
    print(ans)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

if B<=A:
    ans=1
else:
    for k in range(2,100):
        if (k-1)*A-(k-2)<B and B<=k*A-(k-1):
            ans=k
        else:
            k=k+1
print(ans)

Submission status: Wrong Answer

Solution code:
import sys

num = list(input().split(" "))
a = int(num[0])
b = int(num[1])
if a >= b:
  print(1)
  sys.exit()

multi = 1

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

print(multi)

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

# スペース区切りの整数の入力
a, b  = map(int, input().split())

c=b//(a-1)
d=c*(a-1)+1

if b > d:
    print(c+1)
else:
    print(c)

Submission status: Wrong Answer

Solution code:
a, b = map(int, input().split())
cnt = 0
cnt_total = 0
if a == b: print(1)
elif a < b:
        for i in range(b):
                cnt += a
                cnt_total += 1
                if cnt >= b:
                        break
        print(cnt_total)
elif a > b and b == 1: print(0)
elif a > b:
        for i in range(b):
                cnt += a
                cnt_total += 1
                if cnt >= b:
                        break
        print(cnt_total)

Submission status: Wrong Answer

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

for i in range(1, B):
    if socket >= B:
        break
    else:
        socket += A - 1
        count += 1

print(count)

Submission status: Wrong Answer

Solution code:
# -*- coding: utf-8 -*-
a,b = map(int, raw_input().split())
count = 0
tmp = 0

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

Submission status: Wrong Answer

Solution code:
A,B=input().split()
tap=0
plug=1


#for i in range(int(B)*3):
#    plug+=int(A)-1
#    tap+=1
#    if plug >= int(B):
#        break

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

Submission status: Wrong Answer

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

if ans_tmp > 1 and ans_tmp < 2:
    print(int(ans_tmp) + 1)
elif ans_tmp < 1:
    print(1)
else:
    print(int(ans_tmp))

Submission status: Wrong Answer

Solution code:
import sys
a,b=map(int, input().split())
hole = a
if a==b:
    print(1)
else:
    for i in range(2,30):
        hole += a-1
        if hole>=b:
            print(i)
            break

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

ans = 0

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

print(ans)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
from math import ceil

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

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

Solution code:

def test_b():
    A,B=(int(x) for x in input().split())
    tap_num=0
    for tap_n in range(1,21):
        out=A+(A-1)*(tap_n-1)
        if out>=B:
            tap_num=tap_n
            break
    print(tap_num)
test_b()

Submission status: Wrong Answer

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

ans = 0

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

Submission status: Wrong Answer

Solution code:
s = input().split()
a = int(s[0])
b = int(s[1])
#print(a,b)
n = 1
x = 0
if a == b:
  print(n)
  exit()
while b > x:
  n +=1
  x = a + (a-1)*n-1
print(n)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

add_value = 0
while True:
    add_value += 1
    a *= add_value
    if a >= b:
        break

print(add_value)

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

ans = 0

if B <= A :
	print(1)

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

Submission status: Wrong Answer

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

if A >= B:
  print(1)
  exit();

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

Submission status: Wrong Answer

Solution code:
a,b = map(int, input().split())
check = b
ans = 0
while check > a:
    ans += check//a
    check = check//a + check%a

print (ans+1)

Submission status: Wrong Answer

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

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


print(c)

Submission status: Wrong Answer

Solution code:
import math

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

ans = 0

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

print(ans)

Submission status: Wrong Answer

Solution code:
a = list(map(int,input().split()))
t = 0
if a[1] > a[0]:
  t = a[1] // a[0] +1
  y = -(-(a[0]*t-1)// a[0])
  print(y)
elif a[1] == 1:
  print(0)
else :
  print(1)

Submission status: Wrong Answer

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

i = [1 for i in range(1,100) if (ab[0]-1)*i < ab[1]]

print(len(i))

Submission status: Wrong Answer

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

if (2 <= A <=20) and (1 <= B <=20):
    MAX = A
    for i in range(1,A+1):
        outlet =  i*A + (MAX -i)
        if (B <= outlet):
            print(i+1)
            break
        elif (outlet == A*A):
            MAX = A*A
            continue
else:
    print("error")

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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


ans = a
cnt = 1
for _ in range(21):
    ans += (a-1)
    cnt += 1
    if ans >= b:
        break

print(cnt)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
import sys, re, os
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
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 S_MAP(): return map(str, input().split())
def LIST(): return list(map(int, input().split()))
def S_LIST(): return list(map(str, input().split()))

sys.setrecursionlimit(10 ** 9)
INF = float('inf')
mod = 10 ** 9 + 7

a, b = MAP()
# n = INT()
# a, b, c = MAP()

k = 1
count = 0
ans = 0
A = []


count += a
ans += 1


while(1):
    if count >= b:
        print(ans)
        exit()
    else:
        count += a-1
        ans += 1
        # print()




# count += a
# ans += 1

# for i in range(100):
#     if b <= count:
#         print(ans)
#         exit()

#     else:
#         count += a-1
#         ans += 1 
#         # print(ans)

# for i in range(30):
# while(1):
#     count += a
#     ans += 1
#     print(count)

#     if b <= count:
#         print(ans)
#         exit()
#     else:   
#         count = count-1
#     # print(ans)
    
    # # A.append(a)
    # # if sum(A)
    # if count == 0:
    #     count += a
    #     ans += 1
    # else:
    #     count += a-1
    #     ans += 1
    # print(count)
    # print(ans)
    # if b<=count:
    #     # print(count)
    #     print(ans)
    #     exit()

Submission status: Wrong Answer

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

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


if a*2+(a-1)*(c-2)==b:
    print(c)
else:
    print(c+1)

Submission status: Wrong Answer

Solution code:
def test_b():
    A,B=(int(x) for x in input().split())
    tap_num=0
    for tap_n in range(1,21):
        out=A
        for j in range(1,tap_n):
            out+=A-1
        if out>=B:
            tap_num=tap_n
            break
    print(tap_num)
test_b()

Submission status: Wrong Answer

Solution code:
# -*- coding: utf-8 -*-
a,b = map(int, raw_input().split())
count = 0
tmp = 0

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
input_AB = input()
AB = input_AB.split(" ")
a_0 = int(AB[0])
Sn = 1
n = 1
if int(AB[1]) == 1:
    print(0)
else:
    while Sn < int(AB[1]):
        Sn = a_0 + (n - 1) * (a_0 -1)
        if Sn >= int(AB[1]):
            break
        n = n + 1
print(n)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
A = input().split()
count = 1
a = int(A[0])
b = int(A[1])
c = a
while a < b:
    a += c
    count += 1
    if a > b:
        break

print(count)

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

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

print(ans)

Submission status: Wrong Answer

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

ans = 0

if B <= A :
	print(1)

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

Submission status: Wrong Answer

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

if C % A != 0:
  cnt += 1

print(C+cnt)

Submission status: Wrong Answer

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

import math  
print(math.ceil((A[1]-1) / (A[0]-1)) )

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
I = input().split()
A = int(I[0])
B = int(I[1])
if B == 1:
  print(0)
elif A >= B:
  print(1)
elif A == 2:
  print(B - 1)
elif (B - 1) % (A - 1) == 1:  
  print(B // (A - 1) + 1)
else:
  print(B // (A - 1))

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

Solution code:

tap,out = map(int,input().split())

count = 1

while(1):
    if(out>tap):
        out = out - (tap-1)
        count += 1
    else:
        break
print(count)

Submission status: Wrong Answer

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

i = [1 for i in range(100) if (ab[0]-1)*i < ab[1]]

print(len(i)-1)

Submission status: Wrong Answer

Solution code:
A,B=map(int,input().split())
x=((B-1)//A+1)
all=A*x
use=x
nuse=all-use
if nuse>=B:
  print(x)    
else:
  add=(B-nuse)//A+1
  print(x+add)

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
A, B = map(int, input().split())
total = 0
cnt = 0
while True:
    if cnt == 0:
        total += A
        cnt += 1
    else:
        total += (A-1)
        cnt += 1

    if total >= B:
        break
print(cnt)

Submission status: Wrong Answer

Solution code:
def test_b():
    A,B=(int(x) for x in input().split())
    for tap_n in range(1,21):
        out=0
        for j in range(1,tap_n+1):
            out+=A-1
        out+=1
        if out>=B:
            print(tap_n)
            break
test_b()

Submission status: Wrong Answer

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

else:
    
    for i in range(10000):
        akikuti += A-1
        ans +=1
        if(akikuti >=B):
            print(ans)
            break

Submission status: Wrong Answer

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

ans = 0

if a >= b:
    print(1)
elif b/(a-1)+a <= b:
    print(int(b/(a-1)))
else:
    print(int(b/(a-1)+1))

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
#double underscore makes a class variable or a class method private
mod = 1000000007
ii = lambda :  int(input())
si = lambda :  input()
dgl = lambda : list(map(int, input()))
f = lambda :   map(int, input().split())
il = lambda :  list(map(int, input().split()))
it = lambda :  tuple(map(int, input().split()))
ls = lambda :  list(input())
a, b=f()
c=1
while a*c-c+1 < b:
    c += 1
print(c)

Submission status: Wrong Answer

Solution code:
import math

inputs = list(map(lambda i: float(i), input().split()))
A, B = inputs[0], inputs[1]
taps = 0.0

if not B == 1:
    taps = math.ceil((B-A)/(A-1)) + 1

print(taps)

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

Solution code:
a, b = map(int, raw_input().split())
cnt = 0
total = 0
is_init = True
while True:
    if total >= b:
        break
    if is_init:
        total += a
    else:
        total += a - 1
    is_init = False
    cnt += 1
print cnt