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())  
res = 1
while 1:
  if a *(res -1) < b:
    res = res + 1
    print(a,"個口を",res,"つ使うと未使用は、",a *(res -1))
  else:
    break
print(res)

Submission status: Wrong Answer

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

import math
A, B = map(int, input().split())
if B==1:
    print(0)
else:
    count = 0
    while True:
        B -= A
        if B > 0:
            B += 1
            count += 1
        else:
            break
    print(count)

Submission status: Wrong Answer

Solution code:
a, b =[int(_) for _ in input().split()]
ans = 1
c = a
while 1:
    if c >=b:
        break
    ans+=1
    c += a-1
print(ans)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

checker = True

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())
cnt = 1;
total = A
while total < B:
  cnt += 1
  total += A-1
print(cnt)

Submission status: Wrong Answer

Solution code:
#import math

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

#if A >= B: # B-A <=0 
#    print(1)
#else:
#    out = math.ceil((B-A) / (A-1)) + 1
#    print(out)

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

print(count)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
#double underscore makes a class variable or a class method private
mod = 1000000007
ii = lambda :  int(input())
si = lambda :  input()
dgl = lambda : list(map(int, input()))
f = lambda :   map(int, input().split())
il = lambda :  list(map(int, input().split()))
it = lambda :  tuple(map(int, input().split()))
ls = lambda :  list(input())
a, b=f()
sm=a
c=1
while 1:
    if sm>=b:
        break
    sm+=a-1
    c+=1
print(c)

Submission status: Wrong Answer

Solution code:
s,t=map(int,input().split())
kuti=0
kosuu=0

while kuti<=t:
    kuti=kuti+s-1
    kosuu=kosuu+1

print(kosuu-1)

Submission status: Wrong Answer

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

if a >= b:
    print(1)
    exit()
from math import ceil
print(ceil( (b-1) / (a-1) ) )

Submission status: Wrong Answer

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

