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 = map(int, input().split())
unused = a
cnt = 1
while unused < b:
  unused += a - 1
  cnt += 1
print(cnt)

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

Solution code:

a, b = map(int, input().split())
cnt = 0
power = 1
if a > b:
    print(1)
    exit()

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

print(cnt)

Submission status: Wrong Answer

Solution code:

a, b = map(int, input().split())
cnt = 0
power = 1
if a > b:
    print(0)
    exit()

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

print(cnt)

Submission status: Wrong Answer

Solution code:

a, b = map(int, input().split())
cnt = 0
power = 0
if a > b:
    print(0)
    exit()

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

print(cnt)

Submission status: Wrong Answer

Solution code:

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

while(a < b):
    cnt += 1
    a += a

print(cnt)

Submission status: Wrong Answer

Solution code:

a, b = map(int, input().split())
cnt = 0
power = 0

while(power < b):
    cnt += 1
    power += a

print(cnt)

Submission status: Wrong Answer

Solution code:

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

while(a < b):
    cnt += 1
    a += a

print(cnt)

Submission status: Wrong Answer

Solution code:

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

while(a <= b):
    cnt += 1
    a += a

print(cnt)

Submission status: Wrong Answer

Solution code:

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

while(a <= b):
    cnt += 1
    a += a

print(cnt)

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

import math

print(math.ceil(B/A))

Submission status: Wrong Answer

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

if A == B:
    print('1')
    
elif B == 1:
    print('0')
    
else:
    C = 1
    AAA = 0
    
    while B > AAA:
        AAA = AAA + A - C
        C += 1
        
    print(C)

Submission status: Wrong Answer

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

if A == B:
    print('1')
    
elif B == 1:
    print('0')
    
else:
    C = B//A + 1
    number_of_mouth = A * C - (C-1)
    
    if number_of_mouth >= B:
        print(C)
    else:
        C += 1
        print(C)

Submission status: Wrong Answer

Solution code:

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

if A == B:
    print('1')
    
elif B == 1:
    print('0')

C = B//A + 1

number_of_mouth = A * C - (C-1)

if number_of_mouth >= B:
    print(C)

else:
    C += 1
    print(C)

Submission status: Wrong Answer

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

if A == B:
    print('1')

C = B//A + 1

number_of_mouth = A * C - (C-1)

if number_of_mouth >= B:
    print(C)

else:
    C += 1
    print(C)

Submission status: Wrong Answer

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

C = B//A + 1

number_of_mouth = A * C - (C-1)

if number_of_mouth >= B:
    print(C)

elif A == B:
    print('1')

else:
    C += 1
    print(C)

Submission status: Wrong Answer

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

C = B//A

if B%A == 0:
    C = C
    
else:
    C = C+1

print(C)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

