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())
result = a
cnt = 1
for i in range(b):
    result += a-1
    if result >= b:
        cnt += 1
        break
    cnt += 1
print(cnt)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
a = list(map(int,input().split()))
# sum_a = a[0]+(a[0]-1)+(a[0]-1)
b=0
for i in range(100000000):
   if(i==0):
      b=a[0]
      if(b>=a[1]): 
         break
   else:
      if(b>=a[1]):
         break
      b=b+(a[0]-1)

print(i)

Submission status: Wrong Answer

Solution code:
a = list(map(int,input().split()))
# sum_a = a[0]+(a[0]-1)+(a[0]-1)
sum_a=0
for i in range(100000000):
   if(i==0):
      if(sum_a>=a[1]):
         break
      sum_a=a[0]
   else:
      if(sum_a>=a[1]):
         break
      sum_a=sum_a+(a[0]-1)

print(i)

Submission status: Wrong Answer

Solution code:
a = list(map(int,input().split()))
# sum_a = a[0]+(a[0]-1)+(a[0]-1)
sum_a=0
for i in range(100000000):
   if(sum_a>=a[1]):
      break
   if(i==0):
      sum_a=a[0]
   else:
      sum_a=sum_a+(a[0]-1)

print(i)

Submission status: Wrong Answer

Solution code:
a = list(map(int,input().split()))
# sum_a = a[0]+(a[0]-1)+(a[0]-1)
sum_a=0
for i in range(100000000):
   if(sum_a>a[1]):
      break
   if(i==0):
      sum_a=a[0]
   else:
      sum_a=sum_a+(a[0]-1)

print(i)

Submission status: Wrong Answer

Solution code:
a = list(map(int,input().split()))
# sum_a = a[0]+(a[0]-1)+(a[0]-1)
sum_a=0
for i in range(10000000000000):


   if(i==0):
      sum_a=a[0]
   else:
      sum_a=sum_a+(a[0]-1)
   if(sum_a>=a[1]):
      break
print(i)

Submission status: Wrong Answer

Solution code:
a = list(map(int,input().split()))
# sum_a = a[0]+(a[0]-1)+(a[0]-1)
sum_a=0
for i in range(100000000):

   if(sum_a>=a[1]):
      break
   if(i==0):
      sum_a=a[0]
   else:
      sum_a=sum_a+(a[0]-1)

print(i)

Submission status: Wrong Answer

Solution code:
a = list(map(int,input().split()))
# sum_a = a[0]+(a[0]-1)+(a[0]-1)
sum_a=0
for i in range(1000):

   if(sum_a>=a[1]):
      break
   if(i==0):
      sum_a=a[0]
   else:
      sum_a=sum_a+(a[0]-1)

print(i)

Submission status: Wrong Answer

Solution code:
A, B = (int(n) for n in input().split())
B-=A
cnt = 1
#print(B)
while(B>0):
    B-=(A-1)
    cnt+=1
    #print(B)
print(str(cnt))

Submission status: Wrong Answer

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

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

print(ans)

Submission status: Wrong Answer

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

ans = 0
value = 0

while True:
  if value < B:
    value += A
    ans += 1
  else:
    break

print(ans)

Submission status: Wrong Answer

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

kuti = a
ans = 1

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

Submission status: Wrong Answer

Solution code:
A, B = (int(n) for n in input().split())
B-=A
cnt = 1
while(B>0):
    B-=(A-1)
    cnt+=1
print(cnt)

Submission status: Wrong Answer

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

a = A
num = 1

while True:
    if a >= B:
        break
    a += A
    a -= 1

    num += 1
print(num)

Submission status: Wrong Answer

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

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

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

print(count)

Submission status: Wrong Answer

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

a = A
num = 1

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

