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:
# coding: utf-8
# Your code here!

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


if A == 2:
    if B == 1:
        print(1)
    if B == 2:
        print(1)
    if B == 3:
        print(2)
    if B == 4:
        print(3)
    if B == 5:
        print(4)
    if B == 6:
        print(5)
    if B == 7:
        print(6)
    if B == 8:
        print(7)
    if B == 9:
        print(8)
    if B == 10:
        print(9)
    if B == 11:
        print(10)
    if B == 12:
        print(11)
    if B == 13:
        print(12)
    if B == 14:
        print(13)
    if B == 15:
        print(14)
    if B == 16:
        print(15)
    if B == 17:
        print(16)
    if B == 18:
        print(17)
    if B == 19:
        print(18)
    if B == 20:
        print(19)

if A == 3:
    if B == 1:
        print(1)
    if B == 2:
        print(1)
    if B == 3:
        print(1)
    if B == 4:
        print(2)
    if B == 5:
        print(2)
    if B == 6:
        print(3)
    if B == 7:
        print(3)
    if B == 8:
        print(4)
    if B == 9:
        print(4)
    if B == 10:
        print(5)
    if B == 11:
        print(5)
    if B == 12:
        print(6)
    if B == 13:
        print(6)
    if B == 14:
        print(7)
    if B == 15:
        print(7)
    if B == 16:
        print(8)
    if B == 17:
        print(8)
    if B == 18:
        print(9)
    if B == 19:
        print(9)
    if B == 20:
        print(10)
        
if A == 4:
    if B == 1:
        print(1)
    if B == 2:
        print(1)
    if B == 3:
        print(1)
    if B == 4:
        print(1)
    if B == 5:
        print(2)
    if B == 6:
        print(2)
    if B == 7:
        print(2)
    if B == 8:
        print(3)
    if B == 9:
        print(3)
    if B == 10:
        print(3)
    if B == 11:
        print(4)
    if B == 12:
        print(4)
    if B == 13:
        print(4)
    if B == 14:
        print(5)
    if B == 15:
        print(5)
    if B == 16:
        print(5)
    if B == 17:
        print(6)
    if B == 18:
        print(6)
    if B == 19:
        print(6)
    if B == 20:
        print(7)
        
if A == 5:
    if B == 1:
        print(1)
    if B == 2:
        print(1)
    if B == 3:
        print(1)
    if B == 4:
        print(1)
    if B == 5:
        print(1)
    if B == 6:
        print(2)
    if B == 7:
        print(2)
    if B == 8:
        print(2)
    if B == 9:
        print(2)
    if B == 10:
        print(3)
    if B == 11:
        print(3)
    if B == 12:
        print(3)
    if B == 13:
        print(3)
    if B == 14:
        print(4)
    if B == 15:
        print(4)
    if B == 16:
        print(4)
    if B == 17:
        print(4)
    if B == 18:
        print(5)
    if B == 19:
        print(5)
    if B == 20:
        print(5)
        
if A == 6:
    if B == 1:
        print(1)
    if B == 2:
        print(1)
    if B == 3:
        print(1)
    if B == 4:
        print(1)
    if B == 5:
        print(1)
    if B == 6:
        print(1)
    if B == 7:
        print(2)
    if B == 8:
        print(2)
    if B == 9:
        print(2)
    if B == 10:
        print(2)
    if B == 11:
        print(2)
    if B == 12:
        print(3)
    if B == 13:
        print(3)
    if B == 14:
        print(3)
    if B == 15:
        print(3)
    if B == 16:
        print(3)
    if B == 17:
        print(4)
    if B == 18:
        print(4)
    if B == 19:
        print(4)
    if B == 20:
        print(4)

if A == 7:
    if B == 1:
        print(1)
    if B == 2:
        print(1)
    if B == 3:
        print(1)
    if B == 4:
        print(1)
    if B == 5:
        print(1)
    if B == 6:
        print(1)
    if B == 7:
        print(1)
    if B == 8:
        print(2)
    if B == 9:
        print(2)
    if B == 10:
        print(2)
    if B == 11:
        print(2)
    if B == 12:
        print(2)
    if B == 13:
        print(2)
    if B == 14:
        print(3)
    if B == 15:
        print(3)
    if B == 16:
        print(3)
    if B == 17:
        print(3)
    if B == 18:
        print(3)
    if B == 19:
        print(3)
    if B == 20:
        print(4)
        
