Problem:


Score : 200 points

Problem Statement

Takahashi's house has only one socket.

Takahashi wants to extend it with some number of power strips, each with A sockets, into B or more empty sockets.

One power strip with A sockets can extend one empty socket into A empty sockets.

Find the minimum number of power strips required.

Constraints

All values in input are integers.

2 \leq A \leq 20

1 \leq B \leq 20

Input

Input is given from Standard Input in the following format:

A B

Output

Print the minimum number of power strips required.

Sample Input 1

4 10

Sample Output 1

3

3 power strips, each with 4 sockets, extend the socket into 10 empty sockets.

Sample Input 2

8 9

Sample Output 2

2

2 power strips, each with 8 sockets, extend the socket into 15 empty sockets.

Sample Input 3

8 8

Sample Output 3

1



Sample input:
4 10


Sample output:
3

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

for i in range(1, 20):
  c = (A-1)*(i-1) + A
  if c >= B:
    break
    
print(i)

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

if A >= B:
    print(1)
else:
    if (B - A) % (A - 1) > 0:
        print(int((B - A) // (A - 1)) + 2)
    else:
        print(int((B - A) // (A - 1)) + 1)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

if B == 1:
    print(0)

if B < A:
    print(1)

remain = B - A
count = remain // (A-1)
mod = remain % (A-1)
if not mod == 0:
    count += 1
count += 1
print(count)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

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

Submission status: Wrong Answer

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

def main():
    A, B = map(int,input().split())
    count = 0
    while B > 0:
        tap = (B + A - 1) // A
        count += tap
        B = tap if tap >= A else 0
    print(count)

if __name__ == "__main__":
    main()

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

print(misiyou % tap + 1)

Submission status: Wrong Answer

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

total=0
number=0

while total < B:
    if (number==0):
        total=A
    else:
        total=total-1+A

    number = number + 1

print(number)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
num = input().split()
a, b = int(num[0]), int(num[1])
i = 1
while(1):
  if a*i<b:
    i += 1
    continue
  else:
    break
    
print(i)

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

import sys

def readline():
	return sys.stdin.readline().rstrip()
def read(f=int):
	return f(readline())
def reads(f=int):
	return [f(s) for s in readline().split()]

A, B = reads()

S = 0
C = 0
while S < B:
	S += A
	C += 1
	if S >= B:
		break
	S -= 1
print(C)

Submission status: Wrong Answer

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

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


print(ans)

Submission status: Wrong Answer

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

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])
    print(int(math.ceil(b/a)))

B()

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()
n = 1
while 1:
    if a + (n-1)*(a-1) >= b:
        print(n)
        quit()
    n += 1

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

ans = 1 

if B > A:


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

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

print(ans)

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

ans=1
total=4
if a==b:
  print(1)
  exit()
while True:
  if total<b:
    total+=a-1
  else:
    break
  ans+=1
print(ans)

Submission status: Wrong Answer

Solution code:
# -*- coding: utf-8 -*-
"""
Created on Sat Apr 20 20:47:47 2019

@author: Owner
"""

import numpy as np
import sys
import collections
import scipy.misc
import math
from operator import itemgetter
import itertools
import copy
import bisect
import heapq

#素因数を並べる
def prime_decomposition(n):
  i = 2
  table = []
  while i * i <= n:
    while n % i == 0:
      n /= i
      table.append(int(i))
    i += 1
  if n > 1:
    table.append(int(n))
  return table   
# 桁数を吐く
def digit(i):
    if i > 0:
        return digit(i//10) + [i%10]
    else:
        return []
    
def getNearestValueIndex(list, num):
    """
    概要: リストからある値に最も近い値のインデックスを取得する関数
    @param list: データ配列
    @param num: 対象値
    @return 対象値に最も近い値
    """

    # リスト要素と対象値の差分を計算し最小値のインデックスを取得
    idx = np.abs(np.asarray(list) - num).argmin()
    return idx

def find_index(l, x, default=False):
    if x in l:
        return l.index(x)
    else:
        return default

class UnionFind(object):
    def __init__(self, n=1):
        self.par = [i for i in range(n)]
        self.rank = [0 for _ in range(n)]
        self.size = [1 for _ in range(n)]

    def find(self, x):
        """
        x が属するグループを探索
        """
        if self.par[x] == x:
            return x
        else:
            self.par[x] = self.find(self.par[x])
            return self.par[x]

    def union(self, x, y):
        """
        x と y のグループを結合
        """
        x = self.find(x)
        y = self.find(y)
        if x != y:
            if self.rank[x] < self.rank[y]:
                x, y = y, x
            if self.rank[x] == self.rank[y]:
                self.rank[x] += 1
            self.par[y] = x
            self.size[x] += self.size[y]

    def is_same(self, x, y):
        """
        x と y が同じグループか否か
        """
        return self.find(x) == self.find(y)

    def get_size(self, x):
        """
        x が属するグループの要素数
        """
        x = self.find(x)
        return self.size[x]
    

"""
N, X = map(int, input().split())

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

P = [0]*N
Y = [0]*N
for n in range(N):
    P[n], Y[n] = map(int, input().split())

# 多次元配列の宣言（あとでintにすること。）（タプルにすること。）
dp = np.zeros((N+1, 4,4,4))
    
all(nstr.count(c) for c in '753')

# 複数配列を並び替え
ABT = zip(A, B, totAB)
result = 0
# itemgetterには何番目の配列をキーにしたいか渡します
sorted(ABT,key=itemgetter(2))
A, B, totAB = zip(*ABT)
A.sort(reverse=True)

# 2進数のbit判定
(x >> i) & 1

# dp最小化問題
dp = [np.inf]*N
for n in range(N):
    if n == 0:
        dp[n] = 0
    else:
        for k in range(1,K+1):
            if n-k >= 0:
                dp[n] = min(dp[n], dp[n-k] + abs(h[n]-h[n-k]))
            else:
                break
# 累積和
add = 1 # 問題によって決まる
res = 0
sums = [0]*(len(nums)+1)
for i in range(len(nums)):
    sums[i+1] = sums[i] + nums[i]
for i in range(0, len(nums), 2):
    left = i
    right = min(i+add, len(nums))
    tmp = sums[right] - sums[left]
    res = max(tmp, res)

#２分探索
li, ri = bisect.bisect_left(p_ac, l[i]-1), bisect.bisect_right(p_ac, r[i]-1)    

#ソート関数
org_list = [3, 1, 4, 5, 2]
new_list = sorted(org_list)
print(org_list)
print(new_list)
# [3, 1, 4, 5, 2]
# [1, 2, 3, 4, 5]

#Distance Transformation
    for h in range(0,H):
        for w in range(0,W):
            if h == 0 and w == 0:
                pass
            elif h == 0:
                D[H-h-1][W-w-1]= min(D[H-h-1][W-w-1], D[H-h-1][W-w]+1)
            elif w == 0:   
                D[H-h-1][W-w-1]= min(D[H-h-1][W-w-1], D[H-h][W-w-1]+1)
            else:
                D[H-h-1][W-w-1]= min(D[H-h-1][W-w-1], D[H-h][W-w-1]+1, D[H-h-1][W-w]+1, D[H-h][W-w]+2)
            d_max = max(D[H-h-1][W-w-1], d_max)

"""


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

    
def main(): 
    if A >= B:
        return print(1)
    else:
        for n in range(50):
            if n >= (B-1)/float(A-1):
                return print(n)
                
                
                
            
            
                

    
if __name__ == '__main__':
    main()

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

print(ans)

Submission status: Wrong Answer

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

import math

c = 0
while True:
    if B <= A*c-(c-1) 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())
total = A
need = 1
if B <= A:
    print(1)
else:
    while True:
        total += A - 1
        need += 1
        if total >= B:
            print(need)
            break

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

ret = 0
kuti = 0
for i in range(1, 50):
  ret += 1
  if i == 1:
    kuti += A
  else:
    kuti += A-1
  
  if kuti >= B:
    break

print(ret)

Submission status: Wrong Answer

Solution code:
import sys


def input(): return sys.stdin.readline().strip()


def solve():
    pass


def main():
    A, B = map(int, input().split())
    ans = 1
    while (A-1) * ans + 1 < B:
        ans += 1

    print(ans)


if __name__ == "__main__":
    main()

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

num = 1

for i in range(1000):
    num += (A-1)
    if num >= B:
        print(i+1)
        sys.exit()

Submission status: Wrong Answer

Solution code:
import sys
A, B = map(int, input().split())
tmp = A
ans = 1
if A > B:
    print(0)
    sys.exit()
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())
o = a
s = 1
while o < b:
    o-=1
    o+=a
    s+=1
    
print(s)

Submission status: Wrong Answer

Solution code:


def main():

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

   C = B-A
   if C <= 0: print(1);exit()
   
   count = 1
   
   while(C > 0):
      C -= A
      count += 1
   print(count)

   


      

if __name__== "__main__":
    main()

Submission status: Wrong Answer

Solution code:
A, B = [int(s) for s in input().split()]
count = 1
while True:
  if count*(A-1)+1 >= B:
    print(count)
    break
  count = count+1

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

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 n3 < 2:
    a1 = n2
else:
    a1 = n2 + 1
print(a1)

Submission status: Wrong Answer

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

#print(A,B)
count=0
if A>=B:
    count=1
else:
    while B>=0:
        if B-A>=0:
            B-=A
            count+=1
        else:
            break
print(count)

Submission status: Wrong Answer

Solution code:

a = input().split()

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

start = tap
num = 1

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

Submission status: Wrong Answer

Solution code:
I = input().split()
A = int(I[0])
B = int(I[1])
res = 0
T = 0
while(True):
    res += 1
    T += A
    if(T >= B):
        break
    T -= 1
print(res)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

if b != 1:
    div = b // (a-1)
    mod = b % (a-1)

    if mod <= 1:
        print(div)
    else:
        print(div+1)
else:
    print(0)

Submission status: Wrong Answer

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

if x[1]==1:
	print(0)
else:
	for i in range(1,20):
		if x[0]*i>=x[1]:
			print(i)
			break

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

result = 1
socket = b
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:
import math

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

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

Submission status: Wrong Answer

Solution code:
import math

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

Submission status: Wrong Answer

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

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:
def main():
	A, B = [int(x) for x in input().split()]
	
	counter = 0
	while B > 0:
		B = B - A
		counter += 1
	print(counter)

if __name__ == "__main__":
	main()

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

print(N)

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

tap = b // a
rem = b % a

if rem == 0:
  print(tap)
else:
  print(tap+1)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
# coding: utf-8

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

Submission status: Wrong Answer

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

print(int(b/a)+1)

Submission status: Wrong Answer

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

if 2 <= A and A <= 20:
    if 1 <= B and B <= 20:

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

Submission status: Wrong Answer

Solution code:
# B - Power Socket
A, B = map(int, input().split())
A_new = A
count = 1
while A_new < B:
    A_new += A-1
    count += 1
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 i == 1:
        sum = A*i
    else:
        sum = A*i-1
    if sum >= B:
        print(i)
        break

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
# -*- coding: utf-8 -*-
import sys
import math
from bisect import bisect_left
from bisect import bisect_right
import collections
import copy
import heapq
from collections import defaultdict
from heapq import heappop, heappush
import itertools
input = sys.stdin.readline

##### リストの 二分木検索 #####
# bisect_left(lists, 3)
# bisect_right(lists, 3)

##### プライオリティキュー #####
# heapq.heapify(a) #リストaのheap化
# heapq.heappush(a,x) #heap化されたリストaに要素xを追加
# heapq.heappop(a) #heap化されたリストaから最小値を削除＆その最小値を出力

# heapq.heappush(a, -x) #最大値を取り出す時は、pushする時にマイナスにして入れよう
# heapq.heappop(a) * (-1) #取り出す時は、-1を掛けて取り出すこと

##### タプルリストのソート #####
# sorted(ans) #(a, b) -> 1st : aの昇順, 2nd : bの昇順
# sorted(SP, key=lambda x:(x[0],-x[1])) #(a, b) -> 1st : aの昇順, 2nd : bの降順
# sorted(SP, key=lambda x:(-x[0],x[1])) #(a, b) -> 1st : aの降順, 2nd : bの昇順
# sorted(SP, key=lambda x:(-x[0],-x[1])) #(a, b) -> 1st : aの降順, 2nd : bの降順

# sorted(SP, key=lambda x:(x[1])) #(a, b) -> 1st : bの昇順
# sorted(SP, key=lambda x:(-x[1])) #(a, b) -> 1st : bの降順

def inputInt(): return int(input())
def inputMap(): return map(int, input().split())
def inputList(): return list(map(int, input().split()))

def main():
	A,B = inputMap()

	ans = 0
	to = 0
	flg = False
	while True:
		ans += 1
		if flg == False:
			to += A
			flg = True
		else:
			to = (to-1) + A

		if to >= B:
			break

	print(ans)

if __name__ == "__main__":
	main()

Submission status: Wrong Answer

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


print(-(-B//A))

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

def main():
    A, B = map(int,input().split())
    count = 0
    while B > 0:
        tap = (B + A - 1) // A
        count += tap
        B = tap if tap > A else 0
    print(count)

if __name__ == "__main__":
    main()

Submission status: Wrong Answer

Solution code:
AB=input().split()
AB=[int(n) for n in AB]

ans=AB[0]
count=1
while True:
  if ans >= AB[1]:
    break
  ans=ans+AB[0]-1
  count+=1
print (count)

Submission status: Wrong Answer

Solution code:
import math

def solve():
    A,B = map(int, input().split())
    print(math.ceil((B+1)/(A+1)))
    
solve()

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)]
"""
a,b=  map(int, sys.stdin.readline().split())

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
#https://atcoder.jp/contests/abc139/tasks/abc139_b

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

c = a-1
'''
cnt = b // c
if b%c>1:
    cnt+=1
print(cnt)
'''
b-=a
cnt = 1
if b>0:
    while True:
        if b>0:
            b-=c
            cnt+=1
        else:
            break

print(cnt)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
if __name__ =='__main__':
    a, b = list(map(int,input().split()))
    c = 1
    d = a
    while True:
        if d>=b:
            print(c)
            break
        else :
            d += a-1
            c+=1

Submission status: Wrong Answer

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

print(ans)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

Solution code:
tomadas, quero = map(int, raw_input().split())

aux = tomadas
ans = 1

while (aux < quero):
    aux += (tomadas - 1)
    ans += 1

print ans

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
A,B=(int(x) for x in input().split())
  
result = 0
s_count = 1
while(1):
  s_count += A - 1
  result += 1
  if s_count >= B:
    break;

print(result)

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

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

Submission status: Wrong Answer

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

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


def solve(A: int, B: int):
    count_plug = 0
    count_available = 1
    while True:
        count_plug += 1
        count_available -= 1
        count_available += A
        if count_available >= B:
            break
    print(count_plug)
    return


# Generated by 1.1.5 https://github.com/kyuridenamida/atcoder-tools  (tips: You use the default template now. You can remove this line by using your custom template)
def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    A = int(next(tokens))  # type: int
    B = int(next(tokens))  # type: int
    solve(A, B)

if __name__ == '__main__':
    main()

Submission status: Wrong Answer

Solution code:

import math

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

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

Submission status: Wrong Answer

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

x = a

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

Submission status: Wrong Answer

Solution code:
a, b = (int(i) for i in input().split())
a_sum = a
ans = 1
while a_sum < b:
    a_sum = a_sum - 1 + a
    ans += 1

print(ans)

Submission status: Wrong Answer

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

for i in range(0, 21):
    if i == 0:
        tap = 0
    else:
        tap = a + (a - 1) * (i - 1)
    if tap >= b:
        break
print(i)

Submission status: Wrong Answer

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

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

print(count)

Submission status: Wrong Answer

Solution code:
# coding:utf-8
import sys

def main():
    a,b = map(int, input().split())
    count = 0
    cosuu = 0
    
    if b == 1:
        print(0)
        sys.exit()

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

if __name__ == '__main__' :
    main()