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

Solution code:
import bisect
import heapq
import itertools
import math
import operator
import os
import re
import string
import sys
from collections import Counter, deque, defaultdict
from copy import deepcopy
from decimal import Decimal
from fractions import gcd
from functools import lru_cache, reduce
from operator import itemgetter, mul, add, xor

import numpy as np

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

sys.setrecursionlimit(2147483647)
INF = float("inf")
IINF = 10 ** 18
MOD = 10 ** 9 + 7

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

print(math.ceil((B-1)/(A-1)))

Submission status: Accepted

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

now = 1

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

Submission status: Accepted

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

tap = 1
ans = 0
while tap < B:
    tap += A - 1
    ans += 1

print(ans)

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def slove():
    import sys
    input = sys.stdin.readline
    a, b = list(map(int, input().rstrip('\n').split()))
    t = 1
    cnt = 0
    while True:
        if t >= b:
            print(cnt)
            exit()
        else:
            t += a
            t -= 1
            cnt += 1


if __name__ == '__main__':
    slove()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#!usr/bin/env python3
from collections import defaultdict,deque
from heapq import heappush, heappop
import sys
import math
import bisect
import random
def LI(): return [int(x) for x in sys.stdin.readline().split()]
def I(): return int(sys.stdin.readline())
def LS():return [list(x) for x in sys.stdin.readline().split()]
def S():
    res = list(sys.stdin.readline())
    if res[-1] == "\n":
        return res[:-1]
    return res
def IR(n):
    return [I() for i in range(n)]
def LIR(n):
    return [LI() for i in range(n)]
def SR(n):
    return [S() for i in range(n)]
def LSR(n):
    return [LS() for i in range(n)]

sys.setrecursionlimit(1000000)
mod = 1000000007

#A
def A():
    s = S()
    t = S()
    ans = 0
    for i in range(len(s)):
        if s[i] == t[i]:
            ans += 1
    print(ans)
    return

#B
def B():
    a,b = LI()
    for i in range(10000):
        if 1+i*a-i >= b:
            print(i)
            return
    return

#C
def C():

    return

#D
def D():

    return

#E
def E():

    return

#F
def F():

    return

#Solve
if __name__ == "__main__":
    B()

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
import sys
INF = float("inf")


