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())
for i in range(100):
  if (a + (a-1) * i) >= b:
    break
print(i+1)

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, result, tap = 0, 0, 0, 0
a, b = map(int, input().split())
while True:
  result += a - 1
  if result >= b:
    break
  tap += 1
print(str(tap))

Submission status: Wrong Answer

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

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

c = divmod(b, a)
if b == 1:
    print(0)
elif c[1] == 0:
    print(c[0])
else:
    print(c[0] + 1)

Submission status: Wrong Answer

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

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 += 2
	print(ans)

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 a > b:
    print(0)
    exit()

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

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
  num = num +1
  print(num)

Submission status: Wrong Answer

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

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
	count += 1

Submission status: Wrong Answer

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

print((y//(x+1))+1)

Submission status: Wrong Answer

Solution code:
n=[int(i) for i in input().split()]
a=n[0]
b=n[1]
if(a==b):
  print("0")
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:
a,b=input().split()
a = int(a)
b = int(b)
    
for i in range(21):
    if (a-1)*i + a >= b:
        print(i+1)
        break

Submission status: Wrong Answer

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

ans = 0
num = 0

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

Submission status: Wrong Answer

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

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

# solve
ans = 0
tap = 1
while True:
    if tap >= B:
        break
    if ans == 0:
        tap += A
    else:
        tap += A - 1
    ans += 1

# output
print(ans)

Submission status: Wrong Answer

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

current = a
counter = 1
remain = a
while current < b:
    current -= 1
    current += a
    counter += 1
print(counter)

Submission status: Wrong Answer

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

amari = (B-1)%(A-1)

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

print(ans)

Submission status: Wrong Answer

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

q = b // a
mod = b % a

if not mod == 0:
  q += 1
  
print(q)

Submission status: Wrong Answer

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

cnt = 1
N = A

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

if b == 1:
    print(0)

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

Submission status: Wrong Answer

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

    if total >= B:
        break
print(cnt)

Submission status: Wrong Answer

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

A = int(B) // int(A)

ans = A + 1

print(ans)

Submission status: Wrong Answer

Solution code:

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

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

Submission status: Wrong Answer

Solution code:
import math

m,n=map(int,input().split())
if(n==1):
    print(0)
else:
    ans=math.ceil(n/m)
    print(ans)

Submission status: Wrong Answer

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

cnt = 1
temp = a
while True:

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

Submission status: Wrong Answer

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

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

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

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

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)

Submission status: Wrong Answer

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

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

print(B//A + 1)

Submission status: Wrong Answer

Solution code:
x=list(map(int,raw_input().split()))
if x[1]%x[0]==0:
	print x[1]/x[0]
else:
	print x[1]%x[0]+1

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

Submission status: Wrong Answer

Solution code:
in_data = input()
 
data = in_data.split(' ')
A = int(data[0])
B = int(data[1])
if B == 1:
  print("0")
else:
  c = (B + 2)// (A - 1)
  print(c)

Submission status: Wrong Answer

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

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

print(len(i))

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

c = divmod(b, a)
if c[0] == 0:
    print(0)
elif c[1] == 0:
    print(c[0])
else:
    print(c[0] + 1)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

if b == 1:
    print(0)

for i in range(10 ** 9):
    ans += 1
    tmp += a
    if b <= tmp:
        break
    else:
        tmp -= 1
print(ans)

Submission status: Wrong Answer

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

if a >= b:
    print(1)
else:
    tap = -(-(b-a)//(a-1)) + 1
    print(tap)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

print(i)

Submission status: Wrong Answer

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

t = A
c = 1
while True:
    if t<B:
        t = (t-1)+A
        c += 1
    else:
        break

print(c)

Submission status: Wrong Answer

Solution code:
input_AB = input()
AB = input_AB.split(" ")
a_0 = int(AB[0])
Sn = 0
n = 1
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:
s=list(map(int,input().split()))
num=1
while num*s[0] < s[1]:
  num+=1

print(num)

Submission status: Wrong Answer

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

for i in range(1, 30):
    if cnt * A - cnt > B :
        break
    else :
        cnt +=1

if B == 1:
    cnt = 0

print(cnt)

Submission status: Wrong Answer

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

for i in range(2, 20):
    if(A ** i >= B):
        n = i
        break
            
print(i)

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

ans = 0

if B <= A :
	print(ans)

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
A, B = [int(x) for x in input().split()]
B +=1
ans = B / A
if ans > B // A:
  ans += 1
if B == 1:
  ans = 0

print(int(ans))

Submission status: Wrong Answer

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

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):
        print(c + 1)
    else:
        print(c)

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 = A * i
    if A >= B:
        print(i)
        break

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
import sys
# sys.setrecursionlimit(1000000)
# N, Q = map(int, sys.stdin.readline().split())
# a_b = [list(map(int, sys.stdin.readline().split())) for _ in range(N-1)]
# p_x = [list(map(int, sys.stdin.readline().split())) for _ in range(Q)]
a, b = map(int,input().split())
sum = a
count = 1
for i in range(10000):
        if sum < b:
                sum += (a-1)
                count += 1
        else:
                break
print(count)

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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


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())
c = a
count = 1
while True:
    if c<b:
        count += 1
        c += a-1
    else:
        break
print(count)

Submission status: Wrong Answer

Solution code:
import sys

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

nouse = 0

for i in range(20):
    if nouse+A >= B:
        print(i+1)
        sys.exit(0)
    else:
        nouse += (A-1)

Submission status: Wrong Answer

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

current = 0
counter = 0
for i in range(20):
    if current >= b:
        print(counter)
        break
    if i == 0:
        current += a
        counter += 1
    else:
        current -= 1
        current += a
        counter += 1

Submission status: Wrong Answer

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

ans = int()

if B <= A :
	print(1)

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

Submission status: Wrong Answer

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

a = input_data[0]
b = input_data[1]

ans = 0

while True:
    if b <= 1 & ans == 0:
        break
    elif b > a:
        b = b - a +1
        ans += 1
    else:
        ans += 1
        break

print(ans)

Submission status: Wrong Answer

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

s = A
ans = 1
if A >= B:
  """
  None
  """
else:
  while s < B:
    s += A - 1
    ans += 1
print(ans)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

while a < b:
    a += a
    count += 1
    if a > b:
        break

print(count)

Submission status: Wrong Answer

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

print(A // B)

Submission status: Wrong Answer

Solution code:
def solve():
    a, b = read()
    result = think(a, b)
    write(result)


def read():
    return read_int(2)


def read_int(n):
    return list(map(lambda x: int(x), read_line().split(' ')))[:n]


def read_float(n):
    return list(map(lambda x: float(x), read_line().split(' ')))[:n]


def read_line(n=0):
    if n == 0:
        return input().rstrip()
    else:
        return input().rstrip()[:n]


def think(a, b):
    accum = [a + (a - 1) * r for r in range(100)]
    for i in range(len(accum)):
        if accum[i] >= b:
            return i + 1


def write(result):
    print(result)


if __name__ == '__main__':
    solve()

Submission status: Wrong Answer

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

current = 0
counter = 0
for i in range(20):
    if current >= b:
        print(counter)
        break
    if i == 0:
        current += 1
        counter += 1
    else:
        current -= 1
        current += a
        counter += 1

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

result = 0
count = 1
while(True):
    if nums[1] >= 1:
        break
    count -= 1
    count += nums[0]
    result += 1
    if nums[1] <= count:
        break
print(result)

Submission status: Wrong Answer

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

x, y = 1, A
while(y<B):
    x += 1
    y += A - 1
print(x)

Submission status: Wrong Answer

Solution code:
import math
A, B = [int(x) for x in input().split()]
gap = B - A
if gap == 1:
  print(1)
elif gap > 1:
  print(int(math.ceil(B / A)))
else:
  print(0)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

count = 1
a = A
while(A<B):
    A += a
    count += 1
    pass

print(count)

Submission status: Wrong Answer

Solution code:
s = input().split()
a=int(s[0])
b=int(s[1])
if b==1:
        print(0)
else:
        if a==b:
                print(1)
        else:
                print(int(b/a)+1)

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()
if b==1:
    print(0)
    exit()
sm=a
c=1
if sm>b:
    print(1)
    exit()
while sm<=b:
    sm+=a-1
    c+=1
print(c-1)

Submission status: Wrong Answer

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

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

print(n)

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
a,b = map(int, input().split())  
res = 1
while 1:
  if a *res - (res -1 ) < b -1 :
    res = res + 1
    print(a,"個口を",res,"つ使うと未使用は、",a *res - (res -1 ))
  else:
    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:
#coding:utf-8
import math
a, b = map(int, input().split())

if a >= b:
    print(1)
else:
    tap = -(-(b-a)//(a-1)) + 1
    print(tap)

Submission status: Wrong Answer

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

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())
ans = 0
for N in range(21):
    #nokori = (A * N) - ((N - 1) * 1)
    nokori = A * N - 1
    if nokori >= B and ans == 0:
        ans = N
        if A == B:
            ans -= 1

print(ans)

Submission status: Wrong Answer

Solution code:
a,b = map(int, input().split())  
res = 1
while 1:
  if a *res - (res -1 ) < b +1 :
    res = res + 1
    print(a,"個口を",res,"つ使うと未使用は、",a *res - (res -1 ))
  else:
    break
print(res)

Submission status: Wrong Answer

Solution code:
import math

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

ans = 0

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

print(ans)

Submission status: Wrong Answer

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

cnt = 1
temp = a
while True:

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

Submission status: Wrong Answer

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

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

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 = []
# for i in range(30):
while(1):
    count += a
    ans += 1
    if b <= count:
        print(ans)
        exit()
    else:   
        count = count-1
    
    # # 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())
count = 0
default_A = A
while(True):
    count += 1
    if count == 1:
        if A > B:
            count -= 1
            break
    if A < B:
        A = A + default_A -1
        # print(count, A)
    else:
        break
print(count)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
x,y = map(int,input().split())
i=1

if x>=y:
  print(1)
else:
  while(1):
  	i+=1
  	if (i-1)+(i-1)*x==y:
  		print(i)
  		break

Submission status: Wrong Answer

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

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

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

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

Submission status: Wrong Answer

Solution code:
n = list(map(int, input().split(' ')))
sum = n[1]
cnt = 1
for i in range(1,40):
    sum = sum - n[0]
    if sum <= 0 :
        break
    else:
        sum += 1
    cnt += 1
print(cnt)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
a, b = map(int, input().split())
for i in range(a):
  if (4 + 3 * i) >= b:
    ans = i
    break
print(i)

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()
if b==1:
    print(0)
    exit()
sm=a
c=1
while sm<=b:
    sm+=a-1
    c+=1
print(c-1)

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

Solution code:
in_data = input()
 
data = in_data.split(' ')
A = int(data[0])
B = int(data[1])
if B == 1:
  print("0")
else:
  c = (B - 1)// (A - 1) + 1
  print(c)

Submission status: Wrong Answer

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

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

print(x + 1)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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())
x=((B-1)//A+1)
all=A*x
use=x
notuse=all-use
if notuse<B:
    add=(B-notuse-1)//A+1
    print(x+add)
else:
  print(x)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

#if l[0]<2 or l[0]>20 or l[1]<1 or l[1]>20:
#	sys.exit()


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

Submission status: Wrong Answer

Solution code:
A,B=input().split()
tap=0
plug=1
for i in range(int(B)*2):
    plug+=int(A)-1
    tap+=1
    if plug >= int(B):
        break

print(tap)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

c = divmod(b, a)
print(c[0] if c[1]==0 else c[0]+1)

Submission status: Wrong Answer

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

import math
if B < 2:
    print(0)
    exit()
c = 0
while True:
    if B <= A*c-(c-1) and c > 0:
        # print(B, A*c-c)
        print(c)
        break
    elif B <= A*c:
        print(c)
        break
    c += 1

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
import math

s = input().split()
a=int(s[0])
b=int(s[1])
ans=1
count=a
while count<b:
    ans=ans+1
    count=count+a-1
    
print(ans)

Submission status: Wrong Answer

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

ans = int()

if B <= A :
	print(1)

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

Submission status: Wrong Answer

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

while s >= b:
  s = a*num
  num = num +1
print(num)

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

Solution code:
import numpy as np


def main():
	A, B = [int(f) for f in input().split()]

	counter = 0
	c = 0
	while c < B:
		if counter == 0:
			c += A
		else:
			c -= 1
			c += A
		counter += 1
	print(counter)

if __name__ == "__main__":
	main()

Submission status: Wrong Answer

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

s = A
ans = 1
if A >= B:
  """
  None
  """
else:
  while True:
    s += A - 1
    ans += 1
    if s >= B:
      break
print(ans)

Submission status: Wrong Answer

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

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