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:
#!/usr/bin/env python3
#ABC139 B

import sys
import math
import bisect
sys.setrecursionlimit(1000000000)
from heapq import heappush, heappop,heappushpop
from collections import defaultdict
from itertools import accumulate
from collections import Counter
from collections import deque
from operator import itemgetter
from itertools import permutations
mod = 10**9 + 7
inf = float('inf')
def I(): return int(sys.stdin.readline())
def LI(): return list(map(int,sys.stdin.readline().split()))

a,b = LI()
ans = math.ceil(b/a)
print(ans)

Submission status: Wrong Answer

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

def main():
    a,b=map(int, input().split())  #複数数値入力　「A B」みたいなスペース空いた入力のとき
    ans = 1
    while(True):
        if a < b:
            b = b - a
            ans += 1
        else:
            print(ans)
            break     

if __name__ == '__main__':
    main()

Submission status: Wrong Answer

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

result = -(-B// A)
if A != B and B%A == 0:
  result+=1

print(result)

Submission status: Wrong Answer

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

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

print(c)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
# -*- coding: utf-8 -*-
A, B = map(int,input().split())

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

print(ans)

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

ans = 0
for i in range(1, 2 ** B):
  tmp = A * i - i + 1
  if tmp >= B:
    ans = i
    break
print(ans)

Submission status: Wrong Answer

Solution code:
import sys
A, B = map(int, input().split())
ans = A
count = 1
if ans >= B:
    print(count)
    sys.exit()

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

Submission status: Wrong Answer

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


if __name__ == "__main__":
    main()

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

ans = 1
while(True):
    port = (A-1) * (ans-1) + A
    if(port >= B):
        break
    else:
        ans += 1

print(ans)

Submission status: Wrong Answer

Solution code:
a, b = (int(_) for _ in input().split())
total = a
ans = 1
if b == 1:
    print(0)
else:
    while total < b - 1:
        total += a - 1
        ans += 1
        
print(ans)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

print(ans)

Submission status: Wrong Answer

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

ans = 1

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
kuchi, needed_kuchi_num= map(int,input().split())

# 電源タップの初期値は1
socket_num = 1

con_flg = 1
available_kuchi = 0
while con_flg == 1:
    available_kuchi_num = (socket_num - 1)*kuchi + kuchi
    if needed_kuchi_num <= available_kuchi_num:
        con_flg = 0
    else:
        socket_num += 1

print(socket_num)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

while num >= B:
    cnt = cnt + 1
    num = num + A - 1

print(cnt)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

print(-(-b//a))

Submission status: Wrong Answer

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

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

print(c)

Submission status: Wrong Answer

Solution code:
import sys
def main():
    input = sys.stdin.readline
    AB = list(map(int, input().split()))
    A = AB[0]
    B = AB[1]

    ans = 0
    cnt = 1
    while cnt < B:
        ans += 1
        cnt = A * ans - 1
        #print(ans)
        #print(cnt)
    print(ans)
if __name__ == '__main__':
    main()

Submission status: Wrong Answer

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

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

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

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

print(ans)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
import math
n, m = map(int, input().split())
print(math.ceil(m / n))

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
import math

nums = list(map(int,input().split()))

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

Submission status: Wrong Answer

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

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 = [int(i) for i in input().split()]
rest = B % (A - 1)
if rest <= 1:
    print(int(B / (A - 1)))
else:
    print(int(B / (A - 1) + 1))

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
# B - Power Socket
inputNum = list(map(int, input().split()))
A = inputNum[0]
B = inputNum[1]

if B != 1:
    # 切り上げ
    result = -(-B // A)
else:
    # 1なら増やす必要がない
    result = 0

print(result)

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

import math

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

power = 1
count = 0

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

Submission status: Wrong Answer

Solution code:
A,B = map(int,input().split())
import math
#n = math.ceil(B/A)
n=0
if B<=A :
    print(1)
else:
    n=A
    counter =1
    while n <B:
        n+=(A-1)
        counter +=1
    print(counter)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

Solution code:
import math

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

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

Solution code:
import math

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
a,b=map(int,input().split())
if b==1:
  print(0)
if 1<b<=a:
  print(1)
if a<b<=a**2:
  print(2)
if a**2<b<=a**3:
  print(3)
if a**3<b<=a**4:
  print(4)
if a**4<b<=a**5:
  print(5)

Submission status: Wrong Answer

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

sum = A
cnt = 1
flg = True

while flg:
  if sum >= B:
    break
  sum += A -1
  cnt += 1

print(cnt)

Submission status: Wrong Answer

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

ans=1
c=a
z=0
if a>b:
    print(0)
else:
    while z==0:
        if c>=b:
            print(ans)
            z=1
        else:
            ans+=1
            c+=a-1

Submission status: Wrong Answer

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

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

print(int(c))

Submission status: Wrong Answer

Solution code:
while True:
    try:
        A, B = map(int, input().split())
        
        strip = 1
        socket = A
        while (socket < B):
            strip += 1
            socket += (A-1)
            
        print(strip)
    
    except:
        break

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

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

count = 1
remain = B - A
while True:
    if remain <= 0:
        print(count)
        break
    count += 1
    remain -= A

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
# coding: utf-8

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

no_used = A

res = 1
while True:
    if no_used >= B:
        break
    else:
        res += 1
        no_used += A-1

print(res)

Submission status: Wrong Answer

Solution code:
from math import ceil

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

ans = int(ceil(b / a))

print(ans)

Submission status: Wrong Answer

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

import math
 
print(math.ceil(b/a))

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

print(c%b+1)

Submission status: Wrong Answer

Solution code:
#!/usr/bin/env python
# -*- coding: utf-8 -*-

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

if B<=A:
	print 1
	quit()

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

Submission status: Wrong Answer

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

tap = int(a[0])
last = int(a[1])

start = tap
num = 1

while tap < last:
    tap += start - 1
    num += 1
    
print(num)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

ans = 1 
S = B-A
N = S // A
ans = 1 + N

if S % A != 0:
    ans += 1

print(ans)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
a,b = [int(s) for s in input().split()]
p = 0
count = 1
if b == 1:
  print(p)
while True:
  p += 1
  count += a - 1
  if count >= b:
    print(p)
    break

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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


if(a <= b):
    ans = math.ceil(b/a)
else:
    ans = 0
print(ans)

Submission status: Wrong Answer

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

c=b//(a-1)

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:

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

ans = B / A
if B % A == 0:
    pass
else:
    ans += 1

print(int(ans))

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
import sys
a, b = map(int, input().split())
num = 0
if b == 1:
  print(0)
  sys.exit()
while (a * num) < b:
  num += 1
print(num)

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

Solution code:
import sys

input_str = input().split(" ")
A = int(input_str[0])
B = int(input_str[1])
rem = B%A
ans = int(B/A)
if rem!=0:
    ans += 1
if B==1:
  ans = 0
print(ans)

Submission status: Wrong Answer

Solution code:
socket_on_tap, target = map(int, input().split(' '))

print((target - 1) // (socket_on_tap - 1))
exit(0)

Submission status: Wrong Answer

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

taps, anum = a, 1
while taps < b:
  anum += 1
  taps = taps - 1 + a

print(anum)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

cnt = 1
x = A

while x < B:
    x += A - 1
    cnt += 1

print(cnt)

Submission status: Wrong Answer

Solution code:
a, b = [int(i) for i in input().split()]
 
nums = a-1
ans = 0
while(True):
  if b <= a:
    ans += 1
    break
  else:
    ans += 1
    a += nums
print(ans)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
def main():
	A, B = [int(x) for x in input().split()]
	
	print(int(B / A) + min(B%A, 1))
	
if __name__ == "__main__":
	main()

Submission status: Wrong Answer

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

if n[1]%n[0]>0:
    print(int(n[1]/n[0])+1)
else:
    print(int(n[1]/n[0]))

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
# coding: utf-8

a,b=map(int, input().split())
c = 1
while a < b:
    t = (a-1) * c + a
    c += 1
    if t >= b: break
    
print(c)

Submission status: Wrong Answer

Solution code:
import math

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

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

Submission status: Wrong Answer

Solution code:
# coding: utf-8

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

result = 0
for i in range(1, 20):
    if (B <= A * i - (i - 1)):
        result = i
        break

print(result)

Submission status: Wrong Answer

Solution code:
# -*- coding:utf8 -*-

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

Submission status: Wrong Answer

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

ans = b//a
waru = b % a
if waru > 0:
    ans += 1
print(ans)

Submission status: Wrong Answer

Solution code:
import sys
def input(): return sys.stdin.readline().strip()
def INT(): return int(input())
def MAP(): return map(int, input().split())
def LIST(): return list(map(int, input().split()))

counter = 0
N = 1
A,B = MAP()

while True:
    N -= 1
    N+= A
    counter+=1
    if N >= B:
        break

print(counter)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

print(math.ceil(b/a))

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

Solution code:
from sys import stdin,stdout
I = lambda : map(int,stdin.readline().split())
import math

a,b = I()
x = math.ceil((b-1)/(a-1))
print int(x)

Submission status: Wrong Answer

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

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

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

print(ans)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
#インポート
import sys

#入力用
def ILI(): return list(map(int, sys.stdin.readline().rstrip().split()))
def ISI(): return map(int, sys.stdin.readline().rstrip().split())
def II(): return int(sys.stdin.readline().rstrip())
def ISS(): return sys.stdin.readline().rstrip().split()
def IS(): return sys.stdin.readline().rstrip()

A, B = ISI()
for i in range(1, 101):
    if A * i >= B:
        print(i)
        break

Submission status: Wrong Answer

Solution code:
a, b = [int(x) for x in input().split()]
print(1 + max(0, b - 2) // (a - 1))

Submission status: Wrong Answer

Solution code:
A,B = map(int,input().split())
tmp = ans = 0
for i in range(100000):
    if tmp>=B:
        break
    if i==0:
        ans += 1
        tmp += A
    elif i!=0:
        ans += 1
        tmp += A-1
print(ans)

Submission status: Wrong Answer

Solution code:
import math
A, B = [int(i) for i in input().split()]
print(math.ceil(B/A))

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
#import pysnooper
#import os,re,sys,operator,math,heapq,string
#from collections import Counter,deque
#from operator import itemgetter
#from itertools import accumulate,combinations,groupby,combinations_with_replacement
from sys import stdin,setrecursionlimit
#from copy import deepcopy

setrecursionlimit(10**6)
input=stdin.readline

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

Submission status: Wrong Answer

Solution code:
a,b = [int(i) for i in input().split()]
ct = 1
asum = a
while True:
    if asum<b:
        asum = asum+a-1
        ct+=1
    else:
        break

print(ct)

Submission status: Wrong Answer

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

num_plugs = A;
for i in range(1, 25):
    if num_plugs < B:
        num_plugs += A-1
    else:
        print(i)
        break

Submission status: Wrong Answer

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

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

print(ans)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
A, B = map(int, input().split())
tmp = A
ans = 1
while True:
    if A < B:
        A = A - 1 + tmp
        ans += 1
    else:
        break

print(ans)

Submission status: Wrong Answer

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

if B ==1:
  print("0")
else:
  print(-(-B//A))

Submission status: Wrong Answer

Solution code:
#coding:utf-8

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

cnt = 0

B -= A
cnt += 1


while B > 0:
    cnt += 1
    B -= A-1


print(cnt)

Submission status: Wrong Answer

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

if a >= b:
    print(1)
    exit()
    
x = 2 * a - 1

for i in range(2, a + 1):
    if x >= b:
        print(i)
        exit()
    x = x + a - 1

Submission status: Wrong Answer

Solution code:
A,B = list(map(int,input().split()))
c = 1
while(B - A > 0):
  A += A - 1
  c += 1
  
print(c)

Submission status: Wrong Answer

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

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

    if b <= 0:
        break
    
print(c)

Submission status: Wrong Answer

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

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

print(ans)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
import sys

input = sys.stdin.readline


def main():
    a, b = map(int, input().split())
    x, y = divmod(b, a)
    print(x + bool(y))


if __name__ == "__main__":
    main()

Submission status: Wrong Answer

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

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

print(ans)

Submission status: Wrong Answer

Solution code:
A, B = map(int, input().split())
cnt = A
ans = 1
while True:
    if B <= cnt:
        print(ans)
        exit()
    cnt = A + cnt -1
    ans += 1

Submission status: Wrong Answer

Solution code:
import sys
input = sys.stdin.readline
sys.setrecursionlimit(10 ** 7)

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

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

print(ans)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
A,B= map(int,input().split())
C =0
k = 0
A = A-1
while C <= B:
  if k == 0:
    C += A+1
  else:
    C += A
  k += 1

print(k)

Submission status: Wrong Answer

Solution code:
# -*- coding: utf-8 -*-
# 整数の入力


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


if __name__ == "__main__":
    main()

Submission status: Wrong Answer

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

if __name__ == "__main__":
    f_b()

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 = (int(_) for _ in input().split())
total = a
ans = 1
if b == 1:
    print(0)
else:
    while total < b:
        total += a - 1
        ans += 1
        
print(ans)

Submission status: Wrong Answer

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

count = 1
ans = 0

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
def MAP(): return map(int,input().split())

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

Submission status: Wrong Answer

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

if N[1]==1:
    print(0)
else:
    start=1
    i=1
    while start -1 + N[0]*i < N[1]:
        i+=1
    print(i)

Submission status: Wrong Answer

Solution code:
# -*- coding: utf-8 -*-
y1,y2 = map(int,input().split())
if y2 % y1 == 0:
  amari = 0
else:
  amari = 1
ans = y2 // y1 + amari
print(ans)

Submission status: Wrong Answer

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

if b==0:
    ans=0
elif b<=a:
    ans=1
else:
    i =0
    check=0
    while check<b:
        check +=a-i
        i+=1
    ans=i
print(ans)

Submission status: Wrong Answer

Solution code:
n,m=input().split()
n=int(n)
m=int(m)
if m==n:
    print(1)
else:
    print((m//n)+1)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

Solution code:
#%%
def ceil(x, y):
    if x%y == 0:
        return x//y
    else:
        return x//y + 1

a, b = map(int, input().split())
if b <= a:
    ans = 1
else:
    ans = 0
    b -= a
    ans += 1
    ans += ceil(b,a-1)

if b == 1:
    ans = 0

print(ans)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

total = 1
B -= A

while B > 0:
    B -= A - 1
    total += 1
print(total)

Submission status: Wrong Answer

Solution code:
import math

A, B = map(int, input().split())
temp = math.floor(math.log(B, A))
ans = temp + (B - A**temp + A - 1) // A
print(ans)

Submission status: Wrong Answer

Solution code:
import sys
input = sys.stdin.readline

def main():
    # a = int(input())
    a, b = map(int, input().split())
    # a = list(map(int, input().split()))
    
    if b == 1:
        print(1)
    else:
        tmp = (b-a)/(a-1)
        if tmp - int(tmp) > 0:
            print(1 + int(tmp) + 1)
        else:
            print(1 + int(tmp))
        # print(1 + (b-a)//(a-1))


if __name__ == "__main__":
    main()

Submission status: Wrong Answer

Solution code:
import sys

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

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

B -= A

A -= 1

N = B // A
N += 1
N2 = B % A

if N2 > 0:
  N += 1

print(N)