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

A, B = list(map(int, sys.stdin.readline().split(' ')))

C = math.ceil((B - 1) / (A - 1))

print(A, B, C)

Submission status: Wrong Answer

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

    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())
tap = 0

plug = A
tap += 1

if plug >= B:
  print(tap)
  exit()

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

Submission status: Wrong Answer

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

num = 0
ind = 0
while num < B:
  num += A
  ind += 1
  
print(ind)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

print(c)

Submission status: Wrong Answer

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

if a>=b:
    print(1)
else:
    while 1:
        an+=(a-1)
        t+=1
        if an>=b:
            print(t)
            exit()

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

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

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

Submission status: Wrong Answer

Solution code:
s,t = map(int,(input().split()))
x = 0
if t == 1:print(0);exit()
while 1:
  if x * s >= t:
    print(x);exit()
  x += 1

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

k=1
#if B ==1:
#  k=0
#else:
#  k=1

t = B-A

if t >= A:
  q, mod = divmod(t, A)
#  print(q,mod)
  k=k+q
  if mod != 0:
    k = k+1

print(k)

Submission status: Wrong Answer

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

nouse = 0
count = 0

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

n=a
ans=1

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

print(ans)

Submission status: Wrong Answer

Solution code:
a=input().split(" ")
A=int(a[0])
B=int(a[1])
b=B//A
if B%A!=0:
    b+=1
print(b)

Submission status: Wrong Answer

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

num = 0
ind = 0
while num < B:
  num += A
  ind += 1
  print(num,ind)
  
  
print(ind)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
import sys

num = list(input().split(" "))
a = int(num[0])
b = int(num[1])
if a >= b:
  print(1)
  sys.exit()

multi = 1

while True:
  if multi == 1:
  	cnt = a * multi
  else:
    cnt = a * multi - multi + 1
  if cnt >= b:
    break
  multi += 1

print(multi)

Submission status: Wrong Answer

Solution code:
import math
# cook your dish here
a,b=list(map(int,input().split()))
l=[1]*a
f=1
s=1
while(f==1):
    for i in range(0,a):
        if(sum(l)>=b):
            f=0
            break
        else:
            l[i]=l[i]-1+a
            s=s+1
        #print(l,s)
print(s)

Submission status: Wrong Answer

Solution code:
tmp = input()
q = tmp.split(" ")
a = int(q[0]) - 1
b = int(q[1])
if(b == 1):
    print("0")
c = a + 1
l = 1
while(c < b):
    c += a
    l+=1
print(l)

Submission status: Wrong Answer

Solution code:
import sys

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

for i in range(1,b):
    if ((i)*a-(i-1))>=b:
        print(i)
        sys.exit()

Submission status: Wrong Answer

Solution code:

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

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

print( ans if ans != 0 else 0 )

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

if b >= 2*a:
    print(b/a+1)
elif b < 2*a and b > a:
    print(b/a+1)
elif b <= a:
    print(1)

Submission status: Wrong Answer

Solution code:
# coding: utf-8

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

t = int(b / a)
m = b % a
if m > 0: t += 1

print(t)

Submission status: Wrong Answer

Solution code:
a, b = map(int, input().split())
is_res = True
num = 1
new_b = b
if b == 1:
    print(0)
else:
    while is_res:
        if new_b - a > 0:
            num += 1
            new_b -= a
        else:
            print(num)
            is_res = False

Submission status: Wrong Answer

Solution code:
import sys, re, os
from collections import deque, defaultdict, Counter
from math import ceil, sqrt, hypot, factorial, pi, sin, cos, radians
from itertools import permutations, combinations, product, accumulate
from operator import itemgetter, mul
from copy import deepcopy
from string import ascii_lowercase, ascii_uppercase, digits
from fractions import gcd
 
def input(): return sys.stdin.readline().strip()
def INT(): return int(input())
def MAP(): return map(int, input().split())
def S_MAP(): return map(str, input().split())
def LIST(): return list(map(int, input().split()))
def S_LIST(): return list(map(str, input().split()))

sys.setrecursionlimit(10 ** 9)
INF = float('inf')
mod = 10 ** 9 + 7

a, b = MAP()
# n = INT()
# a, b, c = MAP()

k = 1
count = 0
ans = 0

# for i in range()
while(1):
    if count == 0:
        count += a
        ans += 1
    else:
        count += a-1
        ans += 1
    if b<=count:
        # print(count)
        print(ans)
        exit()

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
import math

s = input().split()
a=int(s[0])
b=int(s[1])

ans=math.ceil(b/a)

print(ans)

Submission status: Wrong Answer

Solution code:


tap,out = map(int,input().split())

count = 1

