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:
import sys
import math
from fractions import gcd
# import queue
# from collections import Counter
# from itertools import accumulate
# from functools import reduce

def lcm(a, b):
    return a * b // gcd(a, b)

def combination_count(n, r):
    return math.factorial(n) // (math.factorial(n - r) * math.factorial(r))

def permutations_count(n, r):
    return math.factorial(n) // math.factorial(n - r)

big_prime = 1000000007

"""
# 標準入力取得
## 文字列
 =  sys.stdin.readline().rstrip()
 =  list(sys.stdin.readline().rstrip())

## 数値
 =  int(sys.stdin.readline())
 =  map(int, sys.stdin.readline().split())
 =  list(map(int, sys.stdin.readline().split()))
 =  [list(map(int,list(sys.stdin.readline().split()))) for i in range(N)]
"""

list_tap =  list(map(int, sys.stdin.readline().split()))

A = list_tap[0]
B = list_tap[1]

cnt = 1
cnt2 = 0

for i in range (20):
    cnt = cnt + A - 1
    cnt2 += 1
    if(cnt >= B):
        break

print(cnt2)

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:
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(i)
        sys.exit()

Submission status: Wrong Answer

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

print(ans)

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

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

Submission status: Wrong Answer

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

ans = 0

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

Submission status: Wrong Answer

Solution code:
import math

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

if a!=1:
  num = math.ceil((b/(a-1) -1))
else:
  num = 0

print(num)

Submission status: Wrong Answer

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

if b <= a:
    print(1)