Solution code:
a,b = [int(x) for x in input().split()]
print((b-1)//(a-1))

Submission status: Wrong Answer

Solution code:
# coding: utf-8

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

num = 0

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

Submission status: Wrong Answer

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

num = 0

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

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

if B == 1:
    C = 0

print(C)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

x = 0
i = 0
while x<b:
    i+=1
    x = a+(a-1)*(i-1)

print(i)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

elif(B ==1):
    print(0)
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:
a,b = map(int,input().split())
c =1

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


print(c)

Submission status: Wrong Answer

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

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

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

print(cnt)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

print(c)

Submission status: Wrong Answer

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

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

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

print(cnt)

Submission status: Wrong Answer

Solution code:
a, b = (int(i) for i in input().split())
from math import ceil
print(ceil(b/a))

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
import math
#入力
A = input().split()

#計算
N = 0
b = 0
a = 0

a = int(A[0]) - 1

b = int(A[1]) + (int(A[0]) - int(a))
N = b / int(A[0])

#出力
print(math.ceil(N))

Submission status: Wrong Answer

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

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

x = 0
i = 0
while x<=b:
    i+=1
    x = a+(a-1)*(i-1)

print(i)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:

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

count = 0

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

Submission status: Wrong Answer

Solution code:
import sys
import math

x = sys.stdin.readline().strip().split(' ')
a = int(x[0])
b = int(x[1])

n = math.floor(1.0 * b / (a - 1))
print(n)

Submission status: Wrong Answer

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

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

x = 0
i = 0
while x<b:
    i+=1
    x = a + (a-1)*(i-1)

print(i)

Submission status: Wrong Answer

Solution code:
import sys

x = sys.stdin.readline().strip().split(' ')
a = int(x[0])
b = int(x[1])

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

print(n)

Submission status: Wrong Answer

Solution code:
a,b=map(int,input().split())
ans=0
if a>b:
  print(0)
else:
  for i in range(1,1000):
    if (a*i)>=b:
      ans=i
      break
  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((A//B)+1)

Submission status: Wrong Answer

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

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

x = 0
i = 1
while True:
    x = a + (a-1)*(i-1)
    if x<b:
        i+=1
    else:
        break

print(i)

Submission status: Wrong Answer

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

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

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

Submission status: Wrong Answer

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

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

x = 0
i = 1
while True:
    x = a + (a-1)*i
    if x<b:
        i+=1
    else:
        break

print(i)

Submission status: Wrong Answer

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

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

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


else:
	print((A//B)+1)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
# B - Power Socket
A, B = map(int, input().split())

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

x = 0
i = 0
while True:
    x = a + (a-1)*i
    if x<b:
        i+=1
    else:
        break

print(i)

Submission status: Wrong Answer

Solution code:
a, b = (int(_) for _ in input().split())
total = 1
ans = 0
if b == 1:
    print(1)
else:
    while total < b:
        total -= 1
        total += 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(A//B+1)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
import math

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

ans = 0

if a >= b:
    ans = 1
elif b == 1:
    ans = 0
else:
    ans = (math.floor((b / 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 B == 1:
    print(0)
    exit()

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

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

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

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())
hyoka1 = (B//A) * A - (B//A-1)
hyoka2 = (B//A+1) *A - (B//A)
if hyoka1 == B:
  print(B//A)
elif hyoka1 < B and B <= hyoka2 :
  print(B//A+1)
else:
  print(B//A+2)

Submission status: Wrong Answer

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

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

else:
	C = (B//A)
	D = B%A
	if D+(C-1)<=A:
		print(C+1)
	else:
		print(C+2)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
a,b = map(int, input().split())
check = b
ans = 0
while check > a:
    ans += check//a
    left = + check%a
    if left == a:
        left =0
        ans +1
        # check -= 1
    check = check//a

print (ans+1)

Submission status: Wrong Answer

Solution code:
import sys

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

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

main()

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

while(1):
    if b == 1:
        print(ans)
        exit()
    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:
a,b=map(int,input().split())
x=a+b
if x%a==0:
  print(x//a-1)
else:
  print(x//a)

Submission status: Wrong Answer

Solution code:
a,b = map(int, input().split())
check = b
ans = 0
while check > a:
    ans += check//a
    left = + check%a
    if left == a:
        left =0
        ans +1
        check -= 1
    check = check//a

print (ans+1)

Submission status: Wrong Answer

Solution code:
from math import ceil

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

def ans(a, b):
	if b == a:
		return(1)
	elif b % a == a - 1 and b // a == 2:
		return(4)
	elif b % a == 0:
		return(b // a + 1)
	else:
		return(ceil(b / a))

print(ans(a, b))
      
# for i in range(2, 4):
# 	for j in range(1, 21):
# 		print(i, j, ans(i, j))

Submission status: Wrong Answer

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

if a[1]/a[0]==1:
    print(1)
else:
    b=a[1]/a[0]
    if b==1:
        print(2)
    else:
        c=b*(a[0]-1)+a[0]
        if c>=a[1]:
            print(b+1)
        if c<a[1]:
            print(b+2)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

else :
    print(int(a[1]/a[0]+1))

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

Submission status: Wrong Answer

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

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

x = 0
i = 0
while x < b:
    x = a + (a-1)*i
    i+=1

print(i)

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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 = a
  cnt = 1
  while tmp < b:
    tmp += a-1
    if tmp < b:
      tmp += 1
    cnt += 1
  print(cnt)

main()

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 = int(b/N[0])
if N[0] >= N[1]:
  print(1)
elif N[0]*(a+1)-a >= N[1]:
  print(a+1)
else:
  print((a+1)+(c+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 += (a - 1)
		if tmp >= b:
			print count
			break

Submission status: Wrong Answer

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

else:
	C = (B//A)
	D = B%A
	if D+(C-1)<=A:
		print(C+1)
	else:
		print(C+2)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
import sys

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

def main():
  a, b = na()
  
  tmp = a
  cnt = 1
  while tmp < b:
    tmp += a-1
    if tmp > b:
      break
    cnt += 1
  print(cnt)

main()

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 += a[0] - 1
            if n >= a[1]:
                print(i)
                break

Submission status: Wrong Answer

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

need = 1
tap = a

if b >= 20 :
	b = 20

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:
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)
elif N[0]*(a+1)-a >= N[1]:
  print(a+1)
elif N[0]*(a+1)-a < N[1]:
  print((a+1)+(c+1))

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

flag = True
count = 0
ans = 0
while flag:
    if ans == 0:
      count += a
      ans += 1
    else:
      count += a-1
      ans+=1
    if count >= b:
        flag = False
print(ans)

Submission status: Wrong Answer

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

ans = 0

while b > 0:
    if b - ( a - 1 ) > a:
        b -= a - 1
        ans += 1
    else:
        b -= a
        ans += 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

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

Submission status: Wrong Answer

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

need = 1
tap = a

if b <= 20 :
	b = 20

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:
import sys

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

if a >= 20 and a <= 2:
    sys.exit()
if b >= 20 and b <= 1:
    sys.exit()

while True:
        add_value += 1
        a *= add_value
        if a >= b:
            break


print(add_value)

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
    if a > b:
        break

print(count)

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

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

Submission status: Wrong Answer

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

count = 1 

kuchi = a

while kuchi < b :
    count+=1
    kuchi = (a - 1) * count + 1
else :
    print(count)

Submission status: Wrong Answer

Solution code:

def test_b():
    A,B=(int(x) for x in input().split())
    tap_n=0
    while True:
        tap_n+=1
        out=A+(A-1)*(tap_n-1)
        if out>=B:
            tap_num=tap_n
            break
    print(tap_num)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
line = input().split(" ")
 
n = 0
 
while n >= 0:
	if n*(int(line[0])-1)+int(line[0]) < int(line[1]):
		n += 1
	else:
		break
 
print(n+1)

Submission status: Wrong Answer

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

flag = True
count = 0
ans = 0
while flag:
    if ans == 0:
      count += a
      ans += 1
    else:
      count += a-1
    if count >= b:
        flag = False
print(ans)

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

main()

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+(a-1)*(c-2)==b-1:
    print(c-1)
else :
    print(c)

Submission status: Wrong Answer

Solution code:
A, B = map(int, input().split())
diff = A - 1
a = []
for j in range(A):
    a.append(1)
for j in range(2,(20-A)//diff+2):
    for k in range(diff):
        a.append(j)
n = a[len(a)-1]+1
for i in range(len(a), 20):
    a.append(n)
print(a[B-1])

Submission status: Wrong Answer

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

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

    if a > b:
        return 0
    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:
s=list(map(int,input().split()))
num=1
cost=s[0]
while cost < s[1]:
    num+=1
    cost+=(s[0]-1)
print(num)

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:
			print count
			break

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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)
elif N[0]*(a+1)-a >= N[1]:
  print(a+1)
else:
  print((a+1)+(c+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
while(1):
    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:
a, b = map(int, input().split())

count = 1 

kuchi = a

while kuchi < b :
    count+=1
    kuchi = a * count - count + 1
else :
    print(count)

Submission status: Wrong Answer

Solution code:
from math import ceil

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

if b == a:
	print(1)
elif b % a == a - 1:
	print(4)
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())
n = 1
while A*n-(n-1) < B:
    n += 1
print(n)

Submission status: Wrong Answer

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

flag = True
count = 0
ans = 0
while flag:
    count += a-1
    ans += 1
    if count >= b:
        flag = False
print(ans)

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:
			print count
			break

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

print(count)

Submission status: Wrong Answer

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

cnt = 0

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

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()
	elif i*(a-1) + a >= b:
		print(i+1)
		exit()
	else:
		i+=1

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

Submission status: Wrong Answer

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