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 = list(map(int,input().split()))
t = 0
if a[1] > a[0]:
  for i in range(1,99):
    t = (a[0] - 1)*i + a[0]
    if t > a[1]:
      break
  print(i)
 
  
elif a[1] == 1:
  print(0)
else :
  print(1)

Submission status: Wrong Answer

Solution code:
N = list(map(int, input().split()))
a = int(N[1]/N[0])
b = N[1] - (N[0]*(a+1)-a)
c = b/N[0]
if N[0] >= N[1]:
  print(1)
else:
  print((a+1)+(b+1))

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
import sys

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

if a >= 20 and a <= 2:
    if b >= 20 and b <= 1:
        sys.exit()
else:
    while True:
            add_value += 1
            a *= add_value
            if a >= b:
                break


print(add_value)

Submission status: Wrong Answer

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

for i in range(20):
    if b > count:
        count += a-1
    else:
        break
c = -(-count // a)
if a % b == 0:
    print(c + 1)
elif count // a >= 1:
    print(c)
else:
    print(0)

Submission status: Wrong Answer

Solution code:


import sys
input = sys.stdin.readline
sys.setrecursionlimit(10**6)
##############################

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

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

count = 2
B -= (A-1)
while True:
    if A >= B:
        print(count)
        exit()

    count += 1
    B -= (A-1)

Submission status: Wrong Answer

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

if a >= b:
	print 1
else:
	count = 1
	while True:
		count +=1
		tmp += tmp + a -1
		if tmp >= b:
			break
	print count

Submission status: Wrong Answer

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

space = 0
ans = 0
cnt = 0

while(True):
  if a == b:
    ans += 1
    break
  if cnt == 0:
    space += a
  else:
    space += a-1
  ans += 1
  if (space > b):
    break

print(ans)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

need = 1
tap = a


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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

# スペース区切りの整数の入力
a, b  = map(int, input().split())

if b <= 1:
    print(0)
    
elif a > b:
    
    print(1)
    
else:
    c=b//(a-1)
    d=c*(a-1)+1

    if b > d:
        print(c+1)
    else:
        print(c)

Submission status: Wrong Answer

Solution code:
s = input().split()
a = int(s[0])
b = int(s[1])
#print(a,b)
n = 1
x = a
if a >= b:
  print(n)
  exit()
while b >= x:
  n +=1
  x = a + (a-1)*(n-1)
print(n)

Submission status: Wrong Answer

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

checker = True

if b==1:
    print(0)
    checker = False

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

    
counter = 1
tmp = a

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

a, b = MAP()
ans = 0
for i in range(100):
    if ans == 0:
        b -= a
        ans += 1
    else:
        if b <= 0:
            print(ans)
            exit()
        else:
            b -= (a-1)
            ans += 1

    

# n = INT()
# a, b, c = MAP()
# ans = 1
# # count = 0
# count = a
# flag = False
# # for i in range(30):
# while flag == False:
#     if count >= b:
#         flag = True    
#     else:
#         count += a-1
#         ans += 1
# print(ans)





# k = 1
# count = 0
# ans = 0
# A = []


# count += a
# ans += 1


# while(1):
#     if count >= b:
#         print(ans)
#         exit()
#     else:
#         count += a-1
#         ans += 1
#         # print()




# count += a
# ans += 1

# for i in range(100):
#     if b <= count:
#         print(ans)
#         exit()

#     else:
#         count += a-1
#         ans += 1 
#         # print(ans)

# for i in range(30):
# while(1):
#     count += a
#     ans += 1
#     print(count)

#     if b <= count:
#         print(ans)
#         exit()
#     else:   
#         count = count-1
#     # print(ans)
    
    # # A.append(a)
    # # if sum(A)
    # if count == 0:
    #     count += a
    #     ans += 1
    # else:
    #     count += a-1
    #     ans += 1
    # print(count)
    # print(ans)
    # if b<=count:
    #     # print(count)
    #     print(ans)
    #     exit()

Submission status: Wrong Answer

Solution code:
P = [int(_) for _ in input().split()]
A = P[0]
B = P[1]

C = int(B/A)

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

print(C)

Submission status: Wrong Answer

Solution code:
inp = input ()

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

count = 1
usable = a

while usable < b:
    count += 1
    usable = count*a - (count - 1)


print (count)

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

cnt = 0

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

Submission status: Wrong Answer

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

need = 1
tap = a


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

Submission status: Wrong Answer

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

checker = True

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

if b==1:
    print(0)
    checker = False
    
counter = 1
tmp = a

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

Submission status: Wrong Answer

Solution code:
inp_list = input().split(" ")


A = int(inp_list[0])
B = int(inp_list[1])

A -= 1

result = B - A
print(result)

Submission status: Wrong Answer

Solution code:
A = input().split()
count = 1
a = int(A[0])
b = int(A[1])
c = a
while a < b:
    a += c - 1
    count += 1
    print(a)
    if a >= b:
        break

print(count)

Submission status: Wrong Answer

Solution code:
# -*- coding: utf-8 -*-
a,b = map(int, raw_input().split())
count = 1
tmp = b-a

if a >= b:
	print 1
else:
	while True:
		count +=1
		tmp += tmp + a -1
		if tmp >= b:
			break
	print count

Submission status: Wrong Answer

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

count = 1 

kuchi = a

while kuchi < b :
    count+=1
    kuchi = a * count - count + 1

print(count)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

    a = list(map(int, input().split()))
    n = deepcopy(a[0])
    i = 1
    if a[0] == a[1]: print(i)
    elif a[0] > a[1]: print(i)
    else:
        while True:
            i += 1
            n -= 1
            n += a[0]
            if n >= a[1]:
                print(i)
                break

Submission status: Wrong Answer

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

need = 1
tap = a


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

Submission status: Wrong Answer

Solution code:
import sys

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

if a >= 20 and a <= 2:
    if b >= 20 and b <= 1:
        while True:
            add_value += 1
            a *= add_value
            if a >= b:
                break
else:
    sys.exit()


print(add_value)

Submission status: Wrong Answer

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

checker = True

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

if b==0:
    print(0)
    checker = False
    
counter = 1
tmp = a

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
a,b = input().split()
a = int(a)
b = int(b)
A = a
flag = 0
def x(A):
    global b,flag
    if A>=b:
        flag+=1
    else:    
        A = A+(a-1)
        flag+=1
        x(A)
    
    return flag
x(A)

Submission status: Wrong Answer

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

need = 1
tap = a


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

Submission status: Wrong Answer

Solution code:
import sys

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

if a >= 20 and a <= 2:
    if b >= 20 and b <= 2:
        while True:
            add_value += 1
            a *= add_value
            if a >= b:
                break
else:
    sys.exit()


print(add_value)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
s = input().split()
a = int(s[0])
b = int(s[1])
#print(a,b)
n = 1
x = a
if a >= b:
  print(n)
  exit()
while b > x:
  n +=1
  x = a + (a-1)*(n-1)
print(n)

Submission status: Wrong Answer

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

ans = 1

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

print(ans)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
a,b = [int(x) for x in input().split()]
def extend(x,a,b,n):
  assert x>=1
  if x >= b:
    return n
  else:
    n += 1
    extended =  x - 1 + a
    return extend(extended, a, b, n)
extend(1, a, b, 0)

Submission status: Wrong Answer

Solution code:
import sys

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

def main():
  a, b = na()
  
  tmp = 0
  cnt = 0
  while tmp < b:
    tmp += a
    cnt += 1
  print(cnt)

main()

Submission status: Wrong Answer

Solution code:
a,b = map(int,input().split())
if a==b:
    print(1)
elif b<=2*a -1:
    print(2)
elif b<= a +2*(a -1):
    print(3)
elif b<= a +3*(a -1):
    print(4)
elif b<= a +4*(a -1):
    print(5)
elif b<= a +5*(a -1):
    print(6)
elif b<= a +6*(a -1):
    print(7)
elif b<= a +7*(a -1):
    print(8)
elif b<= a +8*(a -1):
    print(9)
elif b<= a +9*(a -1):
    print(10)
elif b<= a +10*(a -1):
    print(11)
elif b<= a +11*(a -1):
    print(12)
elif b<= a +12*(a -1):
    print(13)
elif b<= a +13*(a -1):
    print(14)
elif b<= a +14*(a -1):
    print(15)
elif b<= a +15*(a -1):
    print(16)
elif b<= a +16*(a -1):
    print(17)
elif b<= a +17*(a -1):
    print(18)
elif b<= a +18*(a -1):
    print(19)
elif b<= a +19*(a -1):
    print(20)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

# スペース区切りの整数の入力
a, b  = map(int, input().split())

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

    if b > d:
        print(c+1)
    else:
        print(c)

Submission status: Wrong Answer

Solution code:
import sys
A,B = map(int, input().split())
akikuti =A
ans =1
if (akikuti >= B ):
    print(ans)

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

Submission status: Wrong Answer

Solution code:
# from math import factorial
# from collections import defaultdict, deque
#  from heapq import heappush, heappop

# A, B = [int(i) for i in input().split(" ")]
# A = int(input())
# As = [int(i) for i in input().split(" ")]
# Ss = ["".join(sorted(input())) for _ in range(N)]
# A = int(input())

A, B = [int(i) for i in input().split(" ")]
total = A
ans = 1
while True:
   if B <= total: break
   ans += 1
   total += A  -1
print(ans)

Submission status: Wrong Answer

Solution code:

import sys
input = sys.stdin.readline
sys.setrecursionlimit(10**6)
##############################

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

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

count = 2
B -= (A-1)
while True:
    if A >= B:
        print(count)
        exit()

    count += 1
    B -= (A-1)

Submission status: Wrong Answer

Solution code:
from math import ceil

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

while ans<=b:
    ans+=a-1
    aa+=1
    c+=1
aa=0
ans=a


if a*2+(a-1)*(c-3)==b:
    print(c-1)
else:
    print(c)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

Solution code:
# -*- coding: utf-8 -*-
A, B = [int(i) for i in input().split()]

l = [0]
X = 0
if A == B:
    print(1)
elif A >= B:
    print(1)
else:
    while X < B:
        for i in l:
            X += A + (A - 1) * i
    Y = (X - A) // (A - 1)
    if (X - A) % (A - 1) == 0:
       print(Y)
    else:
        print(Y + 1)

Submission status: Wrong Answer

Solution code:
def _input():
    array = input().split()
    number_array = []
    for i in array:
        number_array.append(int(i))
    return number_array[0], number_array[1]

def number_of_taps(a, b):
    result = 1
    tmp = a
    while True:
        if a >= b:
            break
        result += 1
        a = result * tmp

    return result

if __name__ == "__main__":
    a,b = _input()
    print(number_of_taps(a,b))

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

    a = list(map(int, input().split()))
    n = deepcopy(a[0])
    i = 1
    if a[0] == a[1]: print(i)
    else:
        while True:
            i += 1
            n -= 1
            n += a[0]
            if n >= a[1]:
                print(i)
                break

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

Solution code:
N = list(map(int, input().split()))
a = int(N[1]/N[0])
if N[0] >= N[1]:
  print(1)
elif N[0]*(a+1)-a >= N[1]:
  print(a+1)
else:
  print(a+2)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

print(c)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
import sys
A,B = map(int, input().split())
akikuti =A
ans =1
if (akikuti >= B ):
    print(ans)

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

Submission status: Wrong Answer

Solution code:
import sys

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

def main():
  a, b = na()
  if a == b:
    print(1)
  else:
    print(b//a+1)

main()

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

cur = a

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

Submission status: Wrong Answer

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

while ans<=b:
    ans+=a-1
    aa+=1
    c+=1
aa=0
ans=a
print(c)


if a*2+(a-1)*(c-3)==b:
    print(c-1)
else:
    print(c)

Submission status: Wrong Answer

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

count = 1

kuchi = a

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

Submission status: Wrong Answer

Solution code:

import sys
input = sys.stdin.readline
sys.setrecursionlimit(10**6)
##############################

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

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

count = 2
B -= A
while True:
    if A >= B:
        print(count)
        exit()

    count += 1
    B -= A

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

cnt = 0

for i in range(a):
  if a*i >= b:
    print(i)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
S = list(input().split())

A = int(S[0])
B = int(S[1])

C = (B-A)/(A-1)+1

print(int(C))

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

for i in range(20):
    if b > count:
        count += a-1
    else:
        break
c = -(-count // a)
if a == b:
    print(c + 1)
elif count // a >= 1:
    print(c)
else:
    print(0)

Submission status: Wrong Answer

Solution code:
# -*- coding: utf-8 -*-
a, b = map(int, input().split())
plugs = a
ans = 1
while True:
    if plugs >= b:
        break
    else:
        ans += 1
        plugs += a - 1
print(ans)

Submission status: Wrong Answer

Solution code:
a,b = [int(x) for x in input().split()]
n = 0
def extend(x,a,b,n):
  assert x>=1
  if x >= b:
    return n
  else:
    n += 1
    extended =  x - 1 + a
    return extend(extended, a, b, n)

Submission status: Wrong Answer

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

sasi = a;
answer = 1;

while(sasi < b):
    sasi = sasi + a - 1;
    answer += 1;
print(answer)

Submission status: Wrong Answer

Solution code:
import sys

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

def main():
  a, b = na()

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

main()

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

ans = 1

if b == 1:
  ans = 0
else:
  while a < b:
    ans += 1
    a = a * 2

print(ans)

Submission status: Wrong Answer

Solution code:

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

count = 1

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

Submission status: Wrong Answer

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

if b <= a:
  c = 1
else:
  d = b-a
  c = int(d / (a-1)) + 1

print(c)

Submission status: Wrong Answer

Solution code:
# -*- coding: utf-8 -*-
A, B = [int(i) for i in input().split()]

l = [0]
X = 0
if A == B:
    print(1)
else:
    while X < B:
        for i in l:
            X += A + (A - 1) * i
    Y = (X - A) // (A - 1)
    if (X - A) % (A - 1) == 0:
       print(Y)
    else:
        print(Y + 1)

Submission status: Wrong Answer

Solution code:
from math import ceil

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

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

Submission status: Wrong Answer

Solution code:
i=1
a=[int(i) for i in input().split(" ")]
c=a[0]
while 1 :
    if c>=a[1]:
        print(i)
        break
    c=c+(a[0]-1)
    i=i+1

Submission status: Wrong Answer

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

    a = list(map(int, input().split()))
    n = deepcopy(a[0])
    i = 1
    while True:
        i += 1
        n -= 1
        n += a[0]
        if n >= a[1]:
            print(i)
            break

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
import sys

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

def main():
  a, b = na()

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

main()

Submission status: Wrong Answer

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

count = 1

kuchi = a

while True :
    if kuchi >= b :
        break
    kuchi = kuchi + a - 1
    count +=1
    

print(count)

Submission status: Wrong Answer

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

for i in range(2, 12):
    if A >= B:
        print(1)
        break
    A_new = A * i
    if A_new >= B:
        print(i)
        break

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

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

print(c)

Submission status: Wrong Answer

Solution code:
s = input().split()
a = int(s[0])
b = int(s[1])
#print(a,b)
n = 1
x = a
if a >= b:
  print(n)
  exit()
while b > x:
  n +=1
  x = a + (a-1)*n-1
print(n)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

ans = 1

while a < b:
  ans += 1
  a = a * 2

print(ans)

Submission status: Wrong Answer

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

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

a, b = MAP()
# n = INT()
# a, b, c = MAP()
ans = 1
# count = 0
count = a
flag = False
# for i in range(30):
while flag == False:
    if count >= b:
        flag = True    
    else:
        count += a-1
        ans += 1
print(ans)





# k = 1
# count = 0
# ans = 0
# A = []


# count += a
# ans += 1


# while(1):
#     if count >= b:
#         print(ans)
#         exit()
#     else:
#         count += a-1
#         ans += 1
#         # print()




# count += a
# ans += 1

# for i in range(100):
#     if b <= count:
#         print(ans)
#         exit()

#     else:
#         count += a-1
#         ans += 1 
#         # print(ans)

# for i in range(30):
# while(1):
#     count += a
#     ans += 1
#     print(count)

#     if b <= count:
#         print(ans)
#         exit()
#     else:   
#         count = count-1
#     # print(ans)
    
    # # A.append(a)
    # # if sum(A)
    # if count == 0:
    #     count += a
    #     ans += 1
    # else:
    #     count += a-1
    #     ans += 1
    # print(count)
    # print(ans)
    # if b<=count:
    #     # print(count)
    #     print(ans)
    #     exit()

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
inp = input ()

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

count = 1
space = a

while space < b:
    space += a-1
    count += 1

print (count)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
a, b = map(int, input().split())
cnt = 0
cnt_total = 0
if a == b: print(1)
elif a < b:
        for i in range(b):
                cnt += a
                cnt_total += 1
                if cnt >= b:
                        break
        print(cnt_total)
elif a > b:
        for i in range(b):
                cnt += a
                cnt_total += 1
                if cnt >= b:
                        break
        print(cnt_total)

Submission status: Wrong Answer

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

n=1
while 1:
    if A>=B:
        break
    else:
        n+=1
        A+=A-1

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

Submission status: Wrong Answer

Solution code:


import sys
input = sys.stdin.readline
sys.setrecursionlimit(10**6)
##############################

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

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

count = 1
B -= A
while True:
    count += 1
    if A > B:
        print(count)
        exit()

    B -= A

Submission status: Wrong Answer

Solution code:
import math

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

ans = 0

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

print(ans)

Submission status: Wrong Answer

Solution code:
a,b=map(int,input().split())
s=a
n=1
m=0
if b==1:
    print(m)
for i in range(2100):
    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())
cnt=1
while a<b:
    a+=(a-1)       
    cnt+=1
if a==b:
    cnt=1
print(cnt)

Submission status: Wrong Answer

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