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:
line = input().split(" ")
a = int(line[0])
b = int(line[1])

# a + (n - 1) * (a - 1) >= b
# n * (a - 1) + 1 >= b
# n >= (b - 1)/(a - 1)

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

if n == int(n):
  print(n)
elif n >= int(n):
  print(n + 1)

Submission status: Wrong Answer

Solution code:
#--power socket

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

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

print(j)

Submission status: Wrong Answer

Solution code:
#--power socket

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

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

print(j-1)

Submission status: Wrong Answer

Solution code:
#--power socket

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

q, mod = divmod(b,a)
if (b == 1):
  print("0")
  exit()

if (a >= b):
  print("1")
elif (a < b and mod == 0):
  print(q+1)
elif (a < b and mod != 0):
  print(q+1)
else:
  pass

Submission status: Wrong Answer

Solution code:
#--power socket

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

q, mod = divmod(b,a)
if (b == 1):
  print("0")
  exit()

if (a >= b):
  print("1")
elif (a < b and mod == 0):
  print(q)
elif (a < b and mod != 0):
  print(q+1)
else:
  pass

Submission status: Wrong Answer

Solution code:
#--power socket

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

q, mod = divmod(b,a)
if (q == 0):
  print("0")
  exit()

if (a >= b):
  print("1")
elif (a < b and mod == 0):
  print(q)
elif (a < b and mod != 0):
  print(q+1)
else:
  pass

Submission status: Wrong Answer

Solution code:
#--power socket

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

if (b == 1):
  print("0")
  exit()

q, mod = divmod(b,a)
if (a >= b):
  print("1")
elif (a < b and mod == 0):
  print(q)
elif (a < b and mod != 0):
  print(q+1)
else:
  pass

Submission status: Wrong Answer

Solution code:
#--power socket

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

if (b == 1):
  print("0")
  exit()

q, mod = divmod(a,b)
if (a >= b):
  print("1")
elif (a < b and mod == 0):
  print(q)
elif (a < b and mod != 0):
  print(q+1)
else:
  pass

Submission status: Wrong Answer

Solution code:
#--power socket

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

if (b == 1):
  print("0")
  exit()

if (a >= b):
  print("1")
elif (a < b):
  point = int(b/a) + 1
  print(point)
else:
  pass

Submission status: Wrong Answer

Solution code:
#--power socket

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

if (a >= b):
  print("1")
elif (a < b):
  point = int(b/a) + 1
  print(point)
else:
  pass

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

Solution code:
a, b = map(int, input().split())
min_ans = b // a
mod_ans = b % a

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

Submission status: Wrong Answer

Solution code:
a, b = map(int, input().split())
min_ans = b // a
mod_ans = b % a

if ((min_ans - mod_ans) > 0) :
  print(min_ans)
else : 
  print(min_ans + 1)

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

if b==1:
  print(0)
  exit()
for i in range(1,20):
  if a*i>=b:
    print(i)
    exit()

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
A,B = input().split(' ')
if int(B) >1:
    num = 1
    while (int(A)-1)*(num -1) + 4 < int(B):
        num += 1
    print(num)
else:
    print(0)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
import math,string,itertools,fractions,heapq,collections,re,array,bisect,sys,random,time,copy,functools
from collections import deque

sys.setrecursionlimit(10**7)
inf = 10**20
mod = 10**9 + 7

DR = [1, -1, 0, 0]
DC = [0, 0, 1, -1]

def LI(): return [int(x) for x in sys.stdin.readline().split()]
def LI_(): return [int(x)-1 for x in sys.stdin.readline().split()]
def LF(): return [float(x) for x in sys.stdin.readline().split()]
def LS(): return sys.stdin.readline().split()
def I(): return int(sys.stdin.readline())
def F(): return float(sys.stdin.readline())
def S(): return input()
     
def main():
    A, B = LI()
    ans = B // A
    if B % A > 0:
        ans += 1
    print(ans)

main()

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

from math import ceil

print(1+max(0,ceil((b-a)/(a-1))))

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

Solution code:
def pin(type=int):
    return map(type,input().rstrip().split())

def resolve():
    A,B=pin()
    ans=0
    plug=1
    while(1):
        ans+=1
        plug=plug-1+A
        if plug>=B:
            print(ans)
            break
resolve()

Submission status: Wrong Answer

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

for i in range(100):
  C = A*i - i
  if C >= B:
    break
print(i)

Submission status: Wrong Answer

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

for i in range(19):
  if B <= A + (A-1)*i:
    print(i + 1)
    break

Submission status: Wrong Answer

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

