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:
t=(input().split())

d=int(t[1])
t=int(t[0])
c=d//t
f=c/t
if f!=c:
  c+=1
print(c)

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 and c > 1:
        # print(B, A*c-c)
        print(c)
        break
    elif B <= A*c:
        print(c)
        break
    c += 1

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
        ans += 1
    else:
        ans += 1
        break

print(ans)

Submission status: Wrong Answer

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

for i in range(2,20000):
    if (i-1)*(ab[0]) >= ab[1]:
        print(i-1)
        break

Submission status: Wrong Answer

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

a = int(a)
b = int(b)
count = 1

while True:
  buffer = count -1  
  if a * count - buffer >= b:
    break
  else:
  	count += 1

print(count)

Submission status: Wrong Answer

Solution code:
a, b = (int(i) for i in input().split())
x = 1
y = 0
while(100000):
  if (a - 1) * y + a >= b:
    print(y + 1)
    break
  else:
    y += 1

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

ans = B / A
if ans > B // A:
  ans += 1
if B == 1:
  ans = 0
if B - A == 1:
  ans = 1
print(int(ans))

Submission status: Wrong Answer

Solution code:
cnt = 1

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

print(cnt)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
s=map(int,input().split())
num=0
print(s)

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

Solution code:
a,b = [int(x) for x in input().split()]                                                                  
                                                                                                         
ans = 0                                                                                                  
                                                                                                         
if(b == 1) :                                                                                             
    print("0")                                                                                           
elif(b < a) :                                                                                            
    print("1")                                                                                           
else:                                                                                                    
    b -= a                                                                                               
    a -= 1                                                                                               
    ans += 1                                                                                             
    while b > 0:                                                                                         
        b -= a                                                                                           
        ans += 1                                                                                         
print(ans)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
A, B = map(int, input().split())
ans = 0
for N in range(1, 100):
    nokori = (A * N) - ((N - 1) * 1)

    if nokori >= B and ans == 0:
        ans = N

print(ans)

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

    if A >= B:
        return i

    while port <= B:
        port += i*(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())
 
cnt = 1
temp_A = A
for i in range(15):
    if A >= B :
        break
    else :
        A += temp_A - 1
        cnt +=1

if B == 1:
    cnt = 0

print(cnt)

Submission status: Wrong Answer

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

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

A, B = [int(i) for i in input().split(" ")]
ans = 1
total = A
while True:
  if B <= total:
     break
  ans += 1
  total += A - 1
print(ans)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:

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

r = 1
i = 0
while True:
    if b == 1:
        print(0)
        break
    elif r < b:
        i +=1
        r = (r - 1) + (a * i)

    elif r >= b:
        print(i)
        break

Submission status: Wrong Answer

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

a = int(A)
b = int(B)
i = 1

while True:
  if b == 1:
    i = 0
    break
  
  if a >= b:
    break
    
  i += 1
  a += (a-1)
  
print(i)

Submission status: Wrong Answer

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

b=int(b)
c=b/a;
d=math.ceil(c)
print(d)

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

if __name__ == "__main__":
    main()

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
a, b = [int(x) for x in input().split()]
i    = 1
while a * i - (i - 1) < b:
	i += 1
print(i)

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

Submission status: Wrong Answer

Solution code:
# coding: utf-8

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

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

for i in range(2, 21):
    k = (a-1) * i + 1
    if b <= k:
        print(i)
        exit()

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
import math

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

ans = 0

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

print(ans)

Submission status: Wrong Answer

Solution code:
a, b = (int(i) for i in input().split())
x = 1
y = 0
while(100):
  if (a - 1) * y + a >= b:
    print(y + 1)
    break
  else:
    y += 1

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

