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:
'''B - Power Socket
https://atcoder.jp/contests/abc139/tasks/abc139_b

>>> main(4, 10)
3
>>> main(8, 9)
2
>>> main(8, 8)
1'''


def main(A, B):
    # A + N*(A-1)
    outlet = A
    ans = 1

    if A >= B:
        return 1

    while outlet < B:
        outlet += A
        ans += 1
    else:
        return ans


if __name__ == "__main__":
    A, B = map(int, input().split(' '))
    print(main(A, B))

Submission status: Wrong Answer

Solution code:
import math
 
A = list(map(int,input().split()))
 
n = math.floor(A[1] / A[0])
 
if n == A[1] / A[0]:
  print(n)
elif n <  A[1] / A[0]:
  print(n+1)
else:
  print(1)

Submission status: Wrong Answer

Solution code:
import math

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

n = math.floor(A[1] / A[0])

if n == A[1] / A[0]:
  print(n)
elif n <  A[1] / A[0]:
  print(n+1)
else:
  print(n)

Submission status: Wrong Answer

Solution code:
import math

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

n = math.floor(A[1] / A[0])

if n == A[1] / A[0]:
  print(n)
else:
  print(n+1)

Submission status: Wrong Answer

Solution code:
A,B =[int(x) for x in input().split()]
ans=1
sum = A

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

while tap < b:
    tap = tap + a
    res += 1
print(res)

Submission status: Wrong Answer

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

while tap < b:
    tap = tap + a
    res += 1
print(res)

Submission status: Wrong Answer

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

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

print(cnt)

Submission status: Wrong Answer

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

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

print(cnt)

Submission status: Wrong Answer

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

num_tap = A
cnt = 1
while True:
  if B > num_tap:
    num_tap = num_tap + A - 1
    cnt = cnt + 1
  else:
    print(cnt)
    break

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:
A,B = map(int,input().split())
count = 0
total = 0
while total<B:
    total+=A
    count +=1
print(count)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
#!/usr/bin/env python3
import sys
import math
# import numpy as np
# from functools import lru_cache

args = sys.argv
if len(args) == 2:
  from IPython import embed
  em = True
else:
  em = False

# sys.setrecursionlimit(10000)

#### input
A, B = map(int, input().split())
# a = list(map(int, input().split()))
# a = list(map(lambda x: int(x)*(-1), a))  # 各要素を-1倍


# n = int(input())
# t = [int(input()) for i in range(n)]
if em: sys.stdin = open('/dev/tty')

#### function
# @lru_cache(maxsize=10000)

#### process
# if em: embed()

print(math.ceil(B/A))
## heapsort, O(logN)
# import heapq
# heapq.heapify(A)
# min = heapq.heappop(A)
# heapq.heappush(A, new_element)

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

if A >= B:
  print(1)
  
else:
 
  for i in list(range(1,21)):
    if (A-1) * i + A >= B:
      print(i+1)
      break

Submission status: Wrong Answer

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

if A >= B:
  print(1)
  
else:
 
  for i in list(range(1,21)):
    if (A-1) * (i-1) + A >= B:
      print(i)
      break

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:
n,p= map(int,input().split())
count=1
ans=0
ans+=n
for i in range(30):
   if ans < p:
      ans+=(n-1)
      count+=1
print(count)

Submission status: Wrong Answer

Solution code:
n,p= map(int,input().split())
count=1
ans=0
ans+=n
for i in range(21):
   if ans < p:
      ans+=(n-1)
      count+=1
print(count)

Submission status: Wrong Answer

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

cnt = 0
hole = a
if b<=a:
    cnt = 1

elif b==1:
    cnt = 0
else:
    for i in range(pow(2,10)):
            hole +=(a-1)
            
            if b<=hole:
                cnt = i+2
                break
            else:
                pass
print(cnt)

Submission status: Wrong Answer

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

cnt = 0
hole = a
if b<=a:
    cnt = 1

