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):
# 12/11 15:50 give up
a,b = map(int,input().split())
ans = 0
t = 0
while b > t:
    ans += 1
    t += a-1
print(ans)

a,b = map(int,input().split())
ans = 0
t = 1
while True:
    if t >= b:
        print(ans)
        exit(0)
    ans += 1
    t = t-1 + 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()
           
import math

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

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

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

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 math
b,a = map(int,input().split())
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(1+math.ceil((B-A)/(A-1)))

Verdicts: 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())
n=0
count=0
while n<=B:
    n+=(A-1)
    count+=1
print(count)

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

A,B=map(int,input().split())
ans = 0
tap=1
while(tap<B):
    ans+=1
    tap+=A-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):
# coding: utf-8
import math

a, b = map(int, input().split())
ans = 0
consent = 0
plusplug = a - 1
if a >= b:
    print(1)
else:
    while consent < b:
        consent += plusplug
        ans += 1
    print(ans)

# coding: utf-8
import math

a, b = map(int, input().split())
ans = 0
consent = 0
plusplug = a - 1
if a >= b:
    print(1)
else:
    while consent <= b:
        consent += plusplug
        ans += 1
    print(ans)

# coding: utf-8
import math
a, b = map(int, input().split())
ans = 1
now_consent = a
plusplug = a - 1
if b == 1:
  print(0)
elif a >= b:
    print(1)
elif a < b:
    other = b - a
    ans += math.ceil(other / plusplug)
    print(ans)

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())

a = 1
count = 0

while True:
  if a >= B:
    print(count)
    exit()
  a = a - 1 + A
  cnt += 1

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

if C % (A-1) == 0:
  print(C//(A-1)+1)
elif C % (A-1) != 0 :
  print(C//(A-1)+2)



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 numpy as np
import functools
import math
import collections
import scipy
import fractions
import itertools

def solve():
  a, b = map(int, input().split())
  if b <= 1:
    print(0)
  elif a >= b:
    print(1)
  else:
    print(math.ceil(b/(a-1)))
  return 0
 
if __name__ == "__main__":
  solve()


def solve():
  a, b = map(int, input().split())
  if b <= 1:
    print(0)
  elif a >= b:
    print(1)
  else:
    print(b//(a-1)+1)
  return 0
 
if __name__ == "__main__":
  solve()


import numpy as np
import functools
import math
import collections
import scipy
import fractions
import itertools

def solve():
  a, b = map(int, input().split())
  if b <= 1:
    print(0)
  elif a >= b:
    print(1)
  else:
    print(math.ceil((b-a)/(a-1))+1)
  return 0
 
if __name__ == "__main__":
  solve()

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
if b!=1:



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

print(i)

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

ans = a
cnt = 1
while b>ans:
    ans += a-1
    cnt+=1

if b == 1:
    print(0)
else:
    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):
l = list(map(int, input().split()))
     
if l[0]<2 or l[0]>20 or l[1]<1 or l[1]>20:
	sys.exit()
     
a = 0
while l[0] <= l[1]:
	l[1] = l[1] - l[0]
	a += 1
print(a)

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

if A<2 or A>20 or B<1 or B>20:
	exit()

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

a = 1
while A < B:
	B = B - A + 1 
	a += 1
print(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())
s=A
count=0
while True:
    s+=A-1
    count+=1
    if s>=B:
        break
print(count)

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

s=1
count=0
while True:
    if s>=B:
        break
    s+=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):
import math


def power():
    A, B = map(int, input().split())
    socket = A
    numberOfStrips = 1
    if A == B:
        return 1

    while socket <= B:
        socket = socket + A - 1
        numberOfStrips = numberOfStrips + 1

    return numberOfStrips


print(power())

def power():
    A, B= map(int, input().split())
    socket = A
    numberOfStrips = 1
    if A == B:
      return 1
    
    while (socket < B) and (socket != B):
        numberOfStrips = numberOfStrips + 1
        socket = A * numberOfStrips - numberOfStrips
 
    return numberOfStrips
 
 
print(power())

def power():
    A, B= map(int, input().split())
    socket = A
    numberOfStrips = 1
    if A == B:
      return 1
    
    temp = 0
    while (temp < B):
        numberOfStrips = numberOfStrips + 1
        temp = (socket * numberOfStrips) - numberOfStrips
 
    return numberOfStrips
 
 
print(power())

def power():
    A, B= map(int, input().split())
    socket = A
    numberOfStrips = 1
    while socket <= B:
        socket = socket + A - 1
        numberOfStrips = numberOfStrips + 1
 
    return numberOfStrips
 
 
print(power())

import math


def power():
  	A, B= map(int, input().split())
    return math.ceil(A / B)


print(power(8, 8))

def power():
    A, B= map(int, input().split())
    socket = A
    numberOfStrips = 1
    if A == B:
        return 1
    
    while socket <= B:
        socket = socket + A - 1
        numberOfStrips = numberOfStrips + 1
 
    return numberOfStrips
 
 
print(power())

import math

def power():
    A, B= map(int, input().split())
    return math.ceil(A / B)

print(power())

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

def power():
    A, B = map(int, input().split())
    socket = 1
    numberOfStrips = 0

    while socket < B:
        socket = socket + A - 1
        numberOfStrips = numberOfStrips + 1

    return numberOfStrips


print(power())

Verdicts: Wrong Answer

Wrong Answer

Wrong Answer

Wrong Answer

Runtime Error

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())