for i in range(25):
  if B <= A + (A-1)*i:
    print(i + 1)
    break

Submission status: Wrong Answer

Solution code:
def f(A,B):
	x=1
	n=0
	while x<B:
		n+=1
		x+=A-1
	return n

Submission status: Wrong Answer

Solution code:

A,B=[int(x) for x in input().rstrip().split()]
ans=A
cnt=1
while(ans<B):
  ans+=A-1
  cnt+=1
print(cnt)

Submission status: Wrong Answer

Solution code:

A,B=[int(x) for x in input().rstrip().split()]

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

def solution(a,b):
   if a>= b:
        return 1
   else:
        inpu = 1
        while b > (a -1) * inpu + a:
            inpu +=1
        print(inpu + 1)

Submission status: Wrong Answer

Solution code:
def solution(a,b):
   if a>= b:
        return 1
   else:
        inpu = 1
        while b > (a -1) * inpu + a:
            inpu +=1
        print(inpu + 1)

Submission status: Wrong Answer

Solution code:
def solution(a,b):
   if a> b:
        return 1
   else:
        inpu = 1
        while b > (a -1) * inpu + a:
            inpu +=1
        print(inpu + 1)

Submission status: Wrong Answer

Solution code:
i = list(map(int,input().split()))
ans = 0
while i[0] < i[1]:
  i[0] += (i[0]-1)
  ans += 1
print(ans + 1)

Submission status: Wrong Answer

Solution code:
i = list(map(int,input().split()))
ans = 1
while i[0] <= i[1]:
  i[0] += (i[0]-1)
  ans += 1
print(ans)

Submission status: Wrong Answer

Solution code:
def solution(a,b):
    inpu = 1
    while b > a * inpu:
        inpu += 1
  
    print(inpu)

Submission status: Wrong Answer

Solution code:
import math
def main():
    A, B = map(int, input().split())
    i = 0
    if B <= A:
        print(1)
    else:
        con = B
        while True:
            con -= A - 1
            i += 1
            if con <= A:
                i += 1
                break
        print(i)
main()

Submission status: Wrong Answer

Solution code:
import math
def main():
    A, B = map(int, input().split())
    cnt = 0
    while True:
        if B <= A:
            cnt += 1
            break
        else:
            if B > A - 1:
                B -= A - 1
                cnt += 1
    print(cnt)
main()

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
input_line=input().split(" ")
A,B=int(input_line[0])-1,int(input_line[1])-1
print(int(B/A))

Submission status: Wrong Answer

Solution code:
#A 2A-1 3A-2 のように未使用の差し込み口が増える
A, B = map(int, input().split())

i = 1
while i * A - i + 1 < B:
    i += 1

print(i)

Submission status: Wrong Answer

Solution code:
#A 2A-1 3A-2 のように未使用の差し込み口が増える
A, B = map(int, input().split())

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

ans = i

print(ans)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

k = a
ans = 1

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

print(ans)

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

Solution code:
#!/usr/bin/env python3
import sys
import copy
from collections import deque


def main():

    a, b = map(int, input().split())
    cnt=0
    while (1):
        cnt += 1
        t=a*cnt-cnt+1
        if t>=b:
            print(cnt)
            sys.exit(0)

main()

Submission status: Wrong Answer

Solution code:
#!/usr/bin/env python3
import sys
import copy
from collections import deque


def main():

    a, b = map(int, input().split())
    cnt=0
    while (1):
        cnt+=1
        if a*cnt>=b:
            print(cnt)
            sys.exit(0)

main()

Submission status: Wrong Answer

Solution code:
x,y = map(int,input().split())
t = x
c = 1
for i in range(100):
    if t>=y:
        print(c)
        break
    t += x-1
    c += 1
    #print(t)

Submission status: Wrong Answer

Solution code:
x,y = map(int,input().split())
t = x
c = 1
for i in range(100):
    t += x-1
    c += 1
    #print(t)
    if t>=y:
        print(c)
        break

Submission status: Wrong Answer

Solution code:
x,y = map(int,input().split())
t = x
c = 0
for i in range(100):
    t += x-1
    c += 1
    if t>=y:
        print(c)
        break

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
# https://atcoder.jp/contests/abc139/tasks/abc139_b
a, b = map(int, input().split())

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

Submission status: Wrong Answer

Solution code:
# https://atcoder.jp/contests/abc139/tasks/abc139_b
a, b = map(int, input().split())

ans = 0
ad = 0
while ad < b:
    ad += a
    ans += 1
print(ans)

Submission status: Wrong Answer