if b < c:
  print(c//b+1)
else:
  print(1)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

print(ans)

Submission status: Wrong Answer

Solution code:
a, b = map(int, input().split())
# n個さしたら口はn*a-(n-1) = a*n-n+1個
for i in range(1,21):
  if a*i - i + 1 >= b:
    n = i
    break
    
print(n)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
import math

a, b = input().strip().split(' ')
a, b = [int(a), int(b)]
if b - a < 0:
    ans = 1
else:
    n = b - a
    ans = 1
    while n > 0:
        n = n + 1 - a
        ans = ans + 1

print(ans)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
import sys
import math
from fractions import gcd
# import queue
# from collections import Counter
# from itertools import accumulate
# from functools import reduce

def lcm(a, b):
    return a * b // gcd(a, b)

def combination_count(n, r):
    return math.factorial(n) // (math.factorial(n - r) * math.factorial(r))

def permutations_count(n, r):
    return math.factorial(n) // math.factorial(n - r)

big_prime = 1000000007

"""
# 標準入力取得
## 文字列
 =  sys.stdin.readline().rstrip()
 =  list(sys.stdin.readline().rstrip())

## 数値
 =  int(sys.stdin.readline())
 =  map(int, sys.stdin.readline().split())
 =  list(map(int, sys.stdin.readline().split()))
 =  [list(map(int,list(sys.stdin.readline().split()))) for i in range(N)]
"""
a,b=  map(int, sys.stdin.readline().split())

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

c = 1
t = a
while t<b:
    c+=1
    t+=a-1
print(c)

Submission status: Wrong Answer

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

def inq(x, n):
    if B == 1:
        return 0
    if B <= x:
        return n
    if n != 1:
        return inq(x + A-1, n+1)
    else:
        return inq(x + A, n+1)

print(inq(A, 1))

Submission status: Wrong Answer

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

if B <= A:
  Answer = 1
elif (B -A) %(A-1)==0:
  Answer = 1 + (B-A)//(A-1)
else:
  Answer = 2 + (B-A)//(A-1)

print(Answer)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:

A, B = map(int, input().split())
tap = 1
result = 0
while B >= A:
    A += (A - 1)
    result += 1

print (result)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
x,y = map(int,input().split())
i =1
while x*i<y:
  i+=1;
print(i)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

print(i+k)

Submission status: Wrong Answer

Solution code:
from sys import stdin

a,b = list(map(int,stdin.readline().rstrip().split()))

i = 1

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

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
a, b = [int(c) for c in input().split(' ')]
num = 0
bdash = b
if b == 1:
    num = 1
    bdash = -1
while bdash > 0:
    if bdash == a:
        num = num+1
        break
    elif bdash > a:
        num = num+1
        bdash = bdash - (a - 1)
    elif bdash < a:
        num = num + 1
        break
print(num)

Submission status: Wrong Answer

Solution code:
import sys
import math

line = sys.stdin.readlines()
a, b = line[0].split(' ')
print(math.ceil(int(b)/int(a)))

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

if b < c:
  print(c//b)
else:
  print(1)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

import numpy as np


def calc(A: int, B: int) -> int:
    return int(np.ceil(B / A))


def load_input_as_int_array() -> np.ndarray:
    return np.array([int(v) for v in input().split(" ")])


def main() -> None:
    A, B = load_input_as_int_array()
    result = calc(A, B)
    print(result)


main()

Submission status: Wrong Answer

Solution code:
import sys
stdin = sys.stdin
sys.setrecursionlimit(10**9)
 
ni = lambda: int(ns())
na = lambda: list(map(int, stdin.readline().split()))
nn = lambda: list(stdin.readline().split())
ns = lambda: stdin.readline().rstrip()

a,b = na()

import math

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
import math

num = list(input().split(" "))
a = int(num[0])
b = int(num[1])
multi = 1

while True:
  if multi == 1:
  	cnt = a * multi
  else:
    cnt = a * multi - 1
  if cnt >= b:
    break
  multi += 1

print(multi)

Submission status: Wrong Answer

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

    a = list(map(int, input().split()))
    print(ceil(a[1]/a[0]))

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

print(i+k)

Submission status: Wrong Answer

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

ans = 0

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

def inq(x, n):
    if B <= x:
        return n
    if n != 1:
        return inq(x + A-1, n+1)
    else:
        return inq(x + A, n+1)

print(inq(A, 1))

Submission status: Wrong Answer

Solution code:
A,B=map(int,input().split())
num=0
if A!=B:
  num=int(B//A)+1
  if num*A-(num-1)>=B:
    print(num)
  else:
    val=B-(num*A-(num-1))
    add=int(val//(A-1))+1
    print(num+add)
else:
  print(1)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

cnt = 0
tmp = a
while tmp <= b:
    cnt += 1
    tmp += a-1

print(cnt)

Submission status: Wrong Answer

Solution code:
n = list(map(int, input().split(' ')))
sum = n[1]
cnt = 1
for i in range(1,20):
    sum = sum - n[0]
    if sum <= 0 :
        break
    else:
        sum += 1
    cnt += 1
print(cnt)

Submission status: Wrong Answer

Solution code:
A_B = input()
A_B_list = A_B.split(" ")

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

socket = 1
result = 0

result = (B // (A - 1)) + 1
if (A-1) * (result-1) + 1 == B:
    result -= 1

print(result)

Submission status: Wrong Answer

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

count=0
C=1
for i in range(20):
    C=C-1
    C=C+A
    count+=1
    if B-C <= 0:
        break
print(count)

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

Solution code:
a,b = [int(i) for i in input().split()]
counter = 1
current = a
while current < b:
    current -= 1
    counter += 1
    if current + a == b:
        current += a
    else:
        current += a
print(counter)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
import math

inputs = list(map(lambda i: float(i), input().split()))
A, B = inputs[0], inputs[1]
taps = 0.0

if B == 1:
    taps = 1
else:
    taps = math.ceil((B-A)/A) + 1

print(taps)

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
import numpy as np

a,b = input().split()
a = int(a)
b = int(b)
num_plug = a
num_tap = int(0)

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

print(num_tap+1)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
#インポート
import sys

#入力用
def ILI(): return list(map(int, sys.stdin.readline().rstrip().split()))
def ISI(): return map(int, sys.stdin.readline().rstrip().split())
def II(): return int(sys.stdin.readline().rstrip())
def ISS(): return sys.stdin.readline().rstrip().split()
def IS(): return sys.stdin.readline().rstrip()

A, B = ISI()
for i in range(1, 10000):
    if B != 1:
        if i == 1:
            sum = A
        else:
            sum = A*i-(i-1)
            if sum >= B:
                print(i)
                break
    else:
        print(0)
        break

Submission status: Wrong Answer

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

for i in range(2,100000):
    count = i*a-(i-1)
    if count >= b:
        ans = i
        break
print(ans)

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

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

if A == B:
    print(1)
else:
    print(math.ceil(B/(A-1)))

Submission status: Wrong Answer

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

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

if b == 1:
    print(0)
else:
    print(ans)

Submission status: Wrong Answer

Solution code:
from sys import stdin


def main():
    A, B = [int(x) for x in stdin.readline().rstrip().split()]
    ans = A
    sum_ = 1

    while True:
        if ans >= B:
            break

        sum_ += 1

        ans = ans - 1 + A

    print(sum_)


if __name__ == "__main__":
    main()

Submission status: Wrong Answer

Solution code:
kuchi, needed_kuchi_num= map(int,input().split())

socket_num = 1

con_flg = 1
available_kuchi_num = 0

while con_flg == 1:
    available_kuchi_num = (kuchi - 1)*(socket_num - 1) + kuchi
    if needed_kuchi_num <= available_kuchi_num:
        con_flg = 0
    else:
        socket_num += 1

print(socket_num)

Submission status: Wrong Answer

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

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

cnt = 1
C = A
while C < B:
  C += A - 1
  cnt += 1
  
print(cnt)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

t = 0
c = 1
while t<=B:
    t = A+(A-1)
    c+=1
    
print(c)

Submission status: Wrong Answer

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

if A >= B:
  ans = 1
else:
  B = B - A
  ans = int((B + (A - 1)) / A) + 1
print(ans)

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

socket = A
sum_socket = A
tap = 1
while sum_socket < B:
    sum_socket += socket - 1
    tap += 1
print(tap)

Submission status: Wrong Answer

Solution code:
import math
lines = input().split(" ")

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

if B == 1 or B == 2:
    print(1)
elif A == 20:
    print(1)
elif A >= B:
    print(1)
else:
    if B % A == 0:
        print(B / A)
    else:
        print(math.ceil(B / A))

Submission status: Wrong Answer

Solution code:
A,B=map(int,input().split())
N=0
for i in range(20):
  if A+(A-1)*(i) < B :
    N+=1
  else :
    N+=1
    break
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 B % A == 0:
    print(B//A)
    exit()
else:
    x = B-(A-1)
    if x %A==0:
        print(x//A)
    else:
        print(-(-x//A)+1)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

count = 0

while (A * count) - (count - 1) >= B:
    count += 1
    


print(count)

Submission status: Wrong Answer

Solution code:
#double underscore makes a class variable or a class method private
mod = 1000000007
ii = lambda :  int(input())
si = lambda :  input()
dgl = lambda : list(map(int, input()))
f = lambda :   map(int, input().split())
il = lambda :  list(map(int, input().split()))
it = lambda :  tuple(map(int, input().split()))
ls = lambda :  list(input())
a, b=f()
c=1
sm=a
if b-a<=0:
    print(c)
    exit()
print(1+(b-a)//(a-1)+((b-a)%(a-1)!=0))

Submission status: Wrong Answer

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

for i in range(2,20):
    if (i-1)*(ab[0]) >= ab[1]:
        print(i-1)
        break

Submission status: Wrong Answer

Solution code:
import math

m,n=map(int,input().split())
ans=math.ceil(n/m)
print(ans)

Submission status: Wrong Answer

Solution code:
import math
a, b = map(int, input().split())
c = a
count = 1
while True:
    if c<b:
        count +=1
        c += a-1
    else:
        break
print(count)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

un = A
ans = 1

while True:
    if B <= un:
        break

    un = (un - 1) + A
    ans += 1

print(ans)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

print(ans)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

print(q)

Submission status: Wrong Answer

Solution code:
n1 = list(map(int, input().split()))
n2 = n1[1]//(n1[0] - 1)
n3 = n1[1]%(n1[0] - 1)
if n1[0] >= n1[1]:
    a1 = 1
elif n3 < 2:
    a1 = n2
else:
    a1 = n2 + 1
print(a1)

Submission status: Wrong Answer

Solution code:
a,b = [int(i) for i in input().split()]
counter = 1
current = a
while current <= b:
    current -= 1
    counter += 1
    if current + a == b:
        current += a
    else:
        current += a
print(counter)

Submission status: Wrong Answer

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

ans = 1

if b > a:
  total = a
  while(True):    
    total += (a - 1)
    ans += 1
    if b <= total:
      break;

print(ans)

Submission status: Wrong Answer

Solution code:
elc_tap = input().split(" ")
for i in range(2):
    elc_tap[i] = int(elc_tap[i])

count = 0
while elc_tap[1]>0:
    elc_tap[1] -= elc_tap[0]
    count += 1
    if elc_tap[1] <= 0:
        break
    else:
        elc_tap[1] += 1
    
print(count)

Submission status: Wrong Answer

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

c = b // (a-1)

if a >= b:
  print(1)
else:  
  if b % (a-1) == 1:
    print(c)
  else:
    print(c+1)

Submission status: Wrong Answer

Solution code:
inp = input ()

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

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

Count = 1
Am1 = A - 1
Sub = B - A
while Sub > 0:
    Sub = Sub - Am1
    Count = Count + 1

print(Count)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

if B - int(B/(A-1))*(A-1) > 1:
	ans = int(B/(A-1))+1
	print(ans)
	sys.exit()

print(int(B/(A-1)))

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

if B==1:
    print(0)

if A >= B:
    print(1)
elif(2*A-1) >=B:
    print(2)
elif(3*A-2)>=B:
    print(3)
elif(4*A-3)>=B:
    print(4)
elif(5*A-4)>=B:
    print(5)
elif(6*A-5)>=B:
    print(6)
elif(7*A-6)>=B:
    print(7)
elif(8*A-7)>=B:
    print(8)
elif(9*A-8)>=B:
    print(9)
elif(10*A-9)>=B:
    print(10)
elif(11*A-10)>=B:
    print(11)
elif(12*A-11)>=B:
    print(12)
elif(13*A-12)>=B:
    print(13)
elif(14*A-13)>=B:
    print(14)
elif(15*A-14)>=B:
    print(15)
elif(16*A-15)>=B:
    print(16)
elif(17*A-16)>=B:
    print(17)
elif(18*A-17)>=B:
    print(18)
elif(19*A-18)>=B:
    print(19)
elif(20*A-19)>=B:
    print(20)

Submission status: Wrong Answer

Solution code:
a,b = [int(i) for i in input().split()]
counter = 1
current = a
while current <= b:
    current -= 1
    counter += 1
    if current + a == b:
        current += a
    else:
        current += a - 1
print(counter)

Submission status: Wrong Answer

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

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

tmp = a
c = 1

for i in range(100):
  tmp += a-1
  c += 1
  if tmp >= b:
    break
    
print(c)

Submission status: Wrong Answer

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

ans = 0

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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


if tap[0] >= tap[1]:
    print("1")
else:

    num = tap[0]
    cnt = 1
    while num < tap[1]:
        num += num - 1
        cnt += 1

    print(cnt)

Submission status: Wrong Answer

Solution code:
import sys
sys.setrecursionlimit(1000000000)

a,b=map(int,input().split()[:2])

i=1
while True:

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

count = a
i = 1

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

Solution code:
A , B = map(int,input().split())
if A == B:
        print(1)
        exit()
cnt = 0
result = 0
while True:
        cnt += 1
        result += A
        if result > B:
                break
new_result = A * cnt - ((1) * (cnt-1))
if new_result < B:
        if new_result + A < B:
                print(cnt+2)
        else:
                print(cnt+1)
else:
        print(cnt)

Submission status: Wrong Answer

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

m = 1
c = 0
while True:
	m = m - 1 + A
	c += 1
	#print(m,c)
	if B <= m:
		break
		
print(c)

Submission status: Wrong Answer

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

total = 1
n = 0
while True:
  n += 1
  total = 1 + (A - 1) * n
  if total >= B:
    break
  

print(n)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

tmp = A
if B ==1:
    print(0)
else:
    for i in range(20):
        if tmp>= B:
            print(i)
            break
        tmp = A + (A-1)*i

Submission status: Wrong Answer

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

from sys import stdin
import math

# 標準入力をスペースで区切って、intに変換 listに収納
int_list  = [int(x) for x in stdin.readline().rstrip().split()]

A = int_list[0]
B = int_list[1]

plug=A
cnt=1
while plug<B :
    plug+= A - 1
    cnt+=1

print(cnt)

Submission status: Wrong Answer

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

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:
# -*- coding: utf-8 -*-

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

# solve
ans = 1
tap = A
while True:
    if tap >= B:
        break
    tap += A - 1
    ans += 1

# output
print(ans)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

N = (B-1)//(A-1)
print(N)

Submission status: Wrong Answer

Solution code:

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

print(int((out%tap)+1))

Submission status: Wrong Answer

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