else:
    for i in range(pow(2,10)):
            hole +=(a-1)
            
            if b<=hole:
                cnt = i+2
                break
            else:
                pass
print(cnt)

Submission status: Wrong Answer

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

cnt = 0
hole = a
if b<=a:
    cnt = 1

else:
    for i in range(60):
            hole +=(a-1)
            
            if b<=hole:
                cnt = i+2
                break
            else:
                pass
print(cnt)

Submission status: Wrong Answer

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

cnt = 0
hole = a
if b<=a:
    cnt = 1
else:
    for i in range(15):
            hole +=(a-1)
            
            if b<=hole:
                cnt = i+2
                break
            else:
                pass
print(cnt)

Submission status: Wrong Answer

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

cnt = 0
hole = a
if b<=a:
    cnt = 1
else:
    for i in range(b):
            hole +=(a-1)
            
            if b<=hole:
                cnt = i+2
                break
            else:
                pass
print(cnt)

Submission status: Wrong Answer

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

cnt = 0
hole = a
if b<=a:
    cnt = 1
else:
    for i in range(b):
            hole +=(a-1)
            
            if b<=hole:
                cnt = i+2
            else:
                pass
print(cnt)

Submission status: Wrong Answer

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

cnt = 0
hole = a
if b<=a:
    cnt = 1
else:
    for i in range(b//a):
            hole +=(a-1)
            
            if b<=hole:
                cnt = i+2
            else:
                pass
print(cnt)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
import math

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

Solution code:
import math
#電源タップの差込口の個数、拡張したい個数
A,B=input().split()
A=int(A)
B=int(B)
print(math.ceil(B/A))

Submission status: Wrong Answer

Solution code:
import math
#電源タップの差込口の個数、拡張したい個数
A,B=input().split()
A=int(A)
B=int(B)
print(B/A)
print(math.ceil(B/A))

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

for j in range(500):
    if B<=A*j:
        break
    else:
        j+1
print(j)

Submission status: Wrong Answer

Solution code:
num = list(map(int,input().split()))
#num[0]:A
#num[1]:B
A = num[0]
B = num[1]
j = 0
for i in range(500):
    if B<=A*j:
        break
    else:
        j+1
print(j)

Submission status: Wrong Answer

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

for j in range(20):
    if B<=A*j:
        break
    else:
        pass
print(j)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

dif = A - 1

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

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

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:
#!/usr/bin/python
# -*- coding: utf-8 -*-
import sys,collections,itertools,re,math,fractions,decimal,random,array,bisect,heapq

# decimal.getcontext().prec = 50
# sys.setrecursionlimit(10000)
# MOD = 10**9 + 7

def solve(f):
    a, b = f.read_int_list()

    n = a
    ans = 1
    while n < b:
        n += a - 1
        ans += 1

    return ans


class Reader(object):
    def __init__(self, filename=None):
        self.file = open(filename) if filename is not None else None
        self.case = 1

    def __readline(self):
        return self.file.next().strip() if self.file else raw_input()

    def next_case(self):
        self.file.next()
        self.case += 1

    def read_int(self): return int(self.__readline())
    def read_float(self): return float(self.__readline())
    def read_long(self): return long(self.__readline())
    def read_decimal(self): return decimal.Decimal(self.__readline())
    def read_str(self): return self.__readline()

    def read_int_list(self): return map(int, self.__readline().split())
    def read_float_list(self): return map(float, self.__readline().split())
    def read_long_list(self): return map(long, self.__readline().split())
    def read_decimal_list(self): return map(decimal.Decimal, self.__readline().split())
    def read_str_list(self): return self.__readline().split()

if __name__ == '__main__':
    filename = sys.argv[1] if len(sys.argv) > 1 else None
    f = Reader(filename)
    if f.file:
        while True:
            print "Case #%d\n"%f.case, solve(f)
            try:
                f.next_case()
            except StopIteration:
                break
    else:
        print solve(f)

Submission status: Wrong Answer

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


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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
import math 
a,b=[int(i) for i in input().split()]
curr = 1
tot = 0
while curr<b:
  curr += (a-1)
  tot += 1
  print(tot)

Submission status: Wrong Answer

Solution code:
import math 
a,b=[int(i) for i in input().split()] 
if a>=b: 
	print(1) 
else: 
    curr = 1
    tot = 0
    while curr<b:
      curr += (a-1)
      tot += 1
    print(tot)

Submission status: Wrong Answer

Solution code:
import math 
a,b=[int(i) for i in input().split()] 
if a>=b: 
	print(1) 
else: 
    curr = a
    tot = 1
    while curr<b:
      curr += (a-1)
      tot += 1
    print(tot)

Submission status: Wrong Answer

Solution code:
import math 
a,b=[int(i) for i in input().split()] 
if a>=b: 
	print(1) 
else: 
    b-=a
    curr = a
    tot = 1
    while curr<b:
      curr += (a-1)
      tot += 1
    print(tot)

Submission status: Wrong Answer

Solution code:
import math 
a,b=[int(i) for i in input().split()] 
if a>=b: 
	print(1) 
else: 
    b-=a
    curr = b
    tot = 1
    while curr>0:
      curr -= (a-1)
      tot += 1
    print(tot)

Submission status: Wrong Answer

Solution code:
import math 
a,b=[int(i) for i in input().split()] 
if a>=b: 
	print(1) 
else: 
    b-=a 
    print(1+math.ceil(b/(a-1)))

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

for i in range(1, 11):
    if B <= A*i:
        count = i
        break

print(count)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

if A >= B:
  print(1)
else:
  res = A
  i = 1
  while res < B:
    res += 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())