out=1
cnt=0

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

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

out=1
cnt=0

while out<B:
  cnt+=1
  out+=A-1
  
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):
mn = list(input().split())
mn = [int(i) for i in mn]
m = mn[0]
n = mn[1]
if m>=n:
	print("1")
else:
	outputs = m
	i = 2
	while outputs<n:
		outputs = m*i
		i += 1
	print(str(i-1)+" adapters, each with "+str(m)+" audio outputs, extend the single audio output to "+str(n))


n = int(input())
s = input()
hs = [ int(i) for i in s.rsplit() ]

max = 0
for i in range(len(hs)):
    lmax = 0
    for k in range(1, len(hs)-i):
        if hs[i+k] <= hs[i+k-1]:
            lmax = lmax + 1
        else:
            break

        if lmax > max:
            max = lmax

print(max)

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

import math
A = input()
B = input()
n = math.ceil(B/A)
print(n, " power strips, each with", A , "sockets, extend the socket into", A*n, "empty sockets.")

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

a,b=[int(x) for x in input().split()]
print(int((b-1)/(a-1)+0.9999))



Verdicts: Wrong Answer

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 = map(int, input().split())
c = 0
i = 0
while c < b:
    if i == 1:
        c = a
    else:
        c = a*i-i+1
    i += 1
print(i)

a, b = map(int, input().split())
c = 0
i = 0
if b == 1:
    print(0)
else:
    while c < b:
        i += 1
        if i == 1:
            c = a
        else:
            c = a*i-i+1
    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())
c=(b-1)/(a-1)
if c-int(c)==0:
  print(str(c))
  
else:
  print(int(c)+1)
  


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


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


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


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


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

else:
  print(int(c)+1)

Verdicts: Wrong Answer

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())
i = 0
count = 0
if b == 1:
    print(0)
else:
    while count < b:
    i += 1
    count = i*a-(i-1)
    
    else:
        print(i)

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

import math
A,B  = list(map(int,input().split()))
ans  = 1
c = 0
if B ==1:
    print("0")
elif B <= A:
    print("1")
else:
    while ans < B:
        ans += A-1
        c += 1
    print(c)

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
count = 1

while num < b:
    num += a-1
    count += 1

print(count)




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

while socket < b:
    socket += 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())

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

a,b = map(int,input().split())
ans = 0
tap = 1
while tap < b:
  ans += 1
  tap += a-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())