while(1):
    if(out>tap):
        out = out - (tap-1)
        count += 1
        print(out)
    else:
        break
print(count)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

print(res)

Submission status: Wrong Answer

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

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

print(ans)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
import sys
import math

line = sys.stdin.readlines()
a, b = line[0].split(' ')
a, b = int(a), int(b)
if a>=b:
  print(1)
else:
  print(math.ceil(int(b)/int(a)))

Submission status: Wrong Answer

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

k=0
if B ==1:
  k=0
else:
  k=1

t = B-A

if t >= A:
  q, mod = divmod(t, A)
#  print(q,mod)
  k=k+q
  if mod != 0:
    k = k+1

print(k)

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

A = get[0]
B = get[1]

print(A)
print(B)

count = 0
plug = 1

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

Submission status: Wrong Answer

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

from sys import stdin
import math

# 標準入力をスペースで区切って、intに変換 listに収納
int_list  = [int(x) for x in stdin.readline().rstrip().split()]

A = int_list[0]
B = int_list[1]

plug=A
cnt=1
while plug<B :
    if B == 1:
        cnt=0
        break
    plug+= A - 1
    cnt+=1

print(cnt)

Submission status: Wrong Answer

Solution code:
List = list(map(int, input().split()))
A = List[0]
B = List[1]
an = B/A
if B==1:
    print(0)
elif an <1:
    print(1)
elif B%A==0:
    print(int(an))
else:
    i=1
    while True:
        if B<=(A*(int(an)+i)-(int(an)-i)):
            print(int(an)+i)
            break
        i+=1

Submission status: Wrong Answer

Solution code:
from math import ceil
a,b=[int(i) for i in input().split()]
if b==1:
    print(0)