print(B % A + 1)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

amount = 0
count = 1

while list[1] > amount:

    amount = count * (list[0] - 1) + 1
    count += 1

count = count -1
print(count)

Submission status: Wrong Answer

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

amount = 0
count = 1

while list[1] > amount:
    
    amount = count * (list[0] - 1) + 1
    count += 1

print(count)

Submission status: Wrong Answer

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

amount = 0
count = 0

while amount < list[1]:
    count += 1
    amount = count * (list[0] - 1) + 1

print(count)

Submission status: Wrong Answer

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

amount = 0
count = 0

while amount <= list[1]:
    count += 1
    amount = list[0]*count + 1 - count

print(count)

Submission status: Wrong Answer

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

amount = 0
count = 0

while amount < list[1]:
    count += 1
    amount = list[0]*count + 1 - count

print(count)

Submission status: Wrong Answer

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

amount = 0
count = 0

while amount < list[1]:
    count += 1
    amount += list[0] + 1 - count 

print(count)

Submission status: Wrong Answer

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

amount = 0
count = 0

while amount < list[1]:
    amount += list[0]
    count += 1

print(count)

Submission status: Wrong Answer

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

ans = 0

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

print(ans)

Submission status: Wrong Answer

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

ans = 0

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

print(ans)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
import math
a , b  = map(int, input().split())
x =math.floor(b/a)+1

print(x)

Submission status: Wrong Answer

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

count = A
ans = 0

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
A, B = map(int, input().split())
i = 1
total = 1
while True:
    total += A - 1
    if total >= B:
        print(i)
        exit()
    i += 1

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

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

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

Submission status: Wrong Answer

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

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

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

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

Submission status: Wrong Answer

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

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

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

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

Submission status: Wrong Answer

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


sockets = a
tap_num = 1
while(True):
    if sockets >= b:
        break
    sockets = sockets - 1 + a
    tap_num += 1

print(tap_num)

Submission status: Wrong Answer

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


if __name__ == '__main__':
  main()

Submission status: Wrong Answer

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


if __name__ == '__main__':
  main()

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
#a = input().split(" ")
#b = input().split(" ")

a = [ int(i) for i in input().split(" ") ]

count=0
i=0

count=count+a[1]//a[0]

if a[1]%a[0] != 0:
  count=count+1

print(count)

Submission status: Wrong Answer