print((b-1)//a)

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

print(-((-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(input().split(" "))
i = 1
while i >=1:
  d = (a-1)*i +1
  if d >= b:
    print(i)
    break

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

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


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:
    n=1
else:
    for n in range(0,20):
    if n*a-n>b:
        break
print(n)

a=input().split()

c=a[1]%a[0]
d=b[1]//a[0]
d=d-1
if c!=0:
    d+=1

print(d)

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

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

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

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

a,b=map(int,input().split())
if b==1:
    n=1
else:
    for n in range(1,20):
    if n*a-n>b:
        break
print(n)

a=str(input())
b=str(input())
for n in range(0,len(a)):
    if 3*n+1>b:
        break
print(n)


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

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

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

print(n)

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

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

print(n)

a=int(input())
b=int(input())
c=b%a
d=b//a
d=d-1
if c!=0:
    d+=1

print(d)

a=int(input())
b=int(input())
c=b%a
d=b//a
if c!=0:
    d+=1

print(d)

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

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

print(n)

Verdicts: Runtime Error

Runtime Error

Wrong Answer

Wrong Answer

Runtime Error

Runtime Error

Wrong Answer

Runtime Error

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):
import sys
from io import StringIO
import unittest

def solve():
    N, M = map(int, input().split())

    c = 0
    if M == 1:
        return c

    c += 1
    if N >= M:
        return c
    
    M -= N
    for i in range(2, 100):
        if M - N <= 0:
            return i
        M -= (N-1)

# print(solve())


def resolve():
    print(solve())

class TestClass(unittest.TestCase):
    def assertIO(self, input, output):
        stdout, stdin = sys.stdout, sys.stdin
        sys.stdout, sys.stdin = StringIO(), StringIO(input)
        resolve()
        sys.stdout.seek(0)
        out = sys.stdout.read()[:-1]
        sys.stdout, sys.stdin = stdout, stdin
        self.assertEqual(out, output)
    def test_入力例_1(self):
        input = """4 10"""
        output = """3"""
        self.assertIO(input, output)
    def test_入力例_2(self):
        input = """8 9"""
        output = """2"""
        self.assertIO(input, output)
    def test_入力例_3(self):
        input = """8 8"""
        output = """1"""
        self.assertIO(input, output)

if __name__ == "__main__":
    unittest.main()

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

print(solve())

import math
def solve():
    N, M = map(int, input().split())
    return math.ceil((M-1)/(N-1))

print(solve())

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())
ans=0
for i in range(20):
    if b>0:
        b-=(a-1)
        ans+=1
    else:
        break
print(ans)


a,b=map(int,input().split())
ans=0
tap=1
while tap<b:
    ans+=1
    tap+=a-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):
#!/usr/local/bin/python3
# coding: utf-8


hairu = input()
sockets = 0
plugs = 1
ab = hairu.split()

while True:
    sockets += 1
    plugs -= 1
    plugs += int(ab[0])
    if int(ab[1]) < plugs:
        print(sockets)
        break

#!/usr/local/bin/python3
# coding: utf-8


hairu = input()
sockets = 0
plugs = 1
ab = hairu.split()

while True:
    sockets += 1
    plugs -= 1
    plugs += int(ab[0])
    if int(ab[1]) < plugs:
        print(sockets)
        exit(1)

    

#!/usr/local/bin/python3
# coding: utf-8


hairu = input()
sockets = 0
plugs = 1
ab = hairu.split()

while True:
    sockets += 1
    plugs -= 1
    plugs += int(ab[0])
    if int(ab[1]) < plugs:
        print(sockets)
        break

#!/usr/local/bin/python3
# coding: utf-8


hairu = input()
sockets = 0
plugs = 1
ab = hairu.split()

while True:
    if int(ab[1]) == 1:
        print(0)
        break

    sockets += 1
    plugs -= 1
    plugs += int(ab[0])
    if int(ab[1]) <= plugs:
        print(sockets)
        break


Verdicts: 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):
a, b = list(map(int, input().split()))
ans = 1
cnt = a;
while True:
  	if ans == 21:
        break
    if cnt >= b:
        break
    cnt += a-1
    ans += 1
print(ans)


a, b = list(map(int, input().split()))
ans = 0
cnt = 1;
while cnt < b:
    cnt += 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):
# from math import factorial,sqrt
# from itertools import permutations as permus
# from fractions import gcd
# from collections import deque,Counter

# import numpy as np
# import scipy as scp


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

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

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


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

# import numpy as np
# import scipy as scp


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

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