if A == 8:
    if B == 1:
        print(1)
    if B == 2:
        print(1)
    if B == 3:
        print(1)
    if B == 4:
        print(1)
    if B == 5:
        print(1)
    if B == 6:
        print(1)
    if B == 7:
        print(1)
    if B == 8:
        print(1)
    if B == 9:
        print(2)
    if B == 10:
        print(2)
    if B == 11:
        print(2)
    if B == 12:
        print(2)
    if B == 13:
        print(2)
    if B == 14:
        print(2)
    if B == 15:
        print(2)
    if B == 16:
        print(3)
    if B == 17:
        print(3)
    if B == 18:
        print(3)
    if B == 19:
        print(3)
    if B == 20:
        print(3)
        
if A == 9:
    if B == 1:
        print(1)
    if B == 2:
        print(1)
    if B == 3:
        print(1)
    if B == 4:
        print(1)
    if B == 5:
        print(1)
    if B == 6:
        print(1)
    if B == 7:
        print(1)
    if B == 8:
        print(1)
    if B == 9:
        print(1)
    if B == 10:
        print(2)
    if B == 11:
        print(2)
    if B == 12:
        print(2)
    if B == 13:
        print(2)
    if B == 14:
        print(2)
    if B == 15:
        print(2)
    if B == 16:
        print(2)
    if B == 17:
        print(2)
    if B == 18:
        print(3)
    if B == 19:
        print(3)
    if B == 20:
        print(3)
        
if A == 10:
    if B == 1:
        print(1)
    if B == 2:
        print(1)
    if B == 3:
        print(1)
    if B == 4:
        print(1)
    if B == 5:
        print(1)
    if B == 6:
        print(1)
    if B == 7:
        print(1)
    if B == 8:
        print(1)
    if B == 9:
        print(1)
    if B == 10:
        print(1)
    if B == 11:
        print(2)
    if B == 12:
        print(2)
    if B == 13:
        print(2)
    if B == 14:
        print(2)
    if B == 15:
        print(2)
    if B == 16:
        print(2)
    if B == 17:
        print(2)
    if B == 18:
        print(2)
    if B == 19:
        print(2)
    if B == 20:
        print(3)
        
if A == 11:
    if B == 1:
        print(1)
    if B == 2:
        print(1)
    if B == 3:
        print(1)
    if B == 4:
        print(1)
    if B == 5:
        print(1)
    if B == 6:
        print(1)
    if B == 7:
        print(1)
    if B == 8:
        print(1)
    if B == 9:
        print(1)
    if B == 10:
        print(1)
    if B == 11:
        print(1)
    if B == 12:
        print(2)
    if B == 13:
        print(2)
    if B == 14:
        print(2)
    if B == 15:
        print(2)
    if B == 16:
        print(2)
    if B == 17:
        print(2)
    if B == 18:
        print(2)
    if B == 19:
        print(2)
    if B == 20:
        print(2)
        
if A == 12:
    if B == 1:
        print(1)
    if B == 2:
        print(1)
    if B == 3:
        print(1)
    if B == 4:
        print(1)
    if B == 5:
        print(1)
    if B == 6:
        print(1)
    if B == 7:
        print(1)
    if B == 8:
        print(1)
    if B == 9:
        print(1)
    if B == 10:
        print(1)
    if B == 11:
        print(1)
    if B == 12:
        print(1)
    if B == 13:
        print(2)
    if B == 14:
        print(2)
    if B == 15:
        print(2)
    if B == 16:
        print(2)
    if B == 17:
        print(2)
    if B == 18:
        print(2)
    if B == 19:
        print(2)
    if B == 20:
        print(2)
        
