TnT/Multi_CodeNet4Repair huggingface dataset:
Problem: 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.

Submission attempts (in order):
a,b=map(int,input().split())

if b==0:
    ans=0
elif b<=a:
    ans=1
else:
    i =0
    check=0
    while check<b:
        check +=a-i
        i+=1
    ans=i
print(ans)

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

if b==1:
    ans=0
elif b<=a:
    ans=1
else:
    i =1
    check=a
    while check<b:
        check +=a-1
        i+=1
    ans=i
print(ans)

Verdicts: Wrong Answer

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

Submission attempts (in order):
a,b = map(int ,input().split())
n =0

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

a,b = map(int ,input().split())
n =0
l =1

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

Verdicts: Wrong Answer

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

Submission attempts (in order):
a, b = map(int,input().split())
print((b-1)+(a-2)//(a-1))

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

Verdicts: Wrong Answer

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

Submission attempts (in order):
a,b=input2()
count=1

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

from math import factorial as fact
import math
import sys
import itertools
import numpy as np
from collections import Counter
import datetime



def input1():
	return int(input())


def input2():
	return map(int,input().split())


def input_array():
	return list(map(int,input().split()))

def keta(N):
	return len(str(N))


def input_daytime(input_time):
	time,distance=input_time.split()
	t=time.split(":")
	se=str(t[-1]).split(".")
	dt1 = datetime.timedelta(hours=int(t[0]),minutes=int(t[1]),seconds=int(se[0]),milliseconds=int(se[1]))
	return dt1

def combinations(n,r):
	return list(itertools.combinations(range(n),r))



def all_sets(num_list):
	subsets=[]
	for i in range(2,len(num_list) + 1):
		for c in combinations(num_list, i):
			subsets.append(c) 
	return subsets


def ch(x1):
	cf=[]
	for i in range(2,math.sqrt(x1)+1):
		if x1 % i==0:
			cf.append(i)
	return cf

def CountOneRoots(x,y):
	
	return fact(x+y)/fact(x)/fact(y)


def prime_factorize(n):
    a = []
    while n % 2 == 0:
        a.append(2)
        n //= 2
    f = 3
    while f * f <= n:
        if n % f == 0:
            a.append(f)
            n //= f
        else:
            f += 2
    if n != 1:
        a.append(n)
    return a
			


a,b=input2()
p=0
count=0
while p<b:
	p+=a-1
	count+=1
print(count)








def input2():
	return map(int,input().split())

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

Verdicts: Runtime Error

Wrong Answer

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

Submission attempts (in order):
a = int(input())

b = int(input())

ans = int(0)

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

a = int(input())

b = int(input())

ans = int(0)

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

a = int(input())

b = int(input())

ans = int(0)

for i in range(21):
    if b > a*i-i:
            ans += 1
    else:
            break

print(ans)


a = int(input())

b = int(input())

ans = int(0)

for i in range(1,21):
    if b > a*i-i+1:
            ans += 1
    else:
            ans += 1
            break

print(ans)


a = int(input())

b = int(input())

ans = int(0)

for i in range(21):
    if b > a*i-i+1:
            ans += 1
    else:
            break

print(ans)


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

ans = int(1)

for i in range(20):
    ans += a-1
    if ans < b:
        continue
    elif i == 0 and 1 == b:
        print(0)
        break
    else:
        print(i+1)
        break


Verdicts: Runtime Error

Runtime Error

Runtime Error

Runtime Error

Runtime Error

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

Submission attempts (in order):
get = list(map(int, input().split()))

A = get[0]
B = get[1]

print(A)
print(B)

count = 0
plug = 1

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

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

A = get[0]
B = get[1]


count = 0
plug = 1

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

Verdicts: Wrong Answer

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

Submission attempts (in order):
a, b = map(int, input().split())
c = math.ceil(((b - 1) / a) + 1)
print(c)


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


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


Verdicts: Runtime Error

Wrong Answer

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

Submission attempts (in order):
A,B=map(int,input().split())
if B%A==1:
  res=B//(A-1)
else:
  res=-(-B//(A-1))
print(res)


A,B=map(int,input()．split())
res=-(-B//A)
print(res)

import sys
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
import numpy as np

def main():
    A, B = map(int, read().split())
    print(-((B-1) // (A-1)))
    return

if __name__ == '__main__':
    main()



import sys
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
import numpy as np

def main():
    A, B = map(int, read().split())
    print((B-1) % (A-1))
    return

if __name__ == '__main__':
    main()



import sys
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines

def main():
    A, B = map(int, read().split())
    print(-(-(B-1) // (A-1)))
    return

if __name__ == '__main__':
    main()



Verdicts: Wrong Answer

Runtime Error

Wrong Answer

Wrong Answer

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

Submission attempts (in order):
a,b = map(int,input().split())
b -= 1
if a%b == 0:
    print(a//b)
else:
    print(a//b+1)

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

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

Verdicts: Runtime Error

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

Submission attempts (in order):
A, B = map(int, input().split())

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

if A > B or A ==B :
    print(1)
else:
    print(ans)

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

ans = 1
s = a


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

Verdicts: Wrong Answer

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

Submission attempts (in order):
A, B = map(int,input().split())
con,out = 0,1
for out < B:
  out = out -1
  out = out + A
  con += 1
print(con)
  

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

Verdicts: Runtime Error

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

Submission attempts (in order):
a, b = map(int, input().split())
num = a
for i in range(50):
    if num > b:
        break
    else:
        num -= 1
        num += a
print(i+1)

a, b = map(int, input().split())
num = a
c = 1
while True:
    if num >= b:
        break
    else:
        num += a-1
print(c)

a, b = map(int, input().split())
if b == 1:
    print(0)
    exit(0)
num = a
c = 1
while True:
    if num >= b:
        break
    else:
        num += a-1
        c += 1
print(c)

Verdicts: Wrong Answer

Wrong Answer

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

Submission attempts (in order):
A, B = map(int, input().split())
import math
c = math.ceil((B - A) / (B - 1))
print(c + 1)


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

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

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

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

Verdicts: Runtime Error

Runtime Error

Runtime Error

Runtime Error

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

Submission attempts (in order):
import math
A,B=map(int, input().split())

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

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

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

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

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

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

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

Verdicts: Wrong Answer

Runtime Error

Runtime Error

Runtime Error

Wrong Answer

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

Submission attempts (in order):
import sys
A,B = map(int,input().split())
plug = 1
socket = 0
while True:
  new_plug += A
  socket += 1
  if new_plug >= B:
    print(socket)
    sys.exit(0)

import sys
A,B = map(int,input().split())
plug = 1
socket = 0
while True:
  if plug >= B:
    print(socket)
    sys.exit(0)
  plug += A
  socket += 1
  plug -= 1

Verdicts: Runtime Error

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

Submission attempts (in order):
A, B = list(map(int,input().split(' ')))
print(A,B)
for n in range(100):
  if n*A-(n-1) >= B:
    print(n)
    break

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

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

Verdicts: Wrong Answer

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

Submission attempts (in order):
a,b= map(int,input().split())
for i in range(b):
  if 1+(a-1)*i >= b:
    print(i)

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

Verdicts: Wrong Answer

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

Submission attempts (in order):
A, B = map(int,input().split())
mishiyou=1
n=0
while mishiyou-1+A <= B:
    mishiyou+=(A-1)
    n+=1
print(n+1)

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

Verdicts: Wrong Answer

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

Submission attempts (in order):
a,b = map(int,input().split())

count_p = 0
count = 0

if b = 1:
    print(count)

while True:
    if count == 0:
        count_p += a
    
    else:
        count_p += a-1
    
    count += 1
    
    if count_p >= b:
        break

print(count)
    

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

count_p = 0
count = 0

if b == 1:
    print(count)

else:
    while True:
        if count == 0:
            count_p += a
    
        else:
            count_p += a-1
    
        count += 1
    
        if count_p >= b:
            break

    print(count)

Verdicts: Runtime Error

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

Submission attempts (in order):
a,b = map(int,input().split())
num = 0
while num <b:
  a, b = map(int, input().split())
num = a
ans = 1
while num < b:
    num += a-1
    ans += 1
print(ans)

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

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


Verdicts: Runtime Error

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

Submission attempts (in order):
a, b = map(int,input().split())
print((b + a - 2)//(a - 1))


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


Verdicts: Wrong Answer

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

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


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


Verdicts: Runtime Error

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

Submission attempts (in order):
a, b = map(int, input().split())
if b == 1:
    print(0)
    exit(0)
sum = a
ct = 1

while sum  <= b:
    ct += 1
    sum += a - 1

print(ct)

a, b = map(int, input().split())
if b == 1:
    print(0)
    exit(0)
sum = a
ct = 1

while sum  < b:
    ct += 1
    sum += a - 1

print(ct)

Verdicts: Wrong Answer

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

Submission attempts (in order):
A,B=[int(x) for x in input().split(" ")]
for i in range(20):
    if A+i*(A-1)>=B: break
print(i)

A,B=[int(x) for x in input().split(" ")]
for i in range(20):
    if A+(i-1)*(A-1)>=B: break
print(i)

Verdicts: Wrong Answer

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

Submission attempts (in order):
a, b = map(int, input().split())

if a >= b:
    result = b // a

if a < b:
    if (b - a) < a:
        result = b // a + 1
    else:
        result = (b - a) // (a - 1) + 2

print(result)

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

result = ((b-2)//(a-1)+1)

print(result)

Verdicts: Wrong Answer

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

Submission attempts (in order):
a,b=int(input().split())

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

a,b=input().split()

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


Verdicts: Runtime Error

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

Submission attempts (in order):
a,b=map(int,input().split())
print(1-int((1-b)/(a-1)))

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

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

Verdicts: Wrong Answer

Runtime Error

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

Submission attempts (in order):
A,B=map(int,input().split(" "))
flag=True
N=A
co=0
while flag==True:
    if N==B or N>B:
        print(1)
        flag=False
    else:
        N+=A-1
        co+=1
        if N>=B:
            print(co)
            flag=False


A,B=map(int,input().split(" "))
from math import*
print(ceil(1+(B-A)/(A-1)))


Verdicts: Wrong Answer

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

Submission attempts (in order):
import math
A,B = map(int,input().split())

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

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

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


Verdicts: Runtime Error

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

Submission attempts (in order):
A,B = (int(i) for i in input().split())

if B == 1:
    print(0)

else:
    ans = 1
    while 1:
        if A + (A-1) * (ans - 1) >= B:
            break
            ans += 1

    print(ans)


A,B = (int(i) for i in input().split())

if B == 1:
    print(0)

else:
    ans = 1
    while 1:
        if A + (A-1) * (ans - 1) >= B:
            break
        ans += 1

    print(ans)


Verdicts: Time Limit Exceeded

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

Submission attempts (in order):
A,B = list(map(int, input().split()))
i=0
while A < B:
  A = 2*A + 1
  i = i+1
print(i)

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

Verdicts: Wrong Answer

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

Submission attempts (in order):

import sys


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

A, B = ISI()
for i in range(1, 10000):
    if i == 1:
        sum = A
    else:
        sum = A*i-(i-1)


import sys


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

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



import sys


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

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

Verdicts: Wrong Answer

Wrong Answer

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

Submission attempts (in order):
a,b=map(int,input().split())
cnt = 1
b -= a
if b == 1:
  print('0')
while True:
  if b > 0:
  	b -= (a - 1)
    cnt += 1
  else:
    print(cnt)
    break


a,b=map(int(input().split()))
cnt = 1
b -= a
if b == 1:
  print('0')
while True:
  if b > 0:
  	b -= (a - 1)
    cnt += 1
  else:
    print(cnt)
    break


a,b=int(input().split())
cnt = 1
b -= a
if b == 1:
  print('0')
while True:
  if b > 0:
  	b -= (a - 1)
    cnt += 1
  else:
    print(cnt)
    break


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

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

a,b=int(input().split())
cnt = 1
b -= a
while True:
  if b > 0:
  	b -= (a - 1)
    cnt += 1
  else:
    break
print(cnt)

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

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

Verdicts: Runtime Error

Runtime Error

Runtime Error

Runtime Error

Runtime Error

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

Submission attempts (in order):
A, B = [int(i) for i in input().split()]
count = A
result = 1
if A < B:
    while count <= B:
        if count == B:
            break
        else:
            count += (A - 1)
            result += 1
    print(count)
    print(result)

else:
    print(B//A)

A, B = [int(i) for i in input().split()]
result = 1
require_socket = B - A

if B == 1:
    print(0)
else:
    result += require_socket // A - 1
    if (require_socket / A - 1).is_integer() is False:
        result += 1

print(result)

A, B = [int(i) for i in input().split()]
result = 1
require_socket = B - A

result += require_socket // (A - 1)
if (require_socket / (A - 1)).is_integer() is False:
    result += 1

print(result)

Verdicts: Wrong Answer

Wrong Answer

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

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

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

a,b = map(int,input().split())
c = 1 
ans = 1
if c < b:
  c += a-1
  ans += 1
print(ans)
  


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


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


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

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


Verdicts: Runtime Error

Wrong Answer

Wrong Answer

Wrong Answer

Wrong Answer

Wrong Answer

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

Submission attempts (in order):
x = input().split()
A, B = x[0], x[1]
n = 1
t = 0
while n <= B:
  n += A - 1
  t += 1
print(t)

x = input().split()
A, B = int(x[0]), int(x[1])
n = 1
t = 0
while n < B:
  n += A - 1
  t += 1
print(t)


Verdicts: Runtime Error

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

Submission attempts (in order):
import sys
import math

A, B = list(map(int, sys.stdin.readline().split(' ')))

C = math.ceil((B - 1) / (A - 1))

print(A, B, C)


import sys
import math
 
A, B = list(map(int, sys.stdin.readline().split(' ')))

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

Verdicts: Wrong Answer

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

Submission attempts (in order):
a, b =map(int, input().split())

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

a, b =map(int, input().split())
d, q = divmod(b-1,a-1)
if q == 0:
  print(d)
else:
  print(d+1)

Verdicts: Wrong Answer

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

Submission attempts (in order):
import math
a,b = map(int,input().split())
print(math.ceil((b-a)/(a-1)))


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

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


Verdicts: Wrong Answer

Wrong Answer

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

Submission attempts (in order):
a, b = map(int, input().split())
i = 0
count = 1
while true:
  if b <= count:
    break
  count = count + a - 1
  i += 1
print(i)



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

Verdicts: Runtime Error

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

Submission attempts (in order):
A,B=map(int,input().split())
print((B-1)//(A-1)+1)

A,B=map(int,input().split())
x=((B-1)//A+1)
all=A*x
use=x
notuse=all-use
if notuse<B:
    add=(B-notuse-1)//A+1
    print(x+add)
else:
  print(x)


A,B=map(int,input().split())
x=((B-1)//A+1)
all=A*x
use=x
nuse=all-use
if nuse>=B:
  print(x)    
else:
  add=(B-nuse)//A+1
  print(x+add)

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

A,B=map(int,input().split())
x=((B-1)//A+1)
all=A*x
use=x
notuse=all-use
if notuse<B:
    add=(B-notuse-1)//A+1
print(x+add)

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

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

Verdicts: Wrong Answer

Wrong Answer

Wrong Answer

Wrong Answer

Runtime Error

Wrong Answer

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

Submission attempts (in order):
# 2019 9.1
# Power Socket

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

kuti = 1
cnt = 0

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

print(cnt)

# 2019 9.1
# A Tenki

S = list(input())
T = list(input())

cnt = 0

for i in range(3):
    if S[i] == T[i]:
        cnt += 1

print(cnt)

# 2019 9.1
# Power Socket

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

kuti = 1
cnt = 0

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

print(cnt)

Verdicts: Wrong Answer

Runtime Error

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

Submission attempts (in order):
A,B=map(int, input().split()) 
for i in range(B):
  t = A - 1
  if B <= t * (i+1):
    print(i+1)
    break

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


Verdicts: Wrong Answer

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

Submission attempts (in order):
a, b = map(int, input().split())
c = 0
sum = 0
while True:
    if sum < b:
      sum += (a-1)
      c += 1
    else:
      c -= 1
      break

a, b = map(int, input().split())
c = 0
sum = 1
while True:
    if sum>= b:
        print(c)
        break
    else:
        sum += a-1
        c+= 1


Verdicts: Wrong Answer

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

Submission attempts (in order):
A,B=map(int,input().split())
for i in range(20):
    if i*A-i>=B:
        print(i)
        exit()

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

Verdicts: Wrong Answer

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

Submission attempts (in order):
x,y = map(int,input().split())
t = x
c = 0
for i in range(100):
    t += x-1
    c += 1
    if t>=y:
        print(c)
        break

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

x,y = map(int,input().split())
t = x
c = 1
if y == 1:
    print(0)
    exit()
for i in range(100):
    if t>=y:
        print(c)
        break
    t += x-1
    c += 1
    #print(t)


Verdicts: Wrong Answer

Wrong Answer

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

Submission attempts (in order):
def invr():
    return(map(int, input().split()))


a, b = invr()

print(int(b/a))


def invr():
    return(map(int, input().split()))


a, b = invr()
c = 0
outlet = 1
while outlet < b:
    outlet -= 1
    outlet += a
    c += 1
print(c)


Verdicts: Wrong Answer

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

Submission attempts (in order):


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

count = 1

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



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

count = 0

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


tap,out = map(int,input().split()
print(int((out-1)/(tap-1)))


a,b = map(int,input().split())
m = 1
cnt = 0
while True:
    if b > m:
        break
    else:
        m -= 1
        m += a
        cnt += 1
print(cnt)



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

count = 1

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


tap,out = map(int,input().split()
print((out-1)/(tap-1))


import sys
import os
f = open('input.txt', 'r')
sys.stdin = f

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

count = 1

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


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


Verdicts: Wrong Answer

Wrong Answer

Runtime Error

Wrong Answer

Wrong Answer

Runtime Error

Runtime Error

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

Submission attempts (in order):
A, B = map(int, input().split())

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

print(ans)

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

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

print(ans)

Verdicts: Wrong Answer

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

Submission attempts (in order):


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

c = 1

d = b // (a-1)
e = b % (a-1)

if e == 1:
    d = d - 1

print(d)



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

c = 1

d = (b-1)//a
e = (b-1)%a

if e == 1:
    d = d - 1

print(d)



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

c = 1

d = b // a
e = b % a

if e == 1:
    d = d + 1

print(d)

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

c = 1
d = 0
for b >= c:
    c = c+a-1
    d++
    
print(d)

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

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

Verdicts: Wrong Answer

Wrong Answer

Wrong Answer

Runtime Error

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

Submission attempts (in order):
A,B=map(int,input().split())


count=0
if A>=B:
    count=1
else:
    while B>=0:
        if B-A>=0:
            B-=A
            count+=1
        else:
            break
print(count)


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


if B==1:
    n=0
else:
    n=1
    while True:
        if n*A-n+1>=B:
            break
        else:
            n+=1

print(n)


Verdicts: Wrong Answer

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

Submission attempts (in order):
a, b = map(int, input().split(' '))
cnt += 0
avi = 1
while 1:
    cnt += 1
    avi += a - 1
    if avi >= b:
        break
print(cnt)


a, b = map(int, input().split(' '))
cnt = 0
avi = 1
while 1:
    if avi >= b:
        break

    cnt += 1
    avi += a - 1

print(cnt)


Verdicts: Runtime Error

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

Submission attempts (in order):
a,b=map(int,input().split())
print(b//a)

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

Verdicts: Wrong Answer

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

Submission attempts (in order):
A, B = map(int, input().split())
print((A+B-1)//(A-1))

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

Verdicts: Wrong Answer

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

Submission attempts (in order):
import math
A,B=(int(x) for x in input().split())
math.floor(B/A)

import math
A,B=(int(x) for x in input().split())
k=(B-1)/(A-1)
math.ceil(k)

import math
A,B=(int(x) for x in input().split())
k=(B-1)/(A-1)
if B==1:
    print(0)
else:
    print(math.ceil(k))

Verdicts: Wrong Answer

Wrong Answer

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

Submission attempts (in order):
A,B=map(int,input(),split())
print((B-1)//A+1)

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

Verdicts: Runtime Error

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

Submission attempts (in order):
A,B = map(int,input().split())
cnt = A
num = 1
i = 1
if B == 1:
    print("0")
    exit()
while 1:
    if cnt >= B:
        print(num)
        exit() 
    cnt += (A-1)
    print(cnt)
    num += 1
i += 1
    

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

Verdicts: Wrong Answer

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

Submission attempts (in order):
a, b = map(int, input().split())
num_tap = 0
output = 0
if b == 1:
  print(0)
else:
  for i in range(30):
  output += 1
  if i == 0:
    num_tap += a
  else:
    num_tap += a-1
  if num_tap >= b:
    break
  print(output)

a, b = map(int, input().split())
num_tap = 0
output = 0
if b == 1:
  print(0)
else:
  for i in range(30):
    output += 1
    if i == 0:
      num_tap += a
    else:
      num_tap += a-1
    if num_tap >= b:
      break
  print(output)

Verdicts: Runtime Error

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

Submission attempts (in order):
A, B = map(int,input().split())
count_A = 0
total = 1
if B == 1:
    print(count_A)
else:
    while True:
        count_A += 1
        total += A-1
        if total > B:
            break
    print(count_A)

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

Verdicts: Wrong Answer

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

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


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


Verdicts: Wrong Answer

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

Submission attempts (in order):
a, b = map(int, input().split(" "))

plug = [0] * 50
plug[0] = 1

i = 0
while plug[i] < B:
  i += 1
  plug[i] = plug[i-1] + a - 1
print(i)

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

Verdicts: Runtime Error

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

Submission attempts (in order):
a,b = map(int,input().split())

for i in range(1,100):
    if a <= b:
        print(1)
        break

    elif (a-1) * i + a >= b:
        print(i+1)
        break

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

Verdicts: Wrong Answer

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

Submission attempts (in order):
min_tap = 0
if B <= A:
    min_tap = 1
else:
    min_tap =math.ceil((B-A)/(A-1))+1
print(int(min_tap))

import math
A,B= list(map(int,input().split()))

#    if (A-1)*(i-1)+A >=B:
#        print(i)
#        break
print(math.ceil((B-A)/(A-1))+1)


Verdicts: Runtime Error

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

Submission attempts (in order):
A,B=map(int,input().split())
cmt=0
while True:
  if (A-1)*cnt+1>=B:
    break
  cnt+=1
print(cnt)

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

Verdicts: Runtime Error

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

Submission attempts (in order):
a, b = map(int, input().split())

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

print(ans)

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

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

print(ans)


Verdicts: Wrong Answer

Accepted