Solution code:
a,b=list(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())	
cnt=1
while a < b:
    a+=a-1
    cnt+=1

print(cnt)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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


tap_num  = b // (a -1 )
add_port = b % (a -1 )

if (b - a) <= 1 :
  print(2 if (b - a) == 1 else 1)
else:
  print(tap_num if add_port <= 1 else tap_num + 1)

Submission status: Wrong Answer

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


tap_num  = b // (a -1 )
add_port = b % (a -1 )

if (b - a) <= 1 :
  print(2 if (b - a) == 1 else 1)
else:
  print(tap_num if add_port == 1 else tap_num + 1)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
S = input().split()
A = int(S[0])
B = int(S[1])
if B == 1:
    print(0)
    exit()
if A >= B:
    print(1)
    exit()
ans = (B-1) // (A - 1)
print(ans)

Submission status: Wrong Answer

Solution code:
S = input().split()
A = int(S[0])
B = int(S[1])
if B == 1:
    print(0)
if A >= B:
    print(1)
    exit()
ans = (B-1) // (A - 1)
print(ans)

Submission status: Wrong Answer

Solution code:
S = input().split()
A = int(S[0])
B = int(S[1])
if A >= B:
    print(1)
    exit()
ans = (B-1) // (A - 1)
print(ans)

Submission status: Wrong Answer

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

if b == 1:
    ans = 0

elif a >= b:
    ans = 1

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

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


print(i+1)

Submission status: Wrong Answer

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

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

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


print(i+1)

Submission status: Wrong Answer

Solution code:
import math
import sys

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

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


num=b/a
num=int(num)

if a==b:
    print(num)
else:
    print(num+1)

Submission status: Wrong Answer

Solution code:
import math
import sys

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

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

num=b/a
num=int(num)
print(num+1)

Submission status: Wrong Answer

Solution code:
import math

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

num=b/a
num=int(num)
print(num+1)

Submission status: Wrong Answer

Solution code:
import math

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
a,b=map(int,input().split())
#p_3,p_4=map(int,input().split())
#n=int(input())
#S=input()
#T=input()
#recipe=[list(input().split())for _ in range(n)]
#m=int(input())
#have=[list(input().split())for _ in range(m)]
#s=[list(input())for _ in range(n)]
#h=list(map(int,input().split()))
#v=list(map(int,input().split()))
#c=list(map(float,input().split()))
#n=int(input())
#s=[list(map(int,input().split()))for _ in range(n)]
#s=[list(input().split())for _ in range(n)]
#s=[input()for _ in range(n)]
if b<=a:
    print(1)
    exit()