if A == 13:
    if B == 1:
        print(1)
    if B == 2:
        print(1)
    if B == 3:
        print(1)
    if B == 4:
        print(1)
    if B == 5:
        print(1)
    if B == 6:
        print(1)
    if B == 7:
        print(1)
    if B == 8:
        print(1)
    if B == 9:
        print(1)
    if B == 10:
        print(1)
    if B == 11:
        print(1)
    if B == 12:
        print(1)
    if B == 13:
        print(1)
    if B == 14:
        print(2)
    if B == 15:
        print(2)
    if B == 16:
        print(2)
    if B == 17:
        print(2)
    if B == 18:
        print(2)
    if B == 19:
        print(2)
    if B == 20:
        print(2)
        
if A == 14:
    if B == 1:
        print(1)
    if B == 2:
        print(1)
    if B == 3:
        print(1)
    if B == 4:
        print(1)
    if B == 5:
        print(1)
    if B == 6:
        print(1)
    if B == 7:
        print(1)
    if B == 8:
        print(1)
    if B == 9:
        print(1)
    if B == 10:
        print(1)
    if B == 11:
        print(1)
    if B == 12:
        print(1)
    if B == 13:
        print(1)
    if B == 14:
        print(1)
    if B == 15:
        print(2)
    if B == 16:
        print(2)
    if B == 17:
        print(2)
    if B == 18:
        print(2)
    if B == 19:
        print(2)
    if B == 20:
        print(2)
        
if A == 15:
    if B == 1:
        print(1)
    if B == 2:
        print(1)
    if B == 3:
        print(1)
    if B == 4:
        print(1)
    if B == 5:
        print(1)
    if B == 6:
        print(1)
    if B == 7:
        print(1)
    if B == 8:
        print(1)
    if B == 9:
        print(1)
    if B == 10:
        print(1)
    if B == 11:
        print(1)
    if B == 12:
        print(1)
    if B == 13:
        print(1)
    if B == 14:
        print(1)
    if B == 15:
        print(1)
    if B == 16:
        print(2)
    if B == 17:
        print(2)
    if B == 18:
        print(2)
    if B == 19:
        print(2)
    if B == 20:
        print(2)
        
if A == 16:
    if B == 1:
        print(1)
    if B == 2:
        print(1)
    if B == 3:
        print(1)
    if B == 4:
        print(1)
    if B == 5:
        print(1)
    if B == 6:
        print(1)
    if B == 7:
        print(1)
    if B == 8:
        print(1)
    if B == 9:
        print(1)
    if B == 10:
        print(1)
    if B == 11:
        print(1)
    if B == 12:
        print(1)
    if B == 13:
        print(1)
    if B == 14:
        print(1)
    if B == 15:
        print(1)
    if B == 16:
        print(1)
    if B == 17:
        print(2)
    if B == 18:
        print(2)
    if B == 19:
        print(2)
    if B == 20:
        print(2)
        
if A == 17:
    if B == 1:
        print(1)
    if B == 2:
        print(1)
    if B == 3:
        print(1)
    if B == 4:
        print(1)
    if B == 5:
        print(1)
    if B == 6:
        print(1)
    if B == 7:
        print(1)
    if B == 8:
        print(1)
    if B == 9:
        print(1)
    if B == 10:
        print(1)
    if B == 11:
        print(1)
    if B == 12:
        print(1)
    if B == 13:
        print(1)
    if B == 14:
        print(1)
    if B == 15:
        print(1)
    if B == 16:
        print(1)
    if B == 17:
        print(1)
    if B == 18:
        print(2)
    if B == 19:
        print(2)
    if B == 20:
        print(2)
        
if A == 18:
    if B == 1:
        print(1)
    if B == 2:
        print(1)
    if B == 3:
        print(1)
    if B == 4:
        print(1)
    if B == 5:
        print(1)
    if B == 6:
        print(1)
    if B == 7:
        print(1)
    if B == 8:
        print(1)
    if B == 9:
        print(1)
    if B == 10:
        print(1)
    if B == 11:
        print(1)
    if B == 12:
        print(1)
    if B == 13:
        print(1)
    if B == 14:
        print(1)
    if B == 15:
        print(1)
    if B == 16:
        print(1)
    if B == 17:
        print(1)
    if B == 18:
        print(1)
    if B == 19:
        print(2)
    if B == 20:
        print(2)
        