else:
    c = b - a
    d = a - 1
    if c % d == 0:
        print((c // d) + 1)
    else:
        print((c // d) + 2)

Submission status: Wrong Answer

Solution code:
while True:
    try:
        A, B = map(int, input().split())
        if A >= B:
            print(1)
        else:
            A -= 1
            B -= 1
            print(-(-B//A))
    except EOFError:
        break

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

count=0
C=1
for i in range(20):
    C=C*A
    count+=1
    if B-C <= 0:
        break
print(count)

Submission status: Wrong Answer

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

def main():
    a,b=map(int, input().split())  #複数数値入力　「A B」みたいなスペース空いた入力のとき
    ans = 1
    if b == 1:
        print(0)
    else:
        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 = map(int, input().split())
result = (B // (A-1)) + 1
if B % A == 0:
    result -= 1
if B == 1:
    result = 0

print (result)

Submission status: Wrong Answer

Solution code:
A, B = map(int, input().split())
for i in range(11):
  if A*i >= B:
    print(i)
    break

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
import sys
stdin = sys.stdin
sys.setrecursionlimit(10**9)
 
ni = lambda: int(ns())
na = lambda: list(map(int, stdin.readline().split()))
nn = lambda: list(stdin.readline().split())
ns = lambda: stdin.readline().rstrip()

a,b = na()

import math

print(math.floor((b-1)//a+0.9999999999999))

Submission status: Wrong Answer

Solution code:
import math

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

ans = math.floor((b - 1) / (a - 1))
print(ans)

Submission status: Wrong Answer

Solution code:
import sys
stdin = sys.stdin
sys.setrecursionlimit(100001)
mod = 10**9 + 7

ns = lambda: stdin.readline().rstrip()
ni = lambda: int(ns())
na = lambda: list(map(int, stdin.readline().split()))
sa = lambda h: [list(map(int, stdin.readline().split())) for i in range(h)]

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

while b > a:
    ans +=1
    b -= (a-1)

print(ans)

Submission status: Wrong Answer

Solution code:
def solve():
    A,B = map(int, input().split())
    num = 1
    tap = A 
    while tap < B:
        num += 1
        tap += (A-1)
    print(num)
    
solve()

Submission status: Wrong Answer

Solution code:
def acinput():
    return list(map(int, input().split(" ")))

a,b=acinput()

dp={}
dp[1]=a
res=1
for i in range(2,100):
    dp[i]=dp[i-1]+a-1

for i in range(1,100):
    if dp[i]>=b:
        res=i
        break
print(res)

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

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

    cnt = 0
    while B > 0:
        cnt += 1
        if B == A:
            B -= A
        else:
            B -= (A-1)
    print(cnt)
        

main()

Submission status: Wrong Answer

Solution code:
import math

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

print(math.ceil((B - A) / A) + 1)

Submission status: Wrong Answer

Solution code:
n1 = list(map(int, input().split()))
n2 = n1[1]//(n1[0] - 1)
n3 = n1[1]%(n1[0] - 1)
if n2 >= n3:
    a1 = 1
elif n3 < 2:
    a1 = n2
else:
    a1 = n2 + 1
print(a1)

Submission status: Wrong Answer

Solution code:

a,b = [int(i) for i in input().split()]
counter = 1
current = a
while current < b:
    counter += 1
    if current + a == b:
        current += a
    else:
        current += a - 1
print(counter)

Submission status: Wrong Answer

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

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

print(n)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

import math

print(math.ceil(B/A))

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

print(i+k)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
import math

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

ans = 0

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

print(ans)

Submission status: Wrong Answer

Solution code:
import sys

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

for _ in range(1,100):
    if( (A-1)*(_-1)+A > B):
        print(_)
        break

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

cnt = 0
if A > B :
  cnt = 1
else:
  cnt = 1
  while(A + (cnt-1)*(A-1) < B):
    cnt += 1
    
print(cnt)

Submission status: Wrong Answer

Solution code:
n,m=input().split()
n=int(n)
m=int(m)
cnt=0
if m==n:
    print(1)
else:
    while n<=m:
        cnt+=1
        n=n+n-1
    print(cnt+1)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

print(ans)

Submission status: Wrong Answer

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

checker = True

if a >= b:
    print("1")
    checker = False

counter = 1
tmp = a

while checker:
    tmp += a-1
    if tmp >= b:
        checker = False
        counter += 1
        print(counter)
    else:
        counter += 1

Submission status: Wrong Answer

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

print(B % A + 1)

Submission status: Wrong Answer

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

a,b = map(int, input().split())
c = b - a
ans = 1
while c > 0:
    c = c - (a - 1)
    ans += 1
print(ans)

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*2 - 1
        cnt +=1

if B == 1:
    cnt = 0

print(cnt)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

import numpy as np
print(int(np.ceil((B+1)/(A+1))))

Submission status: Wrong Answer

Solution code:
cnt = 0

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

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

Submission status: Wrong Answer

Solution code:
# -*- coding: utf-8 -*-
def is_integer(n):
    if isinstance(n, int):
        return True
    if isinstance(n, float):
        return n.is_integer()
    return False

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

div = b/float(a)

if is_integer(div):
  print int(div)
else:
  print int(div) + 1

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

Solution code:
a = [int(i) for i in input().split()]
ans=0
for i in range(100):
    if (a[0]-1)*i+a[0] >= a[1]:
        ans = i+1
        break
print(ans)

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

Solution code:
a, b = (int(i) for i in input().split())
x = (b - a) % (a - 1)
if ((b - a) % (a - 1)) == 0:
    print(x + 1)

Submission status: Wrong Answer

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

i = 0
s = 0
while s < n:
    i += 1
    s = a * i - (i - 1)

print(i)

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

Cnt = 1
Flag = 0
while Flag == 0:
  B -= A
  Cnt += 1
  if B > 0:
    continue
  else:
    Flag = 1
    break


print(Cnt)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
from sys import stdin

a,b = list(map(int,stdin.readline().rstrip().split()))

i = 1

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

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

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, 10000):
    if i == 1:
        sum = A
    else:
        sum = A*i-(i-1)
    if sum >= B:
        print(i)
        break

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

c = b // (a-1)

if b % (a-1) == 1:
  print(c)
else:
  print(c+1)

Submission status: Wrong Answer

Solution code:
A , B = map(int,input().split())
if A == B:
        print(1)
        exit()
cnt = 0
result = 0
while True:
        cnt += 1
        result += A
        if result > B:
                break
new_result = A * cnt - ((1) * (cnt-1))
if new_result < B:
        print(cnt+1)
else:
        print(cnt)

Submission status: Wrong Answer

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

if a >= b:
    print(1)
elif (b//a+1)*a-2 >= b:
    print(b//a+1)
else:
    print(b//1+2)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

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)
    d=c*a
    if d<b:
        c=c+1
print(c)

Submission status: Wrong Answer

Solution code:
import math
a,b = map(int, input().split())
check = b
ans = 0
while check >= a:
    check = math.ceil(check/a)
    ans += check


print (ans)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
A, B = map(int, input().split())
for i in range(1, 11):
  if A*i >= B:
    print(i)
    break

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
ipt = input().split()
A=int(ipt[0])
B=int(ipt[1])
rt = A
ct = 1
while rt < B:
  rt += A - 1
  ct += 1
print(ct)

Submission status: Wrong Answer

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

n=1

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

print(n)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

if B==1:
    print(0)

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

Submission status: Wrong Answer

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

if B != 0:
  ans = 1
  num = A
  while num < B:
    ans += 1
    num = num + A -1
if B == 0:
  ans = 0

print(ans)

Submission status: Wrong Answer

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

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:
A, B = map(int, input().split())
C = B-A
D = C // (A-1)
print(D+1)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
import sys
import math

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

Submission status: Wrong Answer

Solution code:
n,m=list(map(int,input().split()))
i=1
j=0
while True:
    if i*n-j+1>=m:
        print(i)
        break
    j+=1
    i+=1

Submission status: Wrong Answer

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

print(i+k)

Submission status: Wrong Answer

Solution code:
s=list(map(int,input().split()))
a=0
while s[1]>0:
  a=a+1
  s[1]=s[1]-s[0]
print(a)

Submission status: Wrong Answer

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

ans = 1
if(B==1):
    print("0")
else:
    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 = map(int,input().split())

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

Submission status: Wrong Answer

Solution code:
import numpy as np

a,b = input().split()
a = int(a)
b = int(b)
num_plug = a
num_tap = int(0)

while 1:
  num_tap += 1
  if num_plug >= b:
    print(num_tap)
    exit()
  num_plug += (a-1)

Submission status: Wrong Answer

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

cnt = 1
s = a

while True:
    if b <= s:
        print(cnt)
        break
    s -= 1
    s += a
    cnt += 1

Submission status: Wrong Answer

Solution code:
a, b = map(int, input().split())
ans = 1
while True:
    if b <= ans * a - (ans - 1):
        break
    ans += 1
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(A):
    if sum(a) >= B:
        print(flag)
        break
    a[i] = A
    flag += 1

Submission status: Wrong Answer

Solution code:
def main():

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

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


if __name__ == '__main__':
    main()

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

print(ans)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
a,b = map(int,input().split(" "))
x = 1
i = 0
while x <=  b:
    if a == b:
        i = 1
        break;
        
    i += 1    
    x = i*a-1


print(i)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
import math

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

Submission status: Wrong Answer

Solution code:
a, b = list(map(int, input().split()))
tap = 1
free = a * tap

while free < b:
    free += a - 1
    tap += 1

print(tap)

Submission status: Wrong Answer

Solution code:
get = list(map(int, input().split()))
A = get[0]
B = get[1]
ans = 0
i = 1
while True:
    if A * i - (i - 1) >= B:
        print(i)
        break
    else:
        i += 1

Submission status: Wrong Answer

Solution code:
a = input ()

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

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

Submission status: Wrong Answer

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

print (result)

Submission status: Wrong Answer

Solution code:
import sys
stdin = sys.stdin
sys.setrecursionlimit(10**9)
 
ni = lambda: int(ns())
na = lambda: list(map(int, stdin.readline().split()))
nn = lambda: list(stdin.readline().split())
ns = lambda: stdin.readline().rstrip()

a,b = na()

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

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, 10000):
    if i == 1:
        sum = A
    else:
        sum = A*i-(i-1)

Submission status: Wrong Answer

Solution code:
n,m=list(map(int,input().split()))
i=1
j=0
while True:
    if i*n-j-1>=m:
        print(i)
        break
    j+=1
    i+=1

Submission status: Wrong Answer

Solution code:
A, B = (int(i) for i in input().split())
if B<=A:
	print(1)
elif (B%(A-1))==1:
	print(B//(A-1))
else:
	print(B//(A-1)+1)

Submission status: Wrong Answer

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

count = 0
plug = 1

if plug >= b:
	print(count)

count = 1
aa = b // (a-1)
bb = b % (a)

if aa==1 and bb >= 1:
	aa = aa + 1

print(aa)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

ans = 1
tmp = a

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

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

Submission status: Wrong Answer

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


def main():
    a, b = map(int, input().split())
    count = 0
    sum = a
    count += 1
    if sum >= b:
        print(1)
        return

    while sum < b:
        sum = sum + (a - 1)
        count += 1
    print(count)


if __name__ == "__main__":
    main()

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

Solution code:
from sys import stdin

a,b = list(map(int,stdin.readline().rstrip().split()))

i = 1

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

Submission status: Wrong Answer

Solution code:
A, B = list(map(int, input().split()))
ans = B//(A-1)
if B%A == 1:
    ans -= 1

print(ans)

Submission status: Wrong Answer

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

checker = True

if a == b:
    print("1")
    checker = False

counter = 1
tmp = a

while checker:
    tmp += a-1
    if tmp >= b:
        checker = False
        counter += 1
        print(counter)
    else:
        counter += 1

Submission status: Wrong Answer

Solution code:
A, B = map(int, input().split())
count = 1
num = A
while (num < B):
    count += 1
    num = A * count

print(count)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

count = A
ans = 1

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

print(ans)

Submission status: Wrong Answer

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

cnt = 0
if A > B :
  cnt = 1
else:
  while(A + (cnt-1)*(A-1) <= B):
    cnt += 1
    
print(cnt)

Submission status: Wrong Answer

Solution code:
list1=input().split(" ")
a=1
b=0
while True:
	b+=1
	a+=int(list1[0])-1
	if a>=int(list1[1]):
		break
print(b)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
# 1つだけaであとはa-1個
a, b = map(int, input().split())
if b <= a:
    print(1)
else:
    cur = a
    c = 1
    while cur < b:
        c += 1
        cur += a - 1
    print(c)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

i=1
while True:

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

tmp = a
c = 1

for i in range(1,100):
  tmp += a-1
  c += 1
  if tmp >= b:
    break
    
print(c)