print(-(-b//a))

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

mouth = 1
i = 0
while 1:
  mouth += a-1
  i+= 1
  if mouth >= b:
    print(i)
    break

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

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

ans = 0
flag = True
while flag:
  ans += 1
  if b <= (ans-1)*a + a:
    flag = False

print(ans)

Submission status: Wrong Answer

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

ans = 0
flag = True
while flag:
  ans += 1
  if b <= (ans-1)*a + a:
    flag = False

print(ans)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
import sys
a,b = map(int,input().split())
y = [a*(i+2)-(i+1) for i in range(0,a)]

if a >= b:
    print(1)
    sys.exit()
elif b == 1:
    print(0)
    sys.exit()
for j in range(a-1):
    if y[j] >= b:
        print(j+2)
        sys.exit()

Submission status: Wrong Answer

Solution code:
import sys
a,b = map(int,input().split())
y = [a*(i+2)-(i+1) for i in range(0,a)]

if a == b:
    print(1)
    sys.exit()
for j in range(a-1):
    if y[j] >= b:
        print(j+2)
        sys.exit()

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

c = B % A
if A >= B:
  print(1)
  exit()
  
elif c == 0:
  print( B//A)
  
else:
  print((B//A) + 1)

Submission status: Wrong Answer

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

c = B % A
if A >= B:
  print(1)
  exit()
  
elif c == 0:
  print( B//A)
  
elif c >0:
  print((B//A) + 1)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

x = 0
y = 0
while x < b:
  x += a
  y += 1

print(y)

Submission status: Wrong Answer

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

for i in range(20):
    c = a + (a - 1) * i
    if b <= c:
        print(i + 1)
        break

Submission status: Wrong Answer

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

for i in range(21):
    c = a + (a - 1) * i
    if b <= c:
        print(i + 1)
        break

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
import sys

sys.setrecursionlimit(10 ** 6)
int1 = lambda x: int(x) - 1
printV = lambda x: print(*x, sep="\n")
printH = lambda x: print(" ".join(map(str,x)))
def IS(): return sys.stdin.readline()[:-1]
def II(): return int(sys.stdin.readline())
def MI(): return map(int, sys.stdin.readline().split())
def LI(): return list(map(int, sys.stdin.readline().split()))
def LI1(): return list(map(int1, sys.stdin.readline().split()))
def LII(rows_number): return [II() for _ in range(rows_number)]
def LLI(rows_number): return [LI() for _ in range(rows_number)]
def LLI1(rows_number): return [LI1() for _ in range(rows_number)]

def main():
	a,b = MI()
	n = (b-a)/(a-1)
	if(a>b):print(1)
	elif(n%1==0):print(int(n)+1)
	else:print(int(n)+2)

if __name__ == '__main__':
	main()

Submission status: Wrong Answer

Solution code:
import sys

sys.setrecursionlimit(10 ** 6)
int1 = lambda x: int(x) - 1
printV = lambda x: print(*x, sep="\n")
printH = lambda x: print(" ".join(map(str,x)))
def IS(): return sys.stdin.readline()[:-1]
def II(): return int(sys.stdin.readline())
def MI(): return map(int, sys.stdin.readline().split())
def LI(): return list(map(int, sys.stdin.readline().split()))
def LI1(): return list(map(int1, sys.stdin.readline().split()))
def LII(rows_number): return [II() for _ in range(rows_number)]
def LLI(rows_number): return [LI() for _ in range(rows_number)]
def LLI1(rows_number): return [LI1() for _ in range(rows_number)]

def main():
	a,b = MI()
	n = (b-a)/(a-1)
	if(n%1==0):print(int(n)+1)
	else:print(int(n)+2)

if __name__ == '__main__':
	main()

Submission status: Wrong Answer

Solution code:
import sys

sys.setrecursionlimit(10 ** 6)
int1 = lambda x: int(x) - 1
printV = lambda x: print(*x, sep="\n")
printH = lambda x: print(" ".join(map(str,x)))
def IS(): return sys.stdin.readline()[:-1]
def II(): return int(sys.stdin.readline())
def MI(): return map(int, sys.stdin.readline().split())
def LI(): return list(map(int, sys.stdin.readline().split()))
def LI1(): return list(map(int1, sys.stdin.readline().split()))
def LII(rows_number): return [II() for _ in range(rows_number)]
def LLI(rows_number): return [LI() for _ in range(rows_number)]
def LLI1(rows_number): return [LI1() for _ in range(rows_number)]

def main():
	a,b = MI()
	n = (b-a)/(a-1)
	if(n%1==0):print(int(n))
	else:print(int(n)+1)

if __name__ == '__main__':
	main()

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
import numpy as np
from functools import reduce
from operator import add,sub,mul,truediv
from fractions import gcd

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


ans = 1
x = a

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

print(ans)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

ans = 0   #電源タップの個数
out = 1 #未使用の差込口


while out < B:
    out = out + A
    ans = ans + 1

print(ans)

Submission status: Wrong Answer

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

n = 1   #電源タップの個数
N = A + (A - 1) * (n - 1) #未使用の差込口


while N < B:
    n = n + 1


print(n)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

C = B // A
D = B % A

if D > 0:
    C = C + 1
else:
    pass

print(C)

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

ans = A

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

    print(K)

Submission status: Wrong Answer

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

print(K-1)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

n = a
ans = 1

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

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

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

cnt = 0
d = 0
while True:
    cnt += 1
    d += A

    if d >= B:
        break
    else:
        d -= 1

print(cnt)

Submission status: Wrong Answer

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


def readints():
    return list(map(int, input().split()))


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

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

sum = 0
for i in range(b//a):
    sum += 1
print(sum+1)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
import math


def readints():
    return list(map(int, input().split()))


ans = 0
a, b = map(int, input().split())
if a > b:
    print(0)
    exit()
ans = b/a
print(math.ceil(ans))

Submission status: Wrong Answer

Solution code:
import math


def readints():
    return list(map(int, input().split()))


a, b = map(int, input().split())
if a > b:
    print(0)
    exit()
print(math.ceil(b/a))

Submission status: Wrong Answer

Solution code:
import math


def readints():
    return list(map(int, input().split()))


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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

for i in range(b):
    x += a
    # print(x, end=" ")
    ans += 1
    if x >= b:
        break
    x -= 1
print(ans)

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

Submission status: Wrong Answer

Solution code:
A,B=map(int,input().split())
v=1
w=A
for i in range(B):
  if w<B:
    v+=1
    w+=A-1
  else:
    v=v
print(v)

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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


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

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


if __name__ == "__main__":
    main()

Submission status: Wrong Answer

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


def main():
    A, B = map(int, input().split())
    count = 1
    result = A
    while result < B:
        result += (A - 1)
        count += 1
    print(count)


if __name__ == "__main__":
    main()

Submission status: Wrong Answer

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

import math


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


if __name__ == "__main__":
    main()

Submission status: Wrong Answer

Solution code:
a,b=map(int,input().split())
n=0
#a*n>=bを満たす最小のn
while True:
    if a*n>=b: 
        break
    else:
        n+=1
print(n)

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:
a, b = map(int, input().split())
n = 1
e = a
while n > 0:
  if e >= b:
    print(n)
    n = 0
  else:
    e += a-1
    n += 1

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

cnt = 1
while True:
    if a >= b:
        print(cnt)
        quit()
    a += a
    cnt += 1

Submission status: Wrong Answer

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

cnt = 1
while True:
    if a > b:
        print(cnt)
        quit()
    a += a
    cnt += 1

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

ans = 0
cnt = 0

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

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

    if B <= ans:
        break

    else:
        ans -= 1

print(cnt)

Submission status: Wrong Answer

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

ans = 0
cnt = 0

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

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

    if B <= ans:
        break

    else:
        ans -= 1

print(cnt)

Submission status: Wrong Answer

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

ans = 0
cnt = 0

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

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

    if B <= ans:
        break

    else:
        ans -= 1

print(cnt)

Submission status: Wrong Answer

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

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

    if B <= ans:
        break

    else:
        ans -= 1

print(cnt)

Submission status: Wrong Answer

Solution code:
import sys, re
from collections import deque, defaultdict, Counter
from math import ceil, sqrt, hypot, factorial, pi, sin, cos, radians
from itertools import accumulate, permutations, combinations, product
from operator import itemgetter, mul
from copy import deepcopy
from string import ascii_lowercase, ascii_uppercase, digits
from bisect import bisect, bisect_left
from fractions import gcd
from heapq import heappush, heappop
from functools import reduce
def input(): return sys.stdin.readline().strip()
def INT(): return int(input())
def MAP(): return map(int, input().split())
def LIST(): return list(map(int, input().split()))
sys.setrecursionlimit(10 ** 9)
INF = float('inf')
mod = 10 ** 9 + 7

A, B = MAP()

if B == 1:
	print(0)

ins = 1
for i in range(B):
	ins = ins + A - 1
	if ins >= B:
		print(i + 1)
		exit()

Submission status: Wrong Answer

Solution code:
import sys, re
from collections import deque, defaultdict, Counter
from math import ceil, sqrt, hypot, factorial, pi, sin, cos, radians
from itertools import accumulate, permutations, combinations, product
from operator import itemgetter, mul
from copy import deepcopy
from string import ascii_lowercase, ascii_uppercase, digits
from bisect import bisect, bisect_left
from fractions import gcd
from heapq import heappush, heappop
from functools import reduce
def input(): return sys.stdin.readline().strip()
def INT(): return int(input())
def MAP(): return map(int, input().split())
def LIST(): return list(map(int, input().split()))
sys.setrecursionlimit(10 ** 9)
INF = float('inf')
mod = 10 ** 9 + 7

A, B = MAP()

ins = 1
for i in range(B):
	ins = ins + A - 1
	if ins >= B:
		print(i + 1)
		exit()

Submission status: Wrong Answer

Solution code:
import sys, re
from collections import deque, defaultdict, Counter
from math import ceil, sqrt, hypot, factorial, pi, sin, cos, radians
from itertools import accumulate, permutations, combinations, product
from operator import itemgetter, mul
from copy import deepcopy
from string import ascii_lowercase, ascii_uppercase, digits
from bisect import bisect, bisect_left
from fractions import gcd
from heapq import heappush, heappop
from functools import reduce
def input(): return sys.stdin.readline().strip()
def INT(): return int(input())
def MAP(): return map(int, input().split())
def LIST(): return list(map(int, input().split()))
sys.setrecursionlimit(10 ** 9)
INF = float('inf')
mod = 10 ** 9 + 7

A, B = MAP()

print(ceil(B/A))

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())
if b == 1:
    print(0)
elif 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())

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

print(Ans)

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
def solve():
    N, M = map(int, input().split())

    c = 0
    if M == 1:
        return c

    c += 1
    if N >= M:
        return c
    
    M -= N
    for i in range(2, 100):
        if M - N <= 0:
            return i
        M -= (N-1)

print(solve())

Submission status: Wrong Answer

Solution code:
import sys
from io import StringIO
import unittest

def solve():
    N, M = map(int, input().split())

    c = 0
    if M == 1:
        return c

    c += 1
    if N >= M:
        return c
    
    M -= N
    for i in range(2, 100):
        if M - N <= 0:
            return i
        M -= (N-1)

# print(solve())

# テスト用
def resolve():
    print(solve())

class TestClass(unittest.TestCase):
    def assertIO(self, input, output):
        stdout, stdin = sys.stdout, sys.stdin
        sys.stdout, sys.stdin = StringIO(), StringIO(input)
        resolve()
        sys.stdout.seek(0)
        out = sys.stdout.read()[:-1]
        sys.stdout, sys.stdin = stdout, stdin
        self.assertEqual(out, output)
    def test_入力例_1(self):
        input = """4 10"""
        output = """3"""
        self.assertIO(input, output)
    def test_入力例_2(self):
        input = """8 9"""
        output = """2"""
        self.assertIO(input, output)
    def test_入力例_3(self):
        input = """8 8"""
        output = """1"""
        self.assertIO(input, output)

if __name__ == "__main__":
    unittest.main()

Submission status: Wrong Answer

Solution code:
def solve():
    N, M = map(int, input().split())

    c = 0
    if M == 1:
        return c

    c += 1
    if N >= M:
        return c
    
    M -= N
    for i in range(2, 20):
        if M - N <= 0:
            return i
        M -= (N-1)
    return c

print(solve())

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

while 0 < B-A:
    n = n + 1
    A = A - 1
    A = A + a
    
print(n)

Submission status: Wrong Answer

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

else : 
    print(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())
q = (B-1)//(A-1)
print(q)

Submission status: Wrong Answer

Solution code:
A, B = map(int, input().split())
q = B//A
mod = B % A

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

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

Submission status: Wrong Answer

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

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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


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

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

print(ans)

Submission status: Wrong Answer

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

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

print(ans)

Submission status: Wrong Answer

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

soc=1
if a != b:
	while a<=b :
		soc += 1
		a += a-1
	
if b==1:
	soc = 0
	
print(soc)

Submission status: Wrong Answer

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

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