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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

while socket_count <= B:
    if socket_count == B:
        break
    else:
        socket_count += (A - 1)
        result += 1
print(result)

Submission status: Wrong Answer

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

else:
    print(B//A)

Submission status: Wrong Answer

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

else:
    print(B//A)

Submission status: Wrong Answer

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

elif A == B:
    print(1)

else:
    print(0)

Submission status: Wrong Answer

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

elif A == B:
    print(1)

else:
    print(0)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
A, B = [int(i) for i in input().split()]
if B % A != 0:
    print(B//A + 1)
else:
    print(B//A)

Submission status: Wrong Answer

Solution code:
#入力:N,M(int:整数)
def input2():
	return map(int,input().split())

a,b=input2()
count=1

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

Submission status: Wrong Answer

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

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

    print(cnt)


if __name__ == '__main__':
    main()

Submission status: Wrong Answer

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


if __name__ == '__main__':
    main()

Submission status: Wrong Answer

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


if __name__ == '__main__':
    main()

Submission status: Wrong Answer

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

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

print(ans+1)

Submission status: Wrong Answer

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

count = 0
avail = 1

while avail < B:
  avail -= 1
  count += 1
  avail = count * A

print(count)

Submission status: Wrong Answer

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

count = 0
avail = 1

while avail < B:
  avail - 1
  count += 1
  avail = count * A

print(count)

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

Solution code:
import sys
a,b=map(int,input().split())
p=1
ans=0
for i in range(0,20):
  p+=a-1
  ans+=1
  if p>=b:
    print(ans)
    sys.exit()

Submission status: Wrong Answer

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

N = 0

if A >= B:
  N = 1

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

print(N)

Submission status: Wrong Answer

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

N = 1

if not A > B:
  N = 1
  X = A
  while X < B:
    N += 1
    X = A*N-(N-1)

print(N)

Submission status: Wrong Answer

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

N = 1

if not A >= B:
  N = 1
  X = A
  while X < B:
    N += 1
    X = A*N-(N-1)

print(N)

Submission status: Wrong Answer

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

N = 1

if not A >= B:
  N = 1
  tmp = A
  while A < B:
    A += tmp
    N += 1

print(N)

Submission status: Wrong Answer

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

N = 1

if not A >= B:
  N = 1
  tmp = A
  while A <= B:
    A += tmp
    N += 1

print(N)

Submission status: Wrong Answer

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

if B <= 0:
  N = 0
elif A >= B:
  N = 1
else:
  N = 1
  while A <= B:
    A += A
    N += 1

print(N)

Submission status: Wrong Answer

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

ans = 1
outlet = a

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

print(ans)

Submission status: Wrong Answer

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

ans = 1
outlet = 4

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

print(ans)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
from math import ceil

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

Submission status: Wrong Answer

Solution code:
import sys

# import bisect
# import numpy as np
from collections import deque
# map(int, sys.stdin.read().split())



def input():
    return sys.stdin.readline().rstrip()


def main():
    A,B =map(int,input().split())
    print((B-1)//A +1)


if __name__ == "__main__":
    main()

Submission status: Wrong Answer

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

    print(ans)

if '__main__' == __name__:
    resolve()

Submission status: Wrong Answer

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

    print(ans)

if '__main__' == __name__:
    resolve()

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
import math

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

Submission status: Wrong Answer

Solution code:
import math

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

a,b = map(int, input().split())
if a>=b:
    print(1)
else:
    print(math.floor((b-a)/(a-1)) + 1)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
a, b = map(int, input().split())  
def calc(m,B, i):
    if m == 0:
        return 0
    if (i*(m-1) >= B-1):
        return i
    return calc(m,B, i+1)
print(calc(a,b,i=1))

Submission status: Wrong Answer

Solution code:
a, b = map(int, input().split())  
def calc(m,B, i):
    if (i*(m-1) >= B-1):
        return i
    return calc(m,B, i+1)
print(calc(a,b,i=1))

Submission status: Wrong Answer

Solution code:
q_input = input()

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

# if a == b:
#     print(1)
# else:
#     ans = int((10-1+a-2)/(a-1))
#     print(ans)

amari = (b-a) % (a-1)
ans = int((b-a) / (a-1)) + 1
if amari == 0:
    print(ans)
else:
    print(ans+1)

Submission status: Wrong Answer

Solution code:

q_input = input()

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

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

Submission status: Wrong Answer

Solution code:
q_input = input()

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

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

ans = int((10-1+a-2)/(a-1))

print(ans)

Submission status: Wrong Answer

Solution code:
q_input = input()

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

ans = int((10-1+a-2)/(a-1))

print(ans)

Submission status: Wrong Answer

Solution code:
q_input = input()

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

ans = int((10-1)/(a-1))

print(ans)

Submission status: Wrong Answer

Solution code:

q_input = input()

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

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

print(ans)

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

count = 0
tap = 1

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

Submission status: Wrong Answer

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

if B == 0 or B == 1:
  print(int(0))
elif B % A == 0:
  print(int(num))
else:
  print(int(num + 1))

Submission status: Wrong Answer

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

if B == 0:
  print(int(0))
elif B % A == 0:
  print(int(num))
else:
  print(int(num + 1))

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
A, B = map(int, input().split())
def gen(a, n):
    return a * n - n + 1
t = 1
while True:
    socket = gen(A,t)
    if  socket >= B:
        ans = t
        break
    t += 1
print(ans)

Submission status: Wrong Answer

Solution code:
A, B = map(int, input().split())
def gen(a, n):
    return a * n - n + 1
for t in range(1,21):
    socket = gen(A,t)
    if  socket >= B:
        ans = t
        break
print(ans)

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
#<B>
import math
A, B = map(int,input().split())
i = 1
while True:
    if A * i + (i - 1) >= B:
        print(i)
        break
    i += 1

Submission status: Wrong Answer

Solution code:
#<B>
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(" "))
i = 1
while i >=1:
  d = (a-1)*i +1
  if d >= b:
    print(i)
    break
  else:
    i += 1

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

x = int(B/A)
y = B%A

if y == 0:
    print(x)
else:
    print(x+1)

Submission status: Wrong Answer

Solution code:
p = list(map(int,input().split()))
#print(p)
min_tap = p[1] % p[0]
if min_tap == 0:
    count = int(p[1] / p[0])
else:
    count = int(p[1] // p[0] + 1)
print(count)

Submission status: Wrong Answer

Solution code:
p = list(map(int,input().split()))
min_tap = p[1] % p[0]
if min_tap == 0:
    count = int(p[1] / p[0])
else:
    count = p[1] // p[0] + 1
print(count)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
a, b = map(int, input().split())
count = 1
for i in range(1,b+1):
    if (a*count < i):
        count += 1
    #print(f'{i}口:{count}個')
print(count)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
import sys
import math

def main():

    input = sys.stdin.readline

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

if __name__ == "__main__":
    main()

Submission status: Wrong Answer

Solution code:
import sys
import math

def main():

    input = sys.stdin.readline

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

if __name__ == "__main__":
    main()

Submission status: Wrong Answer

Solution code:
A, B = map(int, input().split())
# 最初は一つ
tap_num = 1
count = 0
while True:
	# Aを追加
    tap_num -= 1
    tap_num += A
    count += 1
    if tap_num >= B:
    	break
print(count)

Submission status: Wrong Answer

Solution code:
from math import *

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

Submission status: Wrong Answer

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

s=5
i=1
while True:
    if B==1:
        print(0)
        break
    elif A==B:
        print(1)
        break

    elif s>=B:
        print(i)
        break
    s+=4
    i+=1

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

i=0
while True:
    if B==1:
        print(0)
        break

    elif A*i>=B:
        print(i)
        break
    i+=1

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

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

print(i)

Submission status: Wrong Answer

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

ans = A

for i in range(10000000):
    if B <= ans:
        print(i + 1)
        exit()
    else:
        ans += A - 1

Submission status: Wrong Answer

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

ans = A

for i in range(B):
    if B <= ans:
        print(i + 1)
        exit()
    else:
        ans += A - 1

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
if __name__ == "__main__":
    A, B = list(map(int, input().split()))
    num_of_tap = 1
    num_of_hole = A
    while(num_of_hole < B):
        num_of_tap += 1
        num_of_hole = (A-1)*(num_of_tap-1) + A

    print(num_of_tap)

Submission status: Wrong Answer

Solution code:
if __name__ == "__main__":
    A, B = list(map(int, input().split()))
    num_of_tap = 1
    while((A-1)*(num_of_tap-1) + A < B):
        num_of_tap += 1

    print(num_of_tap)

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

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

print(ans)

Submission status: Wrong Answer

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

ans = 1

if a >= b:
    print(1)
else:
    while (a + (a-1)*(ans-1)) < b:
        ans += 1
    print(ans)

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

Solution code:
a,b = map(int,input().split())
if a>=b:
    print(round(b/a))
elif a<b:
    x=round(b/a)+1
    print(x)

Submission status: Wrong Answer

Solution code:
A, B = map(lambda x: int(x) + 1, input().split())

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

Submission status: Wrong Answer

Solution code:
A, B = map(lambda x: int(x) + 1, input().split())

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
import sys
import heapq
import math
import fractions
import bisect
import itertools
from collections import Counter
from collections import deque
from operator import itemgetter
def input(): return sys.stdin.readline().strip()
def mp(): return map(int,input().split())
def lmp(): return list(map(int,input().split()))

a,b=mp()
for i in range(1,100):
    if 1+(a-1)*i>=b:
        print(i)
        exit()

Submission status: Wrong Answer

Solution code:
import sys
import heapq
import math
import fractions
import bisect
import itertools
from collections import Counter
from collections import deque
from operator import itemgetter
def input(): return sys.stdin.readline().strip()
def mp(): return map(int,input().split())
def lmp(): return list(map(int,input().split()))

a,b=mp()
for i in range(1,100):
    if a*i-(i-1)>=b:
        print(i)
        exit()

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

Solution code:
import sys
input = lambda: sys.stdin.readline().rstrip()

def main():
    a, b = map(int, input().split())
    ans = 1
    socket = a
    while socket < b:
        socket += (a - 1)
        ans += 1
    print(ans)    

if __name__ == '__main__':
    main()

Submission status: Wrong Answer

Solution code:
import sys
input = lambda: sys.stdin.readline().rstrip()

def main():
    a, b = map(int, input().split())
    ans = 1
    sockets = a
    while sockets < b:
        sockets += (a - 1)
        ans += 1
    print(ans)

if __name__ == '__main__':
    main()

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

count = 0
for i in range(20):
    c = a + a*i
    count += 1
    if c <= b:
      print(count)
      break

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

for i in range(1,21):
    if(B<=A*i-(i-1)):
        print(i)
        exit()

Submission status: Wrong Answer

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

for i in range(1,20):
    if(B<=A*i-(i-1)):
        print(i)
        exit()

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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


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

Submission status: Wrong Answer

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

print(i)

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

ans = B // A
if B % A != 0 and A <= B:
    ans += 1
print(ans)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

Solution code:
def resolve():
    a, b = map(int, input().split())
    ret = 0
    if b > 1:
        from math import ceil
        ret = ceil(b / a)
    print(ret)


if __name__ == '__main__':
    resolve()

Submission status: Wrong Answer

Solution code:
def resolve():
    a, b = map(int, input().split())
    ret = 0
    if b > 1:
        n, m = divmod(b, a)
        ret = n + (1 if m > 0 else 0)
    print(ret)


if __name__ == '__main__':
    resolve()

Submission status: Wrong Answer

Solution code:
def resolve():
    a, b = map(int, input().split())
    n, m = divmod(b, a)
    print(n + (1 if m > 0 else 0))


if __name__ == '__main__':
    resolve()

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

tap = 1
ans = 0
for i in range(1, 100):
    tap -= 1
    tap += a
    if tap >= b:
        ans = i
        break

print(ans)

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

print(math.ceil(b/a))

Submission status: Wrong Answer

Solution code:
# B - Power Socket
def main():
    a, b = map(int, input().split())
    cnt = 1
    for _ in range(20):
        if a >= b:
            print(cnt)
            exit()
        else:
            a = a + (a-1)
            cnt += 1

if __name__ ==  "__main__":
    main()

Submission status: Wrong Answer

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