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())
n =0

if b ==1:
    print(0)
else:
    while a*n <= b:
        n +=1

    print(n)

Submission status: Wrong Answer

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

if b ==1:
    print(0)
else:
    while a*n < b:
        n +=1
        print(n)

Submission status: Wrong Answer

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

while a*n < b:
    n += 1

print(n)

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

Solution code:
import math

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

ans = math.ceil(b / a)
print(ans)

Submission status: Wrong Answer

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

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

print(ans)

Submission status: Wrong Answer

Solution code:
import sys
stdin=sys.stdin

ns = lambda:stdin.readline().rstrip()
ni = lambda:int(stdin.readline().rstrip())
nm = lambda:map(int,stdin.readline().split())
nl = lambda:list(map(int,stdin.readline().split()))

A,B=nm()

print(((B-1)//(A-1)+1 if B>1 else 0))

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

ans = 0
nouse = 1
while nouse <= b:
    ans += 1
    nouse += a - 1

print(ans)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
#
# Written by NoKnowledgeGG @YlePhan
# ('ω')
#
#import math
#mod = 10**9+7
#import itertools
#import fractions
#import numpy as np
#mod = 10**4 + 7
"""def kiri(n,m):
  r_ = n / m
  if (r_ - (n // m)) > 0:
    return (n//m) + 1
  else:
    return (n//m)"""
  
def main():
  a,b = map(int,input().split())
  ans = 1
  while True:
    if a * ans - (ans - 1) >= b:
      print(ans)
      exit()
    else:
      ans += 1
    
    
if __name__ == '__main__':
  main()

Submission status: Wrong Answer

Solution code:
#
# Written by NoKnowledgeGG @YlePhan
# ('ω')
#
#import math
#mod = 10**9+7
#import itertools
#import fractions
#import numpy as np
#mod = 10**4 + 7
"""def kiri(n,m):
  r_ = n / m
  if (r_ - (n // m)) > 0:
    return (n//m) + 1
  else:
    return (n//m)"""
  
def main():
  a,b = map(int,input().split())
  print(b%a+1)
if __name__ == '__main__':
  main()

Submission status: Wrong Answer

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

if A>=B:
  print(1)
  exit()
else:
  print(math.floor(B//A))

Submission status: Wrong Answer

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

if A>=B:
  print(1)
  exit()
else:
  x=B-A
  print(math.ceil(x/(A-1)) +1)

Submission status: Wrong Answer

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

if A>=B:
  print(0)
  exit()
else:
  x=B-A
  print(math.ceil(x/(A-1)) +1)

Submission status: Wrong Answer

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

if A>=B:
  print(0)
  exit()
else:
  x=B-A
  print(math.floor(x/(A-1)) +1)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
import sys
a, b =map(int, input().split())
if a == b or b == 1:
  print(1)
  sys.exit()
 
c = b//a
if a*c == b:
  print(c)
else:
  print(c +1)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
import sys
a, b =map(int, input().split())
if a == b:
  print(1)
  sys.exit()
elif a < b:
  print(a)
  sys.exit()
 
c = b//a
if a*c == b:
  print(c)
else:
  print(c +1)

Submission status: Wrong Answer

Solution code:
a, b =map(int, input().split())
if a == b:
  print(1)
elif a < b:
  print(a)

c = b//a
if a*c == b:
  print(c)
else:
  print(c +1)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
import sys
import copy
import math
import bisect
import pprint
import bisect
from functools import reduce
from copy import deepcopy
from collections import deque

def lcm(x, y):
    return (x * y) // math.gcd(x, y)

if __name__ == '__main__':
    a = [int(i) for i in input().split()]

    for i in range(1,100):
        count = 0
        if i > 1:
            count = a[0] + (a[0]-1)*(i-1)
        else:
            count = a[0]

        if count >= a[1]:
            print(i)
            break

Submission status: Wrong Answer

Solution code:
import sys
import copy
import math
import bisect
import pprint
import bisect
from functools import reduce
from copy import deepcopy
from collections import deque

def lcm(x, y):
    return (x * y) // math.gcd(x, y)

if __name__ == '__main__':
    a = [int(i) for i in input().split()]

    for i in range(1,21):
        count = 0
        if i > 1:
            count = a[0] + (a[0]-2)*(i-1)
        else:
            count =a[0]

        if count >= a[1]:
            print(i)
            break

Submission status: Wrong Answer

Solution code:
import sys
import copy
import math
import bisect
import pprint
import bisect
from functools import reduce
from copy import deepcopy
from collections import deque

def lcm(x, y):
    return (x * y) // math.gcd(x, y)

if __name__ == '__main__':
    a = [int(i) for i in input().split()]

    for i in range(1,21):
        count = 0
        if i > 1:
            count = a[0] + (a[0]-1)*(i-1)
        else:
            count =a[0]

        if count >= a[1]:
            print(i)
            break

Submission status: Wrong Answer

Solution code:
import sys
import copy
import math
import bisect
import pprint
import bisect
from functools import reduce
from copy import deepcopy
from collections import deque

def lcm(x, y):
    return (x * y) // math.gcd(x, y)

if __name__ == '__main__':
    a = [int(i) for i in input().split()]

    if a[1] <= a[0]:
        print(1)
    elif ((a[1] - a[0]) % (a[0] - 1)) > 0:
        print(2 + (a[1] - a[0]) // (a[0] - 1))
    else:
        print(1 + (a[1]-a[0])//(a[0] -1) )

Submission status: Wrong Answer

Solution code:
import sys
import copy
import math
import bisect
import pprint
import bisect
from functools import reduce
from copy import deepcopy
from collections import deque

def lcm(x, y):
    return (x * y) // math.gcd(x, y)

if __name__ == '__main__':
    a = [int(i) for i in input().split()]

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

Submission status: Wrong Answer

Solution code:
A, B = map(int, input().split())
#print (A)
#print (B)
N=0

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

print(N+1)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

if 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=map(int,input().split())

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

Submission status: Wrong Answer

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

if a >= b:
    print('1')
    exit()
puragu = 0
while b > 0:
    if b - a -(puragu*(a-1)) <= 0:
        puragu += 1
        break
    else:
        puragu += 1
print(puragu)

Submission status: Wrong Answer

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

if a >= b:
    print('1')
    exit()
b += -a
ans = 1
while b > 0:
    b += -(a-1)
    ans += 1

print(ans)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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())
puragu = 1
if A >= B:
  print(1)
  exit()

result = 0

while puragu <= B:
  puragu += A-1
  result += 1

print(result)

Submission status: Wrong Answer

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

result = 0

while puragu < B:
  puragu += A-1
  result += 1

print(result)

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

print((b-1)//(a-1))

Submission status: Wrong Answer

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

x = 1
ans = 0

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

print(ans - 1)

Submission status: Wrong Answer

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

x = 1
ans = 0

while x <= B:
    x += A
    x -= 1
    ans += 1
    if x >= B:
        break
print(ans)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

main()

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
import sys

a,b=map(int,input().split())
ans=0
ans+=a
count=1

if b==0:
  print(0)
  sys.exit()
  
while ans<b:
  ans+=a-1
  count+=1

print(count)

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

Solution code:
import sys
input = sys.stdin.readline

a, b = map(int, input().split())
ans = 1
for i in range(20):
    ans += a
    if ans >= b:
        print(i + 1)
        exit()

Submission status: Wrong Answer

Solution code:
A, B = map(int, input().split())
x = 0
X = B%(A-1)
Y = B//(A-1)

if B ==1:
  print(0)
elif A >= B:
  print(1)
elif X <= 1:
  print(Y)
else:
  print(Y + 1)

Submission status: Wrong Answer

Solution code:
A, B = map(int, input().split())
x = 0
X = B%(A-1)
Y = B//(A-1)

if A >= B:
  print(1)
elif X <= 1:
  print(Y)
else:
  print(Y + 1)

Submission status: Wrong Answer

Solution code:

a,b = map(int,input().split())
count = 1
plug = 0
while 1:
    if plug+a >= b:
        ans = count
        break
    else:
        plug += a-1
        count += 1

print(ans)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

print(math.ceil(b/a))

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

count, sum = 1, A
while sum < B:
	sum += A - 1
	count += 1

print(count)

Submission status: Wrong Answer

Solution code:
import math

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

print(math.ceil(B / A))

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:

[A,B] = list(map(int,input().split()))

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

Solution code:

[A,B] = list(map(int,input().split()))

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
#スペース区切りの整数の入力
A, B = map(int, input().split())


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

print(int(ans))

Submission status: Wrong Answer

Solution code:
#スペース区切りの整数の入力
A, B = map(int, input().split())

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

print(int(ans))

Submission status: Wrong Answer

Solution code:
#スペース区切りの整数の入力
A, B = map(int, input().split())

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

print(int(ans))

Submission status: Wrong Answer

Solution code:
# from math import factorial,sqrt
# from itertools import permutations as permus
# from fractions import gcd
# from collections import deque,Counter

# import numpy as np
# import scipy as scp

# 入力の受け取り
a,b = map(int,input().split())

ans = 0
concentnum = 1
while concentnum <b:
    concentnum = concentnum -1 +a
    ans += 1

print(concentnum)
print(ans)
# print("{:.10f}".format(ans))

Submission status: Wrong Answer

Solution code:
# from math import factorial,sqrt
# from itertools import permutations as permus
# from fractions import gcd
# from collections import deque,Counter

# import numpy as np
# import scipy as scp

# 入力の受け取り
a,b = map(int,input().split())

ans = 0
targetnum = b
while targetnum >0:
    targetnum -= a
    ans += 1

print(ans)
# print("{:.10f}".format(ans))

Submission status: Wrong Answer

Solution code:
# from math import factorial,sqrt
# from itertools import permutations as permus
# from fractions import gcd
# from collections import deque,Counter

# import numpy as np
# import scipy as scp

# 入力の受け取り
a,b = map(int,input().split())

if b%a == 0:
    ans = b//a
else:
    ans = b//a +1

print(ans)
# print("{:.10f}".format(ans))

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
#B Power Socket
import math
a,b=map(int,input().split())
if b==1:
    print(0)
else:
    print(math.ceil(b/a))

Submission status: Wrong Answer

Solution code:
#B Power Socket
import math
a,b=map(int,input().split())
print(math.ceil(b/(a+1)))

Submission status: Wrong Answer

Solution code:
#B Power Socket
import math
a,b=map(int,input().split())
print(math.ceil(b+1/a))

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

print(t)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
A,B = [int(i) for i in input().split()]
ans = 0
aa = 1
while True:
    aa += A-1
    ans +=1
    if aa >= B:
        print(ans)
        exit()

Submission status: Wrong Answer

Solution code:
A,B = [int(i) for i in input().split()]
ans = 1
aa = A
while True:
    if aa >= B:
        print(ans)
        exit()
    aa += A-1
    ans +=1

Submission status: Wrong Answer

Solution code:
import sys
import os
import math


def main():
    if os.getenv("LOCAL"):
        sys.stdin = open("input.txt", "r")

    A, B = list(map(int, sys.stdin.readline().split()))
    n = math.ceil(B/A)
    print(n if A*n-(n-1) >= B else n+1)


if __name__ == '__main__':
    main()

Submission status: Wrong Answer

Solution code:
import sys
import os
import math


def main():
    if os.getenv("LOCAL"):
        sys.stdin = open("input.txt", "r")

    A, B = list(map(int, sys.stdin.readline().split()))
    print(math.ceil(B/A))


if __name__ == '__main__':
    main()

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

print(ans)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

print(i)

Submission status: Wrong Answer

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

print(i)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
def solve():
    N, M = map(int, input().split())
    if N >= M:
        return 1
    
    ans = 1
    a = M - N
    while a >= 0:
        a = a - (N-1)
        ans += 1
    
    return ans

print(solve())

Submission status: Wrong Answer

Solution code:
def solve():
    N, M = map(int, input().split())
    if N >= M:
        return 1
    
    ans = 1
    a = M - N
    while a > 0:
        a = a - (N-1)
        ans += 1
    
    return ans

print(solve())

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
def solve():
    N, M = map(int, input().split())
    if N >= M:
        return 1
    
    r = M // (N-1)
    b = M % (N-1) == 1
    return r if b else r + 1

print(solve())

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
def solve():
    N, M = map(int, input().split())
    r = M // (N-1)
    b = M % (N-1) == 1
    return r if b else r + 1

print(solve())

Submission status: Wrong Answer

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

result = 0
cnt = 1
for i in range(B):
    if(B - result < A):
        result +=A
        #cnt += 1
        break
    else:
        cnt += 1
        result += A-1

print(cnt)

Submission status: Wrong Answer

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

result = 0
cnt = 1
for i in range(B):
    if(B - result <= A):
        result +=A
        #cnt += 1
        break
    else:
        cnt += 1
        result += A-1

print(cnt)

Submission status: Wrong Answer

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

result = 0
cnt = 0
for i in range(B):
    if(B - result <= A):
        result +=A
        cnt += 1
        break
    else:
        cnt += 1
        result += A-1

print(cnt)

Submission status: Wrong Answer

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

cnt = 0
for i in range(B):
    if B <= 0:
        break
    else:
        B -= A
        cnt += 1

print(cnt)

Submission status: Wrong Answer

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

cnt = 1
for i in range(20):
    if A * i >= B:
        print(i)
        break

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

Solution code:
import sys

[A, B] = [int(x) for x in sys.stdin.readline().strip().split(" ")]

result = 1
while A * result < B:
    result += 1

print(result)

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

div, mod = divmod(B - A, A - 1)
print(div, mod)
div += 1
if mod > 0:
    div += 1
print(div)

Submission status: Wrong Answer

Solution code:
A, B = map(int, input().split())
div, mod = divmod(B, A)
if mod > 0:
    div += 1
print(div)

Submission status: Wrong Answer

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

print(ans)

Submission status: Wrong Answer

Solution code:
A,B = map(int,input().split())
for i in range(100):
    if i >= (B-1)/(A-1) and B-1 != 0:
        print(i)
        break
    elif B-1 == 0:
        print(1)
        break

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

print(-(-B // A))

Submission status: Wrong Answer

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

for n in range(0,20):
    if n*a-n>b-1:
        break

print(n)

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
number = input().split(" ")
A = int(number[0])
B = int(number[1])
if B == 1:
    print(0)
elif A >= B:
    print(1)
else:
    x = (B-A)//(A-1)
    if x == 0:
        print(x+1)
    else:
        print(x+2)

Submission status: Wrong Answer

Solution code:
number = input().split(" ")
A = int(number[0])
B = int(number[1])
if A >= B:
    print(1)
else:
    x = (B-A)//(A-1)
    print(x+1)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

print(N)
#B<=A*(N-1)+1

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
N , M = (map(int , input().split()))
kiriage = (-(-M//N))
if kiriage > 1:
    a = ((-(-M//N)) * N) - (kiriage-1)
    while a < M:
        a += (N-1)
        kiriage += 1
print(kiriage)

Submission status: Wrong Answer

Solution code:
N , M = (map(int , input().split()))
print(-(-M//N))

Submission status: Wrong Answer

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

sumc = 0
ans = 0
for count in range(1,22):
    sumc = A * count 
    if sumc-count + 1 >= B:
        ans = count 
        break
print(ans)

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

cnt = 1
p = a

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
N, H = map(int, input().split())

if H%N == 0:
    print(H/N)
else:
    print(int(H//N)+1)

Submission status: Wrong Answer

Solution code:
N, H = map(int, input().split())

if H%N == 0:
    print(H/N)
else:
    print(int(H/N)+1)

Submission status: Wrong Answer

Solution code:
import sys
import math
a,b= map(int,input().split())
#N=int(input())
#a, b, c = [list(map(int, input().split())) for _ in range(3)]
#li0= [int(x) for x in input().split()]
i=0
c=b-a
if c<0:
  print("1")
  sys.exit()
if c%(a-1)==0:
  print((c//(a-1))+1)
else:
  print((c//(a-1))+2)

Submission status: Wrong Answer

Solution code:
import sys
import math
a,b= map(int,input().split())
#N=int(input())
#a, b, c = [list(map(int, input().split())) for _ in range(3)]
#li0= [int(x) for x in input().split()]
i=0
c=b-a
if c<0:
  print("1")
  sys.exit()
if c%a==0:
  print((c//a)+1)
else:
  print((c//a)+2)

Submission status: Wrong Answer

Solution code:
import sys
import math
a,b= map(int,input().split())
#N=int(input())
#a, b, c = [list(map(int, input().split())) for _ in range(3)]
#li0= [int(x) for x in input().split()]
i=0
c=b-a
if c%a==0:
  print((c//a)+1)
else:
  print((c//a)+2)

Submission status: Wrong Answer

Solution code:
import math

input_1,input_2=map(int,input().split())
print (math.ceil(input_2/input_1))

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
import math

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

Submission status: Wrong Answer

Solution code:
import math

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

Submission status: Wrong Answer

Solution code:
import math

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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