print(ans)
# print("{:.10f}".format(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=0
while c<d:
    d+=1
    c=a*c-(d-1)
print(d)

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

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

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 = (int(x) for x in input().split())

#
import math
tapp_num = (B//(A-1))
sasikomiguti_misiyou=0
if B<=A:
    print(1)
else:        
    sasikomiguti_misiyou =A +(tapp_num -1)*(A-1)
    if B <= sasikomiguti_misiyou:
        print(tapp_num)
    else:


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

#
import math
tapp_num = math.ceil( (B-1)//(A-1) )
#print(tapp_num)


sasikomiguti_misiyou=0
if B==1:
    print(0)
elif B<=A:
    print(1)
else:        
    sasikomiguti_misiyou =(tapp_num -1)*(A) +A
    if B <= sasikomiguti_misiyou-1:
        print(tapp_num)
    else:
        print(tapp_num +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())
y=1+(A-1)*x
x=0
while y<B:
  x+=1
print(x)  

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


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())



m=1

n=0

while True:
  m += a-1
  print("m:"+str(m))
  n += 1
  print("n:"+str(n))
  if m>=b:
    break
print(n)

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

a,b=map(int,input().split())
n=1
count=0
loop=True
while loop:
  if n<b:
    n+=a-1
    count+=1
  else:
    loop=False
print(count)

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())
c = 1
d = 1
while (True):
    if d >= b:
        break
    d = d + a - 1
    c += 1
print(c)

a, b = map(int, input().split())
c = 0
d = 1
while (True):
    if d >= b:
        break
    d = d + a - 1
    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):
S = input().split()
cnt = 1
num = int(S[0])

if int(S[1]) == 1:
  print("0")
else:
	while(num < int(S[1])):
    	num += int(S[0]) - 1
    	cnt += 1
    
	print(cnt)

S = input().split()
cnt = 1
num = int(S[0])

if int(S[1]) == 1:
  print(0)
else:
  while(num < int(S[1])):
    num += (int(S[0]) - 1)
    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())
for i in range(2,21):
	if b=< a*i-(i+1):
		print(i)

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

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

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


Verdicts: 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):
a,b = map(int,input().split())
now=1
ans=0
while now < b:
  for i in range(21):
    now = now - 1 + a
    ans += 1
print(ans+1)

a,b = map(int,input().split())
now=1
ans=0
while now < b:
  for i in range(21):
    now = now - 1 + a
    ans += 1
print(ans)

a,b = map(int,input().split())
now=1
ans=0
while now < b:
  for i in range(21):
    now - 1 + a
    ans+=1
print(ans)

a,b = map(int,input().split())
now=1
ans=0
while now < b:
  for i in range(21):
    now = naw - 1 + a
    ans += 1
print(ans)

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

Verdicts: Wrong Answer

Wrong Answer

Time Limit Exceeded

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):
po=list(map(int,input().split()))
A=po[0]
B=po[1]
C=po[0]-1
ans=1
if B == 1:
    ans=0
    break
else:
    while A < B:
        ans=ans+1
        A=A+C
print(ans)
print(A)

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

po=list(map(int,input().split()))
A=po[0]
B=po[1]
C=po[0]-1
ans=1
if B == 1:
    ans=0
elif:B == 0:
    ans=0
else:
    while A < B:
        ans=ans+1
        A=A+C
print(ans)
print(A)


po=list(map(int,input().split()))
A=po[0]
B=po[1]
C=po[0]-1
ans=1
if B == 1:
    ans=0
else:
    while A < B:
        ans=ans+1
        A=A+C
print(ans)
print(A)

po=list(map(int,input().split()))
A=po[0]
B=po[1]
C=po[0]-1
ans=1
if B == 1:
    ans=0
else:
    while A < B:
        ans=ans+1
        A=A+C
print(ans)

Verdicts: Runtime Error

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

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

print(cnt)

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

n = 1
cnt = 0

while n < B:
    n += A-1
    cnt +=1
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 = list(map(int,input().split()))

if B == 1:
    print(0)
else:
    print(round(B/A))


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