if A == 19:
    if B == 1:
        print(1)
    if B == 2:
        print(1)
    if B == 3:
        print(1)
    if B == 4:
        print(1)
    if B == 5:
        print(1)
    if B == 6:
        print(1)
    if B == 7:
        print(1)
    if B == 8:
        print(1)
    if B == 9:
        print(1)
    if B == 10:
        print(1)
    if B == 11:
        print(1)
    if B == 12:
        print(1)
    if B == 13:
        print(1)
    if B == 14:
        print(1)
    if B == 15:
        print(1)
    if B == 16:
        print(1)
    if B == 17:
        print(1)
    if B == 18:
        print(1)
    if B == 19:
        print(1)
    if B == 20:
        print(2)
        
if A == 20:
    print(1)

Submission status: Wrong Answer

Solution code:
import math

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

ans = 0

if a == b or a > b:
    ans = 1
else:
    ans = math.floor((b / a))+1

print(ans)

Submission status: Wrong Answer

Solution code:
from math import ceil
if __name__ == "__main__":

    a = list(map(int, input().split()))
    r = ceil(a[1]/a[0])
    n = a
    if r*a[0] >= a[1]: print(r)
    else:
        while True:
            n -= 1
            n += a
            if n >= a[1]:
                print(n)
                break

Submission status: Wrong Answer

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

if A<2 or A>20 or B<1 or B>20:
	exit()

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

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