else:
    for i in range(b//a-100,b//a+100):
        if b<=(i-1)*(a-1)+a:
            print(i)
            exit()

Submission status: Wrong Answer

Solution code:
a,b=map(int,input().split())
#p_3,p_4=map(int,input().split())
#n=int(input())
#S=input()
#T=input()
#recipe=[list(input().split())for _ in range(n)]
#m=int(input())
#have=[list(input().split())for _ in range(m)]
#s=[list(input())for _ in range(n)]
#h=list(map(int,input().split()))
#v=list(map(int,input().split()))
#c=list(map(float,input().split()))
#n=int(input())
#s=[list(map(int,input().split()))for _ in range(n)]
#s=[list(input().split())for _ in range(n)]
#s=[input()for _ in range(n)]
if b<=a:
    print(1)
    exit()
else:
    for i in range(b//a,b//a+10):
        if b<=(i-1)*(a-1)+a:
            print(i)
            exit()

Submission status: Wrong Answer

Solution code:
a,b=map(int,input().split())
#p_3,p_4=map(int,input().split())
#n=int(input())
#S=input()
#T=input()
#recipe=[list(input().split())for _ in range(n)]
#m=int(input())
#have=[list(input().split())for _ in range(m)]
#s=[list(input())for _ in range(n)]
#h=list(map(int,input().split()))
#v=list(map(int,input().split()))
#c=list(map(float,input().split()))
#n=int(input())
#s=[list(map(int,input().split()))for _ in range(n)]
#s=[list(input().split())for _ in range(n)]
#s=[input()for _ in range(n)]
if b<=a:
    print(1)
else:
    print(b//a+1)

Submission status: Wrong Answer

Solution code:
a,b=map(int,input().split())
#p_3,p_4=map(int,input().split())
#n=int(input())
#S=input()
#T=input()
#recipe=[list(input().split())for _ in range(n)]
#m=int(input())
#have=[list(input().split())for _ in range(m)]
#s=[list(input())for _ in range(n)]
#h=list(map(int,input().split()))
#v=list(map(int,input().split()))
#c=list(map(float,input().split()))
#n=int(input())
#s=[list(map(int,input().split()))for _ in range(n)]
#s=[list(input().split())for _ in range(n)]
#s=[input()for _ in range(n)]
if a==b:
    print(1)
else:
    print(b//a+1)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
a,b=map(int,input().split())
#p_3,p_4=map(int,input().split())
#n=int(input())
#S=input()
#T=input()
#recipe=[list(input().split())for _ in range(n)]
#m=int(input())
#have=[list(input().split())for _ in range(m)]
#s=[list(input())for _ in range(n)]
#h=list(map(int,input().split()))
#v=list(map(int,input().split()))
#c=list(map(float,input().split()))
#n=int(input())
#s=[list(map(int,input().split()))for _ in range(n)]
#s=[list(input().split())for _ in range(n)]
#s=[input()for _ in range(n)]
if b%a==0:
    print(b//a)
    exit()
for i in range(b//a,b//a+10):
    tmp=i*a-i-1
    if b<=tmp:
        print(i)
        exit()

Submission status: Wrong Answer

Solution code:
a,b=map(int,input().split())
#p_3,p_4=map(int,input().split())
#n=int(input())
#S=input()
#T=input()
#recipe=[list(input().split())for _ in range(n)]
#m=int(input())
#have=[list(input().split())for _ in range(m)]
#s=[list(input())for _ in range(n)]
#h=list(map(int,input().split()))
#v=list(map(int,input().split()))
#c=list(map(float,input().split()))
#n=int(input())
#s=[list(map(int,input().split()))for _ in range(n)]
#s=[list(input().split())for _ in range(n)]
#s=[input()for _ in range(n)]
print(b//a) if b%a==0 else print(b//a+1)

Submission status: Wrong Answer

Solution code:
import sys
#sys.stdin=open("1.txt","r")
a,b=map(int,input().split())
now=a
i=1
if a==b:
    i-=1
while now<=b:
    now+=a-1
    i+=1
print(i)

Submission status: Wrong Answer

Solution code:
import sys
#sys.stdin=open("1.txt","r")
a,b=map(int,input().split())
now=a
i=1
if a<b:
    while now<b:
        now+=a-1
        i+=1
    print(i)
else:
    print(0)

Submission status: Wrong Answer

Solution code:
import sys
#sys.stdin=open("1.txt","r")
a,b=map(int,input().split())
now=a
i=1
if a<=b:
    while now<b:
        now+=a-1
        i+=1
    print(i)
else:
    print(0)

Submission status: Wrong Answer

Solution code:
import sys
#sys.stdin=open("1.txt","r")
a,b=map(int,input().split())
now=a
i=1
while now<b:
    now+=a-1
    i+=1
print(i)

Submission status: Wrong Answer

Solution code:
import sys
#sys.stdin=open("1.txt","r")
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:
import sys
input = sys.stdin.readline

#複数入力
a,b=(int(x) for x in input().split())
if b==1:
    print(0)
    exit(0)
ans=1
while True:
    if a>=b:
        break
    a+=(a-1)
    ans+=1
print(ans)

Submission status: Wrong Answer

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

#複数入力
a,b=(int(x) for x in input().split())
if b==1:
    print(0)
    exit(0)
ans=1
while True:
    if a>=b:
        break
    a+=a
    ans+=1


print(ans)