def solve(A: int, B: int):
    print(-(-(B-1)//(A-1)))
    return


def main():

    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    A = int(next(tokens))  # type: int
    B = int(next(tokens))  # type: int
    solve(A, B)


if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

m = 1
ans = 0

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

print(ans)

Submission status: Accepted

Solution code:
def getlist():
	return list(map(int, input().split()))

A, B = getlist()

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

Submission status: Accepted

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

tap = 1
ans = 0
while tap < b:
    tap += a-1
    ans += 1
    #print(tap)
print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

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

ans = (B - 2) // (A - 1) + 1

print(ans)

Submission status: Accepted

Solution code:
import math, string, itertools, fractions, heapq, collections, re,  array, bisect, sys, random, time, copy, functools, os, pdb
sys.setrecursionlimit(10**7)
inf = 10 ** 20
eps = 1.0 / 10**10
mod = 10**9+7
dd = [(-1, 0), (0, 1), (1, 0), (0, -1)]
ddn = [(-1, 0), (-1, 1), (0, 1), (1, 1), (1, 0), (1, -1), (0, -1), (-1, -1)]
def LI(): return [int(x) for x in sys.stdin.readline().split()]
def LI_(): return [int(x)-1 for x in sys.stdin.readline().split()]
def LF(): return [float(x) for x in sys.stdin.readline().split()]
def LS(): return sys.stdin.readline().split()
def _I(): return int(sys.stdin.readline())
def _F(): return float(sys.stdin.readline())
def _pf(s): return print(s, flush=True)
def perr(s): return print(s, file=sys.stderr)

A, B = LI()

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
import sys
sys.setrecursionlimit(200000)
input = sys.stdin.readline

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

c = 1
ans = 0
while c < B:
    ans += 1
    c += A - 1

print(ans)

Submission status: Accepted

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


if __name__ == "__main__":
    main()

Submission status: Accepted

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

Submission status: Accepted

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

print(ans)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#
# 　　  ⋀_⋀　 
#　　  (･ω･)  
# .／ Ｕ ∽ Ｕ＼
#  │＊　合　＊│
#  │＊　格　＊│ 
#  │＊　祈　＊│ 
#  │＊　願　＊│ 
#  │＊　　　＊│ 
#      ￣
#
import sys
sys.setrecursionlimit(10**6)
input=sys.stdin.readline
from math import floor,ceil,sqrt,factorial,log #log2ないｙｐ
from heapq import heappop, heappush, heappushpop
from collections import Counter,defaultdict
from itertools import accumulate,permutations,combinations,product,combinations_with_replacement
from bisect import bisect_left,bisect_right
from copy import deepcopy
inf=float('inf')
mod = 10**9+7
def INT_(n): return int(n)-1
def MI(): return map(int,input().split())
def MF(): return map(float, input().split())
def MI_(): return map(INT_,input().split())
def LI(): return list(MI())
def LI_(): return [int(x) - 1 for x in input().split()]
def LF(): return list(MF())
def LIN(n:int): return [I() for _ in range(n)]
def LLIN(n: int): return [LI() for _ in range(n)]
def LLIN_(n: int): return [LI_() for _ in range(n)]
def LLI(): return [list(map(int, l.split() )) for l in input()]
def I(): return int(input())
def F(): return float(input())
def ST(): return input().replace('\n', '')
def main():
    A,B = MI_()
    print(ceil(B/A))
    
if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
a, b = map(int, input().split())
ans = (b - a + a - 2) // (a - 1)
print(ans + 1)

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
import math

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

Submission status: Accepted

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

cnt = 0
while True:
    if 1 + cnt * (a - 1) >= b:
        print(cnt)
        exit()
    else:
        cnt += 1

Submission status: Accepted

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

# print(a,b)

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

Submission status: Accepted

Solution code:
import sys

stdin = sys.stdin

ni = lambda: int(ns())
na = lambda: list(map(int, stdin.readline().split()))
ns = lambda: stdin.readline().rstrip()  # ignore trailing spaces

a, b = na()
ct = 1
step = 0
while ct < b:
    ct -= 1
    ct += a
    step += 1
print(step)

Submission status: Accepted

Solution code:
from collections import defaultdict,deque
import sys,heapq,bisect,math,itertools,string,queue,copy,time
sys.setrecursionlimit(10**8)
INF = float('inf')
mod = 10**9+7
eps = 10**-7
def inp(): return int(sys.stdin.readline())
def inpl(): return list(map(int, sys.stdin.readline().split()))
def inpl_str(): return list(sys.stdin.readline().split())

A,B = inpl()
N = 1
ans = 0
while N < B:
    N += -1 + A
    ans += 1

print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

a-=1
b-=1

from math import ceil
print(ceil(b/a))

Submission status: Accepted

Solution code:
rr = raw_input
rri = lambda: int(raw_input())
rrm = lambda: map(int, raw_input().split())


def solve(A, B):
    o = 1
    ans = 0
    while o < B:
        o += A-1
        ans += 1
    return ans

print solve(*rrm())

Submission status: Accepted

Solution code:
#!/usr/bin/env python

from collections import deque, defaultdict
import itertools as ite
import sys
import math
import re

sys.setrecursionlimit(1000000)

INF = 10 ** 18
MOD = 10 ** 9 + 7

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

ans = 0
cnt = 1

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

print ans

Submission status: Runtime Error

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

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

print(n)

Submission status: Runtime Error

Solution code:
g = a - 1
d, r = divmod(b - 1, g)
if r == 0:
    print(d)
else:
    print(d + 1)

Submission status: Runtime Error

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

# 電源タップの個数をa, 差込口の個数をnumとおく 
a = 0
num = 1
while num < B:
  num -= 1
  num += a
  ans += 1

print(a)

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
a, b = map(int, input().split())
 
con_num = a + (a * tap_num -1)
 
# con_num > b となることが必要条件
# a + (a * tap_num -2) < b < a + (a * tap_num -1)
 
for tap_num in range(1, b):
    if tap_num == 1:
        if a >= b: break
    else:
        if a + ((a - 1) * (tap_num -1)) >= b: break
    
print(tap_num)

Submission status: Runtime Error

Solution code:
a, b = map(int, input(), split())
 
tap_num = 0
con_num = a + (a * tap_num -1)
 
# con_num > b となることが必要条件
# a + (a * tap_num -2) < b < a + (a * tap_num -1)
 
for tap_num in range(b):
    if a + (a * tap_num -1) > b:
        break
    
print(tap_num)

Submission status: Runtime Error

Solution code:
a, b = map(int, input(), split())
 
tap_num = 0
con_num = a + (a * tap_num -1)
 
# con_num > b となることが必要条件
# a + (a * tap_num -2) < b < a + (a * tap_num -1)
 
for tap_num in range(b):
    if a + (a * tap_num -1) > b:
    break
    
print(tap_num)

Submission status: Runtime Error

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

tap_num = 0
con_num = a + (a * tap_num -1)

# con_num > b となることが必要条件
# a + (a * tap_num -2) < b < a + (a * tap_num -1)


for tap_num in range(b):
  if a + (a * tap_num -1) > b:
  	break
    
print(tap_num)

Submission status: Runtime Error

Solution code:
a=int(input())
b=int(input())
sum=b-a
cnt=1
while sum>0:
    sum-=a-1
    cnt+=1
print(cnt)

Submission status: Runtime Error

Solution code:
a=input()
b=input()
sum=b-a
cnt=1
while sum>0:
    sum-=a-1
    cnt+=1
print(cnt)

Submission status: Runtime Error

Solution code:
#include <bits/stdc++.h>

#define all(x) (x).begin(),(x).end()
#define init() \
  ios::sync_with_stdio(false); \
  cin.tie(0)

#define MOD 1000000007

using namespace std;

using ll = long long;
using ull = unsigned long long;

#ifdef LOCAL

template<typename T>
void show(vector<T>& v) {
    cout << '[';
    for (const T& e : v) {
        cout << e << ',';
    }
    cout << ']' << endl;
}

#endif

template<typename M, typename N>
constexpr common_type_t<M, N> gcd(M a, N b) {
  return a == 0 ? b
    : b == 0 ? a
    : gcd(b, a % b);
}

template <typename M, typename N>
constexpr common_type_t<M, N> lcm(M a, N b) {
  return a * b / gcd(a, b);
}

template <long long MAX>
class CombinationCalculator {
  long long mod_;
  long long fac[MAX];
  long long finv[MAX];
  long long inv[MAX];

public:
  CombinationCalculator(long long mi = MOD): fac(), finv(), inv() {
    mod_ = mi;
    fac[0] = fac[1] = 1;
    finv[0] = finv[1] = 1;
    inv[1] = 1;
    for (int i = 2; i < MAX; i++) {
      fac[i] = fac[i - 1] * i % mod_;
      inv[i] = mod_ - inv[mod_ % i] * (mod_ / i) % mod_;
      finv[i] = finv[i - 1] * inv[i] % mod_;
    }
  }

  long long c(long long n, long long k) const {
    if (n < k) return 0;
    if (n < 0 || k < 0) return 0;
    return fac[n] * (finv[k] * finv[n - k] % mod_) % mod_;
  }
};

template <long long MAX = 210000>
using CC = CombinationCalculator<MAX>;

template<typename T>
T modpow(T a, T n, T mod = MOD) {
    T res = 1;
    while (n > 0) {
        if (n & 1) res = res * a % mod;
        a = a * a % mod;
        n >>= 1;
    }
    return res;
}

template<typename T>
T modinv(T a, T m = MOD) {
    T b = m, u = 1, v = 0;
    while (b) {
        T t = a / b;
        a -= t * b; swap(a, b);
        u -= t * v; swap(u, v);
    }
    u %= m; 
    if (u < 0) u += m;
    return u;
}

template<typename T>
vector<T> read_n(const size_t n) {
    T dummy;
    vector<T> v(n);
    for (size_t i = 0; i < n; i++) {
        cin >> dummy;
        v[i] = dummy;
    }
    return v;
}

template<typename T>
vector<T> read_n() {
    size_t n;
    cin >> n;
    return read_n<T>(n);
}

int solve(int a, int b) {
    if (b <= 1) {
        return 0;
    } else {
        int sum = 1;
        int i = 0;
        while(1) {
            if (sum >= b) {
                return i;
            } else {
                i++;
                sum += a - 1;
            }
        }
    }
}

int main() {
  init();

  int a, b;
  cin >> a >> b;

  cout << solve(a, b) << endl;

  return 0;
}

Submission status: Runtime Error

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

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

Submission status: Runtime Error

Solution code:
from math import ceil
A = int(input()); B = int(input())

print(ceil(B / A))

Submission status: Runtime Error

Solution code:
# coding: utf-8
A, B = map(int, input().split())
B = B-A
for i in range(20):
	if B<=0:
    	print(i+1)
    	break()
    B=B-A+1

Submission status: Runtime Error

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

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
inputs = input()
a, b = int(inputs.split(' '))
a * n - (n - 1) >= b
print(int((b + 1) / (a -1))

Submission status: Runtime Error

Solution code:
import sys, bisect, math, itertools, string, queue, copy
# import numpy as np
# import scipy
# from collections import Counter,defaultdict,deque
# from itertools import permutations, combinations
# from heapq import heappop, heappush
# # input = sys.stdin.readline
# sys.setrecursionlimit(10**8)
mod = 10**9+7
def inp(): return int(input())
def inpm(): return map(int,input().split())
def inpl(): return list(map(int, input().split()))
def inpls(): return list(input().split())
def inplm(n): return list(int(input()) for _ in range(n))
def inplL(n): return [list(input()) for _ in range(n)]
def inplT(n): return [tuple(input()) for _ in range(n)]
def inpll(n): return [list(map(int, input().split())) for _ in range(n)]
def inplls(n): return sorted([list(map(int, input().split())) for _ in range(n)])

a, b = inpm()
tmp = a
if(b == 1):
    print(0)
else:
ans = 1
    while(b > tmp):
        tmp += a - 1
        ans += 1
    print(ans)

Submission status: Runtime Error

Solution code:
import sys, bisect, math, itertools, string, queue, copy
# import numpy as np
# import scipy
# from collections import Counter,defaultdict,deque
# from itertools import permutations, combinations
# from heapq import heappop, heappush
# # input = sys.stdin.readline
# sys.setrecursionlimit(10**8)
mod = 10**9+7
def inp(): return int(input())
def inpm(): return map(int,input().split())
def inpl(): return list(map(int, input().split()))
def inpls(): return list(input().split())
def inplm(n): return list(int(input()) for _ in range(n))
def inplL(n): return [list(input()) for _ in range(n)]
def inplT(n): return [tuple(input()) for _ in range(n)]
def inpll(n): return [list(map(int, input().split())) for _ in range(n)]
def inplls(n): return sorted([list(map(int, input().split())) for _ in range(n)])

a, b = inpm()
tmp = a
if(b == 1):
    print(0)
    return
ans = 1
while(b > tmp):
    tmp += a - 1
    ans += 1
print(ans)

Submission status: Runtime Error

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

Submission status: Runtime Error

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

ans=[]

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

else:
  for i in range(20):
    if b<=a+(a-1)*i:
      ans.append(i+1)

print(min(ans))

Submission status: Runtime Error

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

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
#include <iostream>
using namespace std;
int main(void){
    int a,b;
    cin>>a>>b;
    int x=0;
    while(x*(a-1)+1<b){
        x++;
    }
    cout<<x<<endl;
}

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
a,b,k=map(int,input().split())
if k>a+b:print(0,0)
elif a<=k and k<=a+b:
    print(0,b-(k-a))
elif a>k :
      print(a-k,b)

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
def calulate(m, n) : 
	n_adapters = 0
	if n <= m :
		n_adapters = 1
	else :
		n_adapters = n//m
		if n % m != 0:
			n_adapters += 1
	return n_adapters

M, N = map(int, input().split())

calculate(M, N)

Submission status: Runtime Error

Solution code:
MN=input().split()
M=int(MN[0])
N=int(MN[1])  
div=int(N/M)
if (N%M)<N and (N%M)>0:
 cont=1 
elif (N%M)==0: 
  cont=0
print(cont+div)

Submission status: Runtime Error

Solution code:
m=int(input())
n=int(input())
r=m
i=1
while r<n :
	r=r+m-1
	i+=1
print(i)

Submission status: Runtime Error

Solution code:
m= int(input())
n= int(input())
print(round((n/m)+0.49))

Submission status: Runtime Error

Solution code:
m=int(input())
n=int(input())
print(round((n/m)+0.4))

Submission status: Runtime Error

Solution code:
m= int(input())
n= int(input())

print(round((n/m)+0.4))

Submission status: Runtime Error

Solution code:
 = input().split()
syou = x[0] / x[1]
amari = x[0] % x[1]

if(amari > 0 ):
    print(syou+1)
else:
    print(syou)

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
a,b=map(int,input().split())
if a==b:
  print(1)
  break
else:
  num=0
  hoge=a
  while b>hoge:
    hoge+=a
    num+=1
    print(num)

Submission status: Runtime Error

Solution code:
a,b=map(int,input().split())
ans=0
for i in rnage(0,b,a-1):
  ans+=1
print(ans+1)

Submission status: Runtime Error

Solution code:
a, b = int(input().split())
s = a - 1
t = b-1
asn = (s + t -1) // s

Submission status: Runtime Error

Solution code:
S, T = input().split()
print(S + T -1) // S

Submission status: Runtime Error

Solution code:
def solve(a,b):
  def needTaps(a,b,holes=1,res=0):
    if holes >= b:
      return res
    elif:
      return needTaps(a,b,holes+a-1,res+1)
    
  return needTaps(a,b)

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

Submission status: Runtime Error

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

ans = 0
taps = 1

while True:
	if taps >= B:
		print(ans)
		break
	taps += (A - 1)
	ans += 1
A, B = map(int, input().split())

ans = 0
taps = 1

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
n = list(map(int, input().split(' '))
print(-(-n[1] + 1) // (n[0] -1))

Submission status: Runtime Error

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

Submission status: Runtime Error

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

b - 1 = x * (a - 1)

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
a,b=input2()
count=1

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

Submission status: Runtime Error

Solution code:
import sys
a,b=map(int,input().split())
if b==1:
  print("0")
  sus.exit()
p=1
ans=0
for i in range(0,20):
  p+=a-1
  ans+=1
  if p>=b:
    print(ans)
    sys.exit()

Submission status: Runtime Error

Solution code:
import sys
a,b=map(int,input().split())
if b=1:
  print("0")
  sus.exit()
p=1
ans=0
for i in range(0,20):
  p+=a-1
  ans+=1
  if p>=b:
    print(ans)
    sys.exit()

Submission status: Runtime Error

Solution code:
A, B = map(int, split())
num = B / A

if B == 0 or B == 1:
  print(int(0))
elif B % A == 0:
  print(int(num))
else:
  print(int(num + 1))

Submission status: Runtime Error

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

num = B / A

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

Submission status: Runtime Error

Solution code:
A B = map(int(input()))

num = B / A

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

Submission status: Runtime Error

Solution code:
A B = map(int(input()))

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

Submission status: Runtime Error

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

num = B / A

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

Submission status: Runtime Error

Solution code:
a, b = map(input().split(" "))
i = 1
while i >=1:
  d = (a-1)*i +1
  if d >= b:
    print(i)
    break

Submission status: Runtime Error

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

Submission status: Runtime Error

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

answer = 1
num = 0
while(answer < b):
  anwer += a - 1
  num += 1
    
print(num)

Submission status: Runtime Error

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

answer = 1
num = 0
while(answer < b):
  anwer += a - 1
    num += 1
    
print(num)

Submission status: Runtime Error

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

print(mach.ceil((B-1)/(A-1)))

Submission status: Runtime Error

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

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

Submission status: Runtime Error

Solution code:
# -*- coding: utf-8 -*-
# スペース区切りの整数の入力
a, b = map(int, input().split())
x = ((1-b)//(a-1))
# 出力
print("{}".format(-x)

Submission status: Runtime Error

Solution code:
# -*- coding: utf-8 -*-
# スペース区切りの整数の入力
a, b = map(int, input().split())
# 出力
print("{}".format( -( (1-b)//(a-1) ) )

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
min_tap = 0
if B <= A:
    min_tap = 1
else:
    min_tap =math.ceil((B-A)/(A-1))+1
print(int(min_tap))

Submission status: Runtime Error

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

def sum_tap_num(tap_num, A, B):
  if tap_num + A >= B:
    tam_num += 1
  	return tap_num
  
  return sum_tap_num(tap_num+1, A, B)

print(sum_tap_num(0, A, B))

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
import math
print(math.ceil((B-1)/A))

Submission status: Runtime Error

Solution code:
import math
math.ceil((B-1)/A)

Submission status: Runtime Error

Solution code:
math.ceil((B-1)/A)

Submission status: Runtime Error

Solution code:
a, b = [int(i) for i in input().split()]
if b == 1:
    print(0)
    return
n = (b-2) / (a-1)
print(n+1)

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
a=int(input())
b=int(input())
ans=(b-1)//a+1
print(ans)

Submission status: Runtime Error

Solution code:
import sys
A,B = map(int,input(.split())
for i in range(1,20):
  if (1+(A-1)*i) >= B:
    print(i)
    sys.exit()

Submission status: Runtime Error

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

ans = 0
consent = 1

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

Submission status: Runtime Error

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

n = 1
while 1:
    if (a - 1) * n + 1 >

Submission status: Runtime Error

Solution code:
import math
a,b=map(int,input().strip().split())
ans=0
sockets=1
while sockets<b:
  outlets-=1
  sockets+=a
  ans+=1
print(ans)

Submission status: Runtime Error

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