print(ans)

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)
elif count // a >= 1:
    print(-(-count // a))
else:
    print(0)

Submission status: Wrong Answer

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

result = A-1
count = 1
while(True):
	if result+1 >= B:
		print(count)
		exit()
	result += A
	count += 1

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

if A<2 or A>20 or B<1 or B>20:
	sys.exit()

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

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

Submission status: Wrong Answer

Solution code:
import math

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

ans = 0

if a == b or a > b:
    ans = 1
else:
    ans = math.floor((b / b)+1)

print(ans)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

if B==1:
    print(0)
    exit
x = 1
while(A*x-x+1<B):
    x += 1
print(x)

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
def main(A, B):
    # A + N*(A-1)
    port = A
    i = 1

    if A >= B:
        return 1

    while port < B:
        port += A-1
        i += 1
    else:
        return i


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

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

socket = A
sum_socket = A
if sum_socket <= B or B == 1:
    tap = 1
    while sum_socket < B:
        sum_socket = sum_socket - 1 + socket
        tap += 1
else:
    tap = 0
print(tap)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
I = input().split()
A = int(I[0])
B = int(I[1])
ana = 0
i = 0
while(True):
  if i == 0:
  	ana += A
  else:
    ana += (A-1)
  i += 1
  if ana >= B:
    break
print(i)

Submission status: Wrong Answer

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

if B==1:
    print(1)
    exit
x = 1
while(A*x-x+1<B):
    x += 1
print(x)

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

Submission status: Wrong Answer

Solution code:

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

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

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

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())
cnt = 0
cnt_total = 0
if a == b: print(1)
elif a < b:
        for i in range(a):
                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(a):
                cnt += a
                cnt_total += 1
                if cnt >= b:
                        break
        print(cnt_total)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
s=list(map(int,input().split()))
if s[0]==s[1]:
    print(1)
else:
    num=1
    while num*s[0]-1 < s[1]:
        num+=1
    print(num)

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:
# -*- coding: utf-8 -*-
a,b = map(int, raw_input().split())
count = 0 
if a >= b:
	print 1
else:
	count = 1
	sub = b - a
	while True:
		count +=1
		if sub <= (a-1):			
			break
		else:
			sub = sub - (a-1)
	print count

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

less=False
counter=1
while less is False:
    #print("counter="+str(counter))
    total=counter*A-(counter-1)
    #print("total="+str(total))
    if (total >= B):
        less=True
    else:
        counter=counter+1

print(counter)

Submission status: Wrong Answer

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

result = A
count = 1
while(True):
	if result >= B:
		print(count)
		exit()
	result += A
	A -= 1
	count += 1

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(10):
        akikuti += A-1
        ans +=1
        if(akikuti >=B):
            print(ans)
            break

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
input_char = input()
a = int(input_char.split()[0])
b = int(input_char.split()[1])
unused_tap = 1
count = 0

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

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

while(1):
    if unused_tap >= b:
        print(count + 1)
        break
    
    unused_tap = unused_tap-1 + a 
    count += 1

Submission status: Wrong Answer

Solution code:
def main(A, B):
    # A + N*(A-1)
    port = A
    i = 1

    if A >= B:
        return 1

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

    return i


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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
n,m=map(int,input().split())
sockets=n
ctr=1
while(sockets<m):
        sockets+=(n-1)
        ctr+=1
print(ctr)

Submission status: Wrong Answer

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

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
import math

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

ans = 0

if a != b and a <= b:
    ans = math.floor((b / b)+1)
else:
 ans = 1

print(ans)

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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


print(c)

Submission status: Wrong Answer

Solution code:
a = []
a = input().split()

A = a[0]
A = int(A)
B = a[1]
B = int(B)

tap = 1

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

print(tap)

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()
  
  cnt = 1
  tmp = a-1
  if a == b:
    print(1)
    exit()
  while tmp < b:
    tmp += a
    cnt += 1
    if tmp < b:
      tmp -= 1
  print(cnt)
main()

Submission status: Wrong Answer

Solution code:
n=[int(i) for i in input().split()]
a=n[0]
b=n[1]
if(a==b):
  print("1")
else:
  count=0
  i=0
  while(count!=b):
    i+=1
    if((count+a)>=b):
      count+=a
      print(i)
      break
    else:
      count+=a-1

Submission status: Wrong Answer

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

cnt = 1
N = A

if B==1:
  print(1)
  sys.exit()

for i in range(0, B):
  if N >= B:
    print(cnt)
    break
  else:
    cnt+=1
    N+=(A-1)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
i = list(map(int, input().split()))
for x in range(1, 20):
    if (i[0] * x - (x-1)) >= i[1]:
        print(x)
        break;

Submission status: Wrong Answer

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

ans = 0

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

Submission status: Wrong Answer

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

import math

if B == 1:
    print(0)

else:
    C = math.ceil(B/A)
    D = (A-1)*(C-1) + A
    if D >= B:
        print(C)
    else:
        print(C+1)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
import math
a,  b = map(int, input().split())
count = 0
r= b/(a-1)
q = b%(a-1)
s = math.floor(r)
if a >= b:
    count = 1
elif b - (s * (a-1)) <=1:
    count = s
    
elif b - (s * (a-1)) >1:
    count = s+1
elif q == 0:
    count = s
elif b==1:
    count = 0
print(count)

Submission status: Wrong Answer

Solution code:
import math
a , b = map(int, input().split(" "))
c = 0
if(b == 1):
    print(0)
else:
    c = int(math.ceil(b/a))
    if(b % a == 0 and 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):
    ia = i+1
    if a*ia-(ia-1)>= b:
        print(ia)
        break

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

import math

C = math.ceil(B/A)
D = (A-1)*(C-1) + A
if D >= B:
	print(C)
else:
	print(C+1)

Submission status: Wrong Answer

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

cnt = 1
N = A

if A==1:
  print(1)
  sys.exit()

for i in range(0, B):
  if N >= B:
    print(cnt)
    break
  else:
    cnt+=1
    N+=(A-1)

Submission status: Wrong Answer

Solution code:
from math import ceil

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

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

count = 1

if(B>1):
    a = A
    while(A<B):
        A += a
        count += 1
        pass
else:
    count = 0
    pass


print(count)

Submission status: Wrong Answer

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

	if temp < b:
		temp += (a-1)
		cnt+=1
	else:
		print(cnt)
		exit()

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

import math

C = math.ceil(B/A)
D = (A-1)*(C-1) + A
if D <= B:
	print(C)
else:
	print(C+1)

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()
  
  cnt = 1
  tmp = a
  while tmp < b:
    if tmp == b:
      break
    tmp += a-1
    cnt += 1
  print(cnt)
main()

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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