elif b%(a-1)==1:
    print(b//(a-1))
else:
    print(ceil(b/(a-1)))

Submission status: Wrong Answer

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

need = 1
tap = a


while tap < b:
	if a == 0 or a == 1 :
		need = 0
		break
	tap += (a - 1)
	need += 1
print (need)

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

Solution code:
import math
s = input().split()
a = int(s[0])
b= int(s[1])
#print(a,b)
if b/a == 1:
  print(1)
elif b%a > 0:
  print(math.ceil(b/a))

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

Submission status: Wrong Answer

Solution code:
import math
a, b = map(int, input().split())
c = a
count = 1
while True:
    if c+a-1<b:
        count +=1
        c += a-1
    else:
        if c!=b:
            count += 1
            break
        break
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 B % (A - 1) <=  B:
  print(B // (A - 1))
else:
  print(B // (A - 1) + 1)

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

Solution code:
import sys

stdin = sys.stdin
na = lambda: map(int, stdin.readline().split())
ns = lambda: stdin.readline().rstrip()
ni = lambda: int(ns())

def main():
  a, b = na()
  
  print((b-a)%a+1)
main()

Submission status: Wrong Answer

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

print(cnt)

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
add=0
while(b > a**i + add):
    k+=1
    add=a*k-1

print(i+k)

Submission status: Wrong Answer

Solution code:
import sys
inputs = sys.stdin.readlines()

A, B = map(int, inputs[0].split())
ok = A
use = 1
while ok < B:
    use += 1
    ok += A-1
    
print(use)

Submission status: Wrong Answer

Solution code:
import sys

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

b = AB[1] - AB[0]

if b <= 0:
    print(1)
    sys.exit(0)

c = b // (AB[0]-1)

if b % (AB[0]-1) != 0:
    print(c+2)
else:
    print(c+1)

Submission status: Wrong Answer

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

    B -= A

    cnt = 1

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

    print(cnt)
        

main()

Submission status: Wrong Answer

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


if tap[0] >= tap[1]:
    print(1)
else:

    num = tap[0]
    inc = tap[0] - 1
    cnt = 1

    while True:
        num += inc
        cnt += 1

        if num >= tap[1]:
            break

    print(cnt)

Submission status: Wrong Answer

Solution code:
s,t = map(int,(input().split()))
x = 0
while 1:
  if x * s >= t:
    print(x);exit()
  x += 1

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)
        print(count)
        if count >= b:
            print(i + 1)
            break

Submission status: Wrong Answer

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

ans = 0

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

Submission status: Wrong Answer

Solution code:
i = list(map(int, input().split()))
a = i[0]
count = 1

while a <= i[1]:
    a += i[0] - 1
    count += 1

print(count)

Submission status: Wrong Answer

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

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

print(ans)

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
import sys

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

for i in range(1,100):
    if ((i)*a-(i-1))>=b:
        print(i)
        sys.exit()

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

def C():
    n = int(input())
    nums = [int(i) for i in input().split()]

B()

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
# coding: utf-8
import sys
# import collections

# import bisect
# import math
# import numpy as np
# from fractions import gcd

"""Template"""


class IP:
    """
    入力を取得するクラス
    """

    def __init__(self):
        self.input = sys.stdin.readline

    def I(self):
        """
        1文字の取得に使います
        :return: int
        """
        return int(self.input())

    def S(self):
        """
        1文字の取得(str
        :return: str
        """
        return self.input()

    def IL(self):
        """
        1行を空白で区切りリストにします(int
        :return: リスト
        """
        return list(map(int, self.input().split()))

    def SL(self):
        """
        1行の文字列を空白区切りでリストにします
        :return: リスト
        """
        return list(map(str, self.input().split()))

    def ILS(self, n):
        """
        1列丸々取得します(int
        :param n: 行数
        :return: リスト
        """
        return [int(self.input()) for _ in range(n)]

    def SLS(self, n):
        """
        1列丸々取得します（str
        :param n: 行数
        :return: リスト
        """
        return [self.input() for _ in range(n)]

    def SILS(self, n):
        """
        Some Int LineS
        横に複数、縦にも複数
        :param n: 行数
        :return: list
        """
        return [self.IL() for _ in range(n)]

    def SSLS(self, n):
        """
        Some String LineS
        :param n: 行数
        :return: list
        """
        return [self.SL() for _ in range(n)]


class Idea:
    def __init__(self):
        pass

    def HF(self, p):
        """
        Half enumeration
        半分全列挙です
        pの要素の和の組み合わせを作ります。
        ソート、重複削除行います
        :param p: list : 元となるリスト
        :return: list : 組み合わせられた和のリスト
        """
        return sorted(set(p[i] + p[j] for i in range(len(p)) for j in range(i, len(p))))

    def Bfs2(self, a):
        """
        bit_full_search2
        bit全探索の改良版
        全探索させたら2進数のリストと10進数のリストを返す
        :return: list２つ : １個目 2進数(16桁)  2個目 10進数
        """
        # 参考
        # https://blog.rossywhite.com/2018/08/06/bit-search/
        # https://atcoder.jp/contests/abc105/submissions/4088632
        value = []
        for i in range(1 << len(a)):
            output = []

            for j in range(len(a)):
                if self.bit_o(i, j):
                    """右からj+1番目のiが1かどうか判定"""
                    # output.append(a[j])
                    output.append(a[j])
            value.append([format(i, 'b').zfill(16), sum(output)])

        value.sort(key=lambda x: x[1])
        bin = [value[k][0] for k in range(len(value))]
        val = [value[k][1] for k in range(len(value))]
        return bin, val

    def S(self, s, r=0, m=-1):
        """
        ソート関係行います。色々な設定あります。
        :param s: 元となるリスト
        :param r: reversするかどうか 0=False 1=True
        :param m: （2次元配列）何番目のインデックスのソートなのか
        :return: None
        """
        r = bool(r)
        if m == -1:
            s.sort(reverse=r)
        else:
            s.sort(reverse=r, key=lambda x: x[m])

    def bit_n(self, a, b):
        """
        bit探索で使います。0以上のときにTrue出します
        自然数だからn
        :param a: int
        :param b: int
        :return: bool
        """
        return bool((a >> b & 1) > 0)

    def bit_o(self, a, b):
        """
        bit探索で使います。1のときにTrue出すよ
        oneで1
        :param a: int
        :param b: int
        :return: bool
        """
        return bool(((a >> b) & 1) == 1)

    def ceil(self, x, y):
        """
        Round up
        小数点切り上げ割り算
        :param x: int
        :param y: int
        :return: int
        """
        return -(-x // y)

    def ave(self, a):
        """
        平均を求めます
        :param a: list
        :return: int
        """
        return sum(a) / len(a)

    def gcd(self, x, y):
        if y == 0:
            return x
        else:
            return self.gcd(y, x % y)

    def lcm(self, x, y):
        return (x * y) // self.gcd(x, y)


"""ここからメインコード"""


def main():
    # 1文字に省略
    r, e = range, enumerate
    ip = IP()
    id = Idea()

    """この下から書いてね"""
    a, b = ip.IL()
    print(id.ceil(b, a))



main()

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

mod = b % a
rslt = int(b / a)

if mod ==  0 :
  print(rslt)
else:
  print(rslt + 1)

Submission status: Wrong Answer

Solution code:
A,B=map(int,input().split())
N=0
for i in range(21):
  if A+(A-1)*(i) < B :
    N+=1
  else :
    N+=1
    break
print(N)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

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:


def main():

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

   
   count = 0
   ans = 0

   count += A
   ans += 1

   if count >= B:
      print(ans)
   
   increase = A-1

   while(count < B):
      count += increase
      ans += 1
   print(ans)


      

if __name__== "__main__":
    main()

Submission status: Wrong Answer

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

for i in range(1,1000000000):
    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())
ans=0
ini=A
while True:
	ans+=1
	if A>=B:
		print(ans)
		exit()
	A=A+ini-1

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

Solution code:
S = input().split()
cnt = 1
num = int(S[0])

while(num < int(S[1])):
    num += int(S[0]) - 1
    cnt += 1
    
print(cnt)

Submission status: Wrong Answer

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

if B == 1:
    cnt = 0

print(cnt)

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

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

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

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

Submission status: Wrong Answer

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

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

cnt = 1
tmp = a
while tmp < b:
    cnt += 1
    tmp += a-1
    
print(cnt)

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 B ==0 or B == 1:
    break
  if sum >= B:
    break
  sum += A -1
  cnt += 1
 
print(cnt)

Submission status: Wrong Answer

Solution code:
a, b = map(int, input().split())
total = 0
for i in range(1, 30):
    if i == 1:
        total = a
    else:
        total += (a - 1)

    if total >= b:
        print(i)
        exit()

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

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

mod = b % a
rslt = int(b / a)

if mod > 0 :
  print(rslt + 1)
else:
  print(rslt)

Submission status: Wrong Answer

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

tap_num = 0
available_socket_num = 0
while B > available_socket_num:
  tap_num += 1
  available_socket_num = (A - 1) * tap_num + 1
  
print(tap_num)

Submission status: Wrong Answer

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

def main():
    A, B = map(int,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:
i = list(map(int, input().split()))
a = i[0]
count = 1

while a < i[1]:
    a += i[0] - 1
    count += 1

print(count)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
A, B = [int(i) for i in 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
# cook your dish here
a,b=list(map(int,input().split()))
l=[1]*a
f=1
s=1
while(f==1):
    for i in range(0,a):
        if(sum(l)>=b):
            f=0
            break
        else:
            l[i]=l[i]-1+4
            s=s+1
print(s)

Submission status: Wrong Answer

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

num = A
ans = 1
while True:
    if num >= B:
        break
    num += (A-1)
    ans += 1
print(ans)

Submission status: Wrong Answer

Solution code:
A, B = map(int, input().split())
now = 0
ans = 0
f = True
while now < B:
    if f:
        now += A
        ans += 1
        f = False
    else:
        now += A-1
        ans += 1
print(ans)

Submission status: Wrong Answer

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

print(((B - A) // (A - 1)) + 1)

Submission status: Wrong Answer

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

ans_tmp = (B-1)/(A-1)

if ans_tmp > 1 and ans_tmp < 2:
    print(int(ans_tmp) + 1)
else:
    print(int(ans_tmp))

Submission status: Wrong Answer

Solution code:
import math

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

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

print(num)

Submission status: Wrong Answer

Solution code:
(A, B) = tuple([int(s) for s in input().split(' ')])
x = A
count = 1
while(x < B):
    x += A - 1
    count += 1
print(count)

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

Submission status: Wrong Answer

Solution code:
# -*- coding: utf-8 -*-
# 整数の入力
a, b = map(int, input().split())

result = 1
socket = a
if socket < b:
    for i in range(20):
        socket += a-1
        result += 1
        if socket >= b:
            break
print(result)

Submission status: Wrong Answer

Solution code:

tap,out = map(int,input().split())

count = 1

while(1):
    if(out>tap):
        out = out - (tap-1)
        count += 1
    break
print(count)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

a,b=acinput()

dp={}
dp[1]=a

for i in range(2,1000):
    dp[i]=dp[i-1]+a-1

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

Submission status: Wrong Answer

Solution code:
import sys

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

for i in range(1,21):
    if ((i)*a-(i-1))>=b:
        print(i)
        sys.exit()

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

if b <=a:
    n =1
else:
    n = (b-a)/(a-1) +1
    n = math.ceil(n)
    
print(n)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
from sys import stdin
#a,b = [int(x) for x in stdin.readline().rstrip().split()]
"""
a,b = map(int,input().split())
s = input()
s = s.split(" ")
a = int(s[0])
b = int(s[1])
"""
s = list(map(int,input().split()))
a = int(s[0])
b = int(s[1])

count = 0
while b > 0:
  count += 1
  b -= (count*(a-1)+1)
    
print(count)

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:
s,t=map(int,input().split())
kuti=0
kosuu=0

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

print(kosuu-1)

Submission status: Wrong Answer

Solution code:
a,b = map(int, input().split())
res = 1
while 1:
  if a*res - res+1>=b: 
    print(res)
    break
  res+=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 -1):
    k+=1

print(i+k)

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)