print(round(B/A))


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

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


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

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)

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

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())
print(b//(a-1)+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: 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 _ in range(1,100):
    if( (A-1)*(_-1)+A > B):
        print(_)
        break


import sys

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

for _ in range(1,100):
    if(B==1):
        print(0)
        break
        
    if( (A-1)*(_-1)+A >= B):
        print(_)
        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())
if B%A!=0:
  n=B//A
else:
  n=B//A+1
print(n)

import math
A,B=map(int,input().split())
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):
x, y = 0, 0
for i in range(1, 101):
    if x + 2*i > 1500:
        y += 2*i
        x = 0
    print(x+i, y+1)
    x += 2*i
    y += 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: 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())

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

    elif r >= b:
        print(i)
        break


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

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

    elif r >= b:
        print(i)
        break

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

r = 1
i = 0
while True:
    if b == 1:
        print(0)
        break
    elif r < b:
        i +=1
        r = r - 1 + a 

    elif r >= 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())
print((b+1)//a)

a,b = map(int, input().split())
print((b-2)//(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())
insert = 1
cnt = 0
while(insert >= B):
  insert = insert - 1 + A
  cnt += 1
    
print(cnt)

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

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

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())
t=0
if B==1:
  t=0
elif A>=B:
  t=1
if (B-A)%A>0:
  t=1+(B-A)//(A-1)+1
else:
  t=1+(B-A)//(A-1)
print(t)

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

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):
i = list(map(int, input().split()))
a = i[0]
count = 1

while a <= i[1]:
    a += i[0] - 1
    count += 1

print(count)

i = list(map(int, input().split()))
if i[1] == 1:
    count = 0
else:
    a = i[0]
    count = 1
    
    while a < i[1]:
        a += i[0] - 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):
# #!/usr/bin/env python3
# # -*- coding: utf-8 -*-


def main():
    A, B = map(int, input().split())

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


if __name__ == "__main__":
    main()


# #!/usr/bin/env python3
# # -*- coding: utf-8 -*-


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


if __name__ == "__main__":
    main()


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())
#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()

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)]
s=a-1
t=b-1
print((t+s-1)//s)

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_new = A
count = 1
while A_new <= B:
    if A_new == B:
        break
    else:
        A_new += A-1
        count += 1
print(count)


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


A_new = A
if B == 1:
    count = 0    
else:
    count = 1
    while A_new <= B:
        if A_new == B:
            break
        else:
            A_new = A_new-1
            A_new += 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):





i = input()
out = input()
n = 1

while (int(i)*n-(n-1)) < int(out):
    n += 1

else:
    print(n)








inp = input().split()
for a in inp:
    out = int(a)
inp.pop(1)
for a in inp:
    i = int(a)
    
n = 1
while (i*n-(n-1)) < out:
    n += 1

else:
    if out == 1:
        print(0)
    else:
        print(n)


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(int(b / (a - 1)) + 1)

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

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

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):
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 - 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())
print((b+1)//a)

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


# n >= (b-1)/(a-1)
# n = ((b-1)+(a-1)-1)/(a-1)
# 	= (a+b-3)//(a-1)
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):
a, b = map(int, input().split())
sockets = 1
cnt = 0
while True:
    if sockets <= b: break
    sockets += a - 1
    cnt += 1
print(cnt)

a, b = map(int, input().split())
sockets = 1
cnt = 0
while True:
    if sockets >= b: break
    sockets += a - 1
    cnt += 1
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())
tap = 1
ans = 0

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

A,B = map(int,input().split())
tap = 1
ans = 0

while tap < B:
    tap += 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())

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

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


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

ans = ceil((B - A) / (A-1)) + 1
# if B % A :
#     ans += 1

# elif B == A :
#     continue

print(ans)


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):
import math
A, B = map(int, input().split())
print(1 if A >= B else math.ceil(B // A))

import math
A, B = map(int, input().split())
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())
print(B - 1 // A + 1)

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

a, b = map(int, input().split())
c = (b - 1) / (a - 1)
if c % 1 == 0:
    print((b - 1) // (a - 1))
else:
    print((b - 1) // (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())
for i in range(21) :
    if b <= a*i-i :
        print(i)
        break

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

Verdicts: Wrong Answer

Accepted