Solution code:
# https://atcoder.jp/contests/abc139/tasks/abc139_b
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:
'''
INPUT SHORTCUTS
N, K = map(int,input().split())
N ,A,B = map(int,input().split())
string = str(input())
arr = list(map(int,input().split()))
N = int(input())
'''


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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

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

B -= A
ans = 1

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

Solution code:
def solve(a, b):
    n = 0
    c = 0
    while (True):
        c = sum(a, a - 1, n)
        if c >= b:
            break
        else:
            n=n+1
    return n

def sum(a0, d, n):
    return n * (2 * a0 + (n - 1) * d) // 2

a, b = [int(x) for x in input().split()]
answer = solve(a, b)
print(answer)

Submission status: Wrong Answer

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

p = 0
count = 1
sm = 0
while 1:
    if sm < B:
        sm = count * A - p
        p += 1
        count += 1
    else:
        break

print(count-1)

Submission status: Wrong Answer

Solution code:
import sys
sys.setrecursionlimit(10**6)
A,B = map(int,input().split())
cnt = 0
tmp = A
while True:
    cnt += 1
    if tmp >= B:
        break
    else:
        tmp += A - 1 

if B ==0:
    print(0)
else:
    print(cnt)

Submission status: Wrong Answer

Solution code:
import sys
sys.setrecursionlimit(10**6)
A,B = map(int,input().split())
cnt = 0
while True:
    cnt += 1
    if A >= B:
        break

    else:
        A += (A - 1)

if cnt == 0 :
    print(1)
else:
    print(cnt)

Submission status: Wrong Answer

Solution code:
import sys
sys.setrecursionlimit(10**6)
A,B = map(int,input().split())
cnt = 1
while True:
    if (B - (A + (A - 1) * cnt) <= 0):
        break
    else:
        cnt += 1

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

Submission status: Wrong Answer

Solution code:
import sys
sys.setrecursionlimit(10**6)
A,B = map(int,input().split())
cnt = 1

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

    print(cnt + 1)

Submission status: Wrong Answer

Solution code:
import sys
sys.setrecursionlimit(10**6)
A,B = map(int,input().split())
cnt = 1
if A >= B:
    print(1)
    exit()

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

Submission status: Wrong Answer

Solution code:
import sys
sys.setrecursionlimit(10**6)
A,B = map(int,input().split())
cnt = 1
if A >= B:
    print(1)
    exit()

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

Submission status: Wrong Answer

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

sm = A
count = 1

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

Submission status: Wrong Answer

Solution code:
import sys
sys.setrecursionlimit(10**6)
A,B = map(int,input().split())
flag = 1
result = 1
cnt = 1
if A >= B:
    print(1)
    exit()

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

Submission status: Wrong Answer

Solution code:
A,B = map(int,input().split())
flag = 1
result = 1
cnt = 1
if A >= B:
    print(1)
    exit()

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

Submission status: Wrong Answer

Solution code:
A,B = map(int,input().split())
flag = 1
result = 1
cnt = 0
if A >= B:
    print(1)
    exit()

while flag:
    if (A * result - cnt) >= B:
        print(result)
        exit()
    else:
        result += 1
        cnt += 1

Submission status: Wrong Answer

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

if __name__ == "__main__":
    main()

Submission status: Wrong Answer

Solution code:
def main():
    a, b = map(int, input().split())
    if b == 1:
        print(1)
        exit(0)
    cnt = 1
    target = a
    while True:
        if target >= b:
            break
        target += a - 1
        cnt += 1
    print(cnt)

if __name__ == "__main__":
    main()

Submission status: Wrong Answer

Solution code:
def main():
    a, b = map(int, input().split())
    cnt = 1
    target = a
    while True:
        if target >= b:
            break
        target += a - 1
        cnt += 1
    print(cnt)

if __name__ == "__main__":
    main()

Submission status: Wrong Answer

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

while flag:
    if (A * result) >= B:
        flag = 0
    else:
        result += 1

print(result)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

print(count)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
a = list(map(int,input().split()))
A = a[0]
B = a[1]
for ia in range(1,20):
    ana = A+(ia-1)*(A-1)
    if ana >= B: break 
print(ia)

Submission status: Wrong Answer

Solution code:
import sys
sys.setrecursionlimit(10 ** 9)
input = sys.stdin.readline
from itertools import permutations,  combinations, accumulate
from functools import *
from collections import deque, defaultdict, Counter
from heapq import heapify, heappop, heappush, heappushpop

INF = float('inf')
NIL = - 1