Solution code:
x,y = map(int,input().split())
if x<y:
  print((y//x)+1)
elif x==y:
  print(1)
else:
  print(0)

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

a = int(a)
b = int(b)
count = 0

while True:
  buffer = count -1 if count > 1 else 0  
  if a * count - buffer > b:
    break
  else:
  	count += 1

print(count)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
import math

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

ans = 0

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

print(ans)

Submission status: Wrong Answer

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

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(str(n+1))

Submission status: Wrong Answer

Solution code:
a, b = map(int, input().split())
ans = a
count = 1
if a == b :
  count = 1
elif a > b :
  count = 0
else :
  while True :
    count += 1
    ans += (a-1)
    if b <= ans:
      break
  
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)

if a >= b :
    count = 1
elif q<=1:
    count = math.floor(r)
elif q > 1:
    count = math.floor(r) + 1
print(count
     )

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

while B>A:
    c+=1
    A+=A-1

print(c)

Submission status: Wrong Answer

Solution code:
A, B = map(int, input().split())
 
cnt = 1
for i in range(15):
    if A >= B :
        break
    else :
        A += A
        cnt +=1

if B == 1:
    cnt = 0

print(cnt)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

ans = 0
x = 0
count = 0

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

Submission status: Wrong Answer

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

count = A
ans = 1

while True:
    b = A * ans - (ans - 1)
    if b >= B:
        print(ans)
        exit()
    ans += 1

Submission status: Wrong Answer

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

print(tap)

Submission status: Wrong Answer

Solution code:
import math
def A():
    a = input()
    b = input()
    ans = 0
    for i in range(3):
        if a[i] == b[i]:
            ans += 1
    print(ans)

def B():
    temp = [int(i) for i in input().split()]
    a = int(temp[0])
    b = int(temp[1])
    ans = 1
    t = a
    while (t<b):
        ans += 1
        t += (a-1)
    print(ans)

def C():
    n = int(input())
    nums = [int(i) for i in input().split()]
    start_index = 0
    end_index = 1
    max_len = 0
    le = 0
    while (end_index < len(nums)):
        if nums[end_index] <= nums[end_index-1]:
            le += 1
        else:
            max_len = max(le, max_len)
            start_index = end_index
            le = 0
        end_index += 1
    max_len = max(le, max_len)
    print(max_len)

B()

Submission status: Wrong Answer

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

a = int(a)
b = int(b)
count = 0

while True:
  buffer = count -1 if count > 1 else 0  
  if a * count - buffer >= b:
    break
  else:
  	count += 1

print(count)

Submission status: Wrong Answer

Solution code:

import sys
input = sys.stdin.readline
sys.setrecursionlimit(10**6)
##############################

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

if -(-B//A) == 1:
    print(1)
    exit()

B -= A-1
count = 1
x = B-1
count += -(-x//(A-1))
print(count)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

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(int(B/A)+1)

Submission status: Wrong Answer

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

nouse = 0
count = 0

while(True):
    count += 1
    nouse += A
    if nouse < B:
        nouse -= 1
    else:
        break

print(count)

Submission status: Wrong Answer

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

if b == 1:
    print(0)

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

Submission status: Wrong Answer

Solution code:
#B
import math
a,  b = map(int, input().split())
count = 0
r= b/(a-1)
q = b%(a-1)

if a > b :
    count = 1
elif q<=1:
    count = math.floor(r)
elif q > 1:
    count = math.floor(r) + 1
print(count
     )

Submission status: Wrong Answer

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

space = 0
ans = 0
cnt = 0

while(True):
  if cnt == 0:
    space += a
  else:
    space += a-1
  ans += 1
  if (space >= b):
    break

print(ans)

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:
x,y = map(int,input().split())
if x<y:
  print(y//x+1)
elif x==y:
  print(1)
else:
  print(0)

Submission status: Wrong Answer

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

ans = 0
x = 0
count = 0

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
s,t=map(int,input().split())
kuti=s
kosuu=1

while kuti*kosuu<t:
    kuti=kuti+s-1
    kosuu=kosuu+1

print(kosuu)

Submission status: Wrong Answer

Solution code:
import math
A,B=(int(x) for x in input().split())
k=(B-1)/(A-1)
math.ceil(k)

Submission status: Wrong Answer

Solution code:
import math
lines = input().split(" ")
 
A = int(lines[0])
B = int(lines[1])
C = A - 1
result = 0

if B == 1 or B == 2:
    print(1)
elif A == 20:
    print(1)
elif A >= B:
    print(1)
else:
    result += A
    count = 1
    while result < B:
        result += C
        count += 1
    print(count)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

if B == 1:
    cnt = 0

print(cnt)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

a = int(A)
b = int(B)
i = 1

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

Submission status: Wrong Answer

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

if A >= B:
    ans = 1
else:
    ans = 1

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:


import sys
input = sys.stdin.readline
sys.setrecursionlimit(10**6)
##############################

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

if -(-B//A) == 1:
    print(1)
    exit()

x = B-1
print(-(-x//(A-1)))

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

while tap <= B:
    tap += tap ** i
    i += 1

print(i)

Submission status: Wrong Answer

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

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

if B - int(B/(A-1))*(A-1) > 1:
	ans = int(B/(A-1))+1
	print(ans)
	sys.exit()
else:
	print(int(B/(A-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)+1)
else:
  print(math.ceil(C))

Submission status: Wrong Answer

Solution code:
l = 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 l[0] < l[1]:
	l[1] = l[1] - l[0]
	a += 1
print(a)

Submission status: Wrong Answer

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

cnt = 0
tmp = 0
if B < 2:
    print(cnt)
    exit()
while True:
    tmp += A
    cnt += 1
    if tmp >= B:
        break
print(cnt)

Submission status: Wrong Answer

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

ans = int()

if B <= A :
	print(1)

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
s,t=map(int,input().split())
kuti=s
kosuu=1

if s>t:
    kosuu=kosuu+1

while kuti*kosuu<=t:
    kuti=kuti+s-1
    kosuu=kosuu+1

print(kosuu+1)

Submission status: Wrong Answer

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

if A >= B:
    ans = 1
else:
    ans = 1

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

Submission status: Wrong Answer

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

if b == 0:
    print(0)
elif 0 < b <= a:
    print(1)
elif b > a :
    print(1 - ( -(b-a)//(a-1) ))

Submission status: Wrong Answer

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

print(tap)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

nouse = 0
count = 0

while(True):
    count += 1
    nouse += (A-1)
    if nouse+1 >= B:
        break
    
print(count)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
l = list(map(int, input().split()))
     
if l[0]<2 or l[0]>20 or l[1]<1 or l[1]>20:
	sys.exit()
     
a = 0
while l[0] <= l[1]:
	l[1] = l[1] - l[0]
	a += 1
print(a)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

	print(i)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

cnt = 0
tap = 0
if a >= b:
    cnt = 1
else:
    while tap < b:
        if cnt == 0:
            tap += a
        else:
            tap -= 1
            tap += a
        cnt += 1
print(cnt)

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

Solution code:
cnt = 0

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

print(cnt + 1)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

ans = int()

if B <= A :
	print(1)

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

Submission status: Wrong Answer

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

while s > b:
  s = a * num
  num = num + 1

print(num)

Submission status: Wrong Answer

Solution code:

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

r = 1
i = 0
while True:
    if b == 1:
        print(0)
        break
    elif r < b:
        i +=1
        r = (r - i) + (a * i)

    elif r >= b:
        print(i)
        break

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

print(ans)

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

Solution code:
l = 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 l[0] < l[1]:
	l[1] = l[1] - l[0]
	a += 1
print(a)

Submission status: Wrong Answer

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

ans = 1

if b > a:
  total = a
  while(True):
    total += (a - 1)
    ans += 1
    if b <= total:
      break

print(ans)

Submission status: Wrong Answer

Solution code:
A, B = map(int, input().split())
flag = 1
ana = 0
a = [1]*A
for i in range(100):
    if sum(a) >= B:
        print(flag)
        break
    a.append(A)
    a[i] -= 1
    flag += 1

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

ans = 0
x = 0

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

Submission status: Wrong Answer

Solution code:
A, B = map(int, input().split())
if B == 1:
    print(0)
else:
    q, mod = divmod(B, A-1)
    if mod <= 1:
        print(q)
    else:
        print(q+1)

Submission status: Wrong Answer

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

cnt = 0
  
for i in range(1,A+1):
  if ((A-1)+A)*i <= B+(A-1):
    cnt += 1
    
print(cnt)

Submission status: Wrong Answer

Solution code:
in_data = input()

data = in_data.split(' ')
A = int(data[0])
B = int(data[1])
c = (B - 1) // A + 1
 
print(c)

Submission status: Wrong Answer

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

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

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

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

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

print(taps)