""" Input
S = input().rstrip()
N = int(input())
A = list(map(int, input().split()))
D = [int(input()) for _ in range(N)]
"""

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

total = 0
index = 0

while True:
    if total >= B:
        break
    index += 1
    if index == 1:
        total += A
    else:
        total += A - 1


print(index)

# def main():


# if __name__ == '__main__':
#     main()

Submission status: Wrong Answer

Solution code:
import sys
sys.setrecursionlimit(10 ** 9)
input = sys.stdin.readline
from itertools import permutations,  combinations, accumulate
from functools import *
from collections import deque, defaultdict, Counter
from heapq import heapify, heappop, heappush, heappushpop

INF = float('inf')
NIL = - 1

""" Input
S = input().rstrip()
N = int(input())
A = list(map(int, input().split()))
D = [int(input()) for _ in range(N)]
"""

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

total = 0
index = 0

while True:
    if total > B:
        break
        
    index += 1
    if index == 1:
        total += A
    total += A - 1
    
    
print(index)

# def main():


# if __name__ == '__main__':
#     main()

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

a = int(a)
b = int(b)

count = 0

if b == 1:
    print('0')
else:
    while True:
        if b <= a:
            count += 1
            break
        elif b <= 0:
            break
        else:
            b=b-a
            count = count + 1
 
    print(count)

Submission status: Wrong Answer

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

if a == 1:
	print(0)
	quit()

if (b <= a):
    print(1)
    quit()

cnt = 0;
current = 0;
while True:
    cnt += 1
    current = (a - 1) * cnt + a
    if (current >= b):
        print(cnt + 1)
        quit()

Submission status: Wrong Answer

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

if a == 1:
	print(0)
	quit()

if (b <= a):
    print(1)
    quit()

cnt = 1;
current = 0;
while True:
    current = (a - 1) * cnt + a
    if (current >= b):
        print(cnt + 1)
        quit()
    cnt += 1

Submission status: Wrong Answer

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

if (a == 0):
    print(0)
    quit()

if (b <= a):
    print(1)
    quit()

cnt = 1;
current = 0;
while True:
    current = (a - 1) * cnt + a
    if (current >= b):
        print(cnt + 1)
        quit()
    cnt += 1

Submission status: Wrong Answer

Solution code:
import sys
a, b = map(int, input().split())
current = 0;
if (b <= a):
    print(1)
    sys.exit()
cnt = 1;
while True:
    current = (a - 1) * cnt + a
    if (current >= b):
        print(cnt + 1)
        sys.exit()
    cnt += 1

Submission status: Wrong Answer

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

a = int(a)
b = int(b)

count = 0

if b == 1:
    print("0")
else:
    while True:
        if b <= a:
            count += 1
            break
        elif b <= 0:
            break
        else:
            b=b-a
            count = count + 1
 
    print(count)

Submission status: Wrong Answer

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

a = int(a)
b = int(b)

count = 0

if b == 1:
    print("0")
else:
    while True:
        if b <= a:
            count += 1
            break
        elif b == 0:
            break
        else:
            b=b-a
            count = count + 1
 
    print(count)

Submission status: Wrong Answer

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

a = int(a)
b = int(b)

count = 0

if b == 1:
    print("0")
else:
    while True:
        if b <= a:
            count += 1
            break
        elif b == a:
            break
        else:
            b=b-a
            count = count + 1
 
    print(count)

Submission status: Wrong Answer

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

a = int(a)
b = int(b)

count = 0

if b == 1:
    print("0")
else:
    while True:
        if b <= a:
            count += 1
            break
        else:
            b=b-a
            count = count + 1
 
    print(count)

Submission status: Wrong Answer

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

a = int(a)
b = int(b)

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
from sys import stdin
import queue
import sys
import math

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
from collections import defaultdict, deque
import sys
import heapq
import bisect
import itertools
import queue
import copy
import time
sys.setrecursionlimit(10**8)
INF = float('inf')
mod = 10**9+7
eps = 10**-7

def inp(): return int(sys.stdin.readline())

def inpl(): return list(map(int, sys.stdin.readline().split()))

def inpl_str(): return list(sys.stdin.readline().split())

a, b = inpl()
c = a-1
ans = 1
for _ in range(100):
    if a >= b:
        break
    else:
        ans += 1
        a += c
print(ans)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
#別回答
import math
a, b = map(int,input().split())
#print(math.ceil(b/a))
print(math.floor(b/(a-1)))

Submission status: Wrong Answer

Solution code:
#別回答
import math
a, b = map(int,input().split())
print(math.ceil(b/a))

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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