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):
import sys
import copy
import math
import bisect
import pprint
import bisect
from functools import reduce
from copy import deepcopy
from collections import deque

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

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

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

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



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

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

if __name__ == '__main__':
    a = [int(i) for i in input().split()]
    
    if a[1] <= a[0]:
        print(1)
    else:
        print(2 + (a[1]-1[0])//(a[1] -1) )


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

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

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

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


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

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

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

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

        if count >= a[1]:
            print(i)
            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 = map(int,input().split())
p = a
ans = 1 
while p<b:
    ans +=1
    p =a + (ans-1)*(a-1)
print(p)
print(ans)

a,b = map(int,input().split())
for i in range(100):
    if 1+(a-1)*i>=b:
        print(i)
        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())
print((b+a-2)//(a-1))

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

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

flag = True
count = 0
ans = 0
while flag:
    if ans == 0:
      count += a
      ans += 1
    else:
      count += a-1
    if count >= b:
        flag = False
print(ans)

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

flag = True
count = 0
ans = 0
while flag:
    count += a-1
    ans += 1
    if count >= b:
        flag = False
print(ans)

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


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: 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):
# -*- coding: utf-8 -*-
import numpy as np

def main():
    a, b = map(int, input().split())

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

    print(ans - 1)

main()

# -*- coding: utf-8 -*-
import numpy as np

def main():
    a, b = map(int, input().split())

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

    print(ans)

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

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


a = 0
num = 1
while num < B:
  num -= 1
  num += a
  ans += 1

print(a)

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

a = 0
num = 1
while num < B:
  num -= 1
  num += a
  a += 1

print(a)

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

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

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):
import sys
A, B = map(int, input().split())
tmp = A
ans = 1
if B == 1:
    print(0)
    sys.exit()

while True:
    if A < B:
        A += tmp - 1
        ans += 1
    else:
        break

print(ans)w

import sys
A, B = map(int, input().split())
tmp = A
ans = 1
if B == 1:
    print(0)
    sys.exit()

while True:
    if A < B:
        A += tmp - 1
        ans += 1
    else:
        break

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

C = (B - A)/(A - 1)

print(C)

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

C = (B - A)/(A - 1) + 1

print(C)

import math

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

C = (B - A)/(A - 1) + 1

print(math.ceil(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 = list(map(int, imput().split()))
ans = 0
if b == 1:
  print(ans)
else:
  while True:
    ans += 1
    a += a
    if a >= b:
      print(ans)
      break:
 
 

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

a, b = list(map(int, imput().split()))
ans = 0
count = 1
if b == 1:
  print(ans)
else:
  while True:
    ans += 1
    count += a
    if count >= b:
      print(ans)
      break:
 

a, b = list(map(int, imput().split()))
ans = 0
if b == 1:
  print(ans)
else:
  while a < b:
    ans += 1
    a += a
  print(ans)
 
 

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

Verdicts: 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):
A, B = map(int, input().split())
sum = 0
i = 1
if B != 1:
    sum = A
    while sum < B:
        sum = A*i-1
        i += 1
    print(i)
else:
    print(0)


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

A, B = map(int, input().split())
sum = 0
i = 1
if B != 1:
    while sum < B:
        sum = A + (A-1)*(i-1)
        i += 1
    print(i-1)
else:
    print(0)

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


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

a,b = map(int,input().split())
if b == 1:
  print("0")
else:
  for i in range(100):
    if (i-1)*(a-1) + a >= 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())
ans = B//(A-1) +1
if B==A:
    print(1)

else:
    print(ans)

A,B = map(int,input().split())
ans  = 1
for i in range(0,20):
    if ans >= B:
        print(i)
        exit()
    else:
        ans += (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 = list(map(int, input().split))
ans = 0;
sum = a;
while sum < b:
  sum += (a-1)
  ans++
print(ans)

a, b = list(map(int, input().split()))
ans = 0;
sum = 1;
while sum < b:
  sum += (a-1)
  ans = 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 = 0
while True:
  n = ans * a -(ans - 1)
  if n > b:
    break
  ans += 1

print(ans)

a,b = map(int,input())
ans = 0
if b % a != 0:
  ans += 1
ans += b // a
print(ans)

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

print(ans)

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):
n = int(input())


if n % 2 == 0:
    print(int(n / 2 * (n - 1)))
else:
    print(int((n - 1) / 2 * n))

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 = list1[0];   
B = list1[1];   
#print(list1)
#print(list1[1])
addSupply = 1;
lack   = (B-A); 
if lack >0 & B !=1 :
    addSupply = 1;
    addSupply += lack / (A-1); 

    if lack % (A-1) >0:
        addSupply +=1;
else :
    addSupply = 0;
print(int(addSupply));

list1 = [int(i) for i in input().split()];

A = list1[0];   
B = list1[1];   
#print(list1)
#print(list1[1])
addSupply = 1;
lack   = (B-A); 
if lack >0:
    addSupply = 1;
    addSupply += lack / (A-1); 
 
    if lack % (A-1) >0:
        addSupply +=1;
elif B==1 :
    addSupply = 0;

print(int(addSupply));

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):
# -*- coding: utf-8 -*-

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

result = 1
socket = b
if socket < b:
    for i in range(20):
        socket += a-1
        result += 1
        if socket >= b:
            break
print(result)


# -*- coding: utf-8 -*-

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

result = 1
socket = a
if b == 1:
    result = 0
else:
    result = 1

if socket < b:
    for i in range(20):
        socket += a-1
        result += 1
        if socket >= b:
            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):
input = input()
data = input.splite(' ')
A = data[0]
B = data[1]
c = (B - 1) // (A - 1)
 
print(c)

in_data = input()
 
data = in_data.split(' ')
A = int(data[0])
B = int(data[1])
if B == 1:
  print("0")
else:
  c = (B - 1)// (A - 1) + 1
  print(c)

in_data = input()
 
data = in_data.split(' ')
A = int(data[0])
B = int(data[1])
if B == 1:
  print("0")
else
  c = (B - 1) // A + 1
  print(c)

in = input()
data = in.splite(' ')
A = data[0]
B = data[1]
c = (B - 1) // (A - 1)

print(c)



in_data = input()
def test_fun(in_data):
    data = in_data.split(' ')
    A = int(data[0])
    B = int(data[1])
    c = (B - 1) // A + 1
 
    print(c)
  
test_func(in_data)

in_data = input()
 
data = in_data.split(' ')
A = int(data[0])
B = int(data[1])
if B == 1:
  print("0")
else:
  c = (B + 2)// (A - 1)
  print(c)

in_data = input()
data = in_data.split(' ')
A = data[0]
B = data[1]
c = (B - 1) // (A - 1)
 
print(c)

in_data = input()
data = in_data.splite(' ')
A = data[0]
B = data[1]
c = (B - 1) // (A - 1)
 
print(c)

in_data = input()
 
data = in_data.split(' ')
A = int(data[0])
B = int(data[1])
if B == 1:
  print("0")
else:
  c = (B - 1) // (A - 1)
  d = (B - 1) / (A - 1)
  if c < d:
    c = c + 1
  print(c)

Verdicts: Runtime Error

Wrong Answer

Runtime Error

Runtime Error

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

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

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

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

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

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

while 1:
  if (A-1)*i + 1 >= B:
    print(i)
    quit()

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

i = -1
while 1:
  i += 1
  if (A-1)*i + 1 >= B:
    print(i)
    quit()

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
sys.setrecursionlimit(10**6)
A,B = map(int,input().split())
cnt = 1
if A >= B:
    print(1)
    exit()

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

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


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


import sys
sys.setrecursionlimit(10**6)
A,B = map(int,input().split())
cnt = 0
tmp = A
while True:
    cnt += 1
    if tmp >= B:
        break
    else:
        tmp += (A - 1) 

if B ==1:
    print(0)
else:
    print(cnt)

Verdicts: 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):
for i in range(B):
    if A * i >= B:
        print(i)
        break


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

ans = math.ceil(B / A)
if A * ans - (ans - 1) <= B:
    ans += 1
print(ans)

import math

A, B = map(int, input().split())
if B == 1:
    print(0)
else:
    ans = math.ceil(B / A)
    while A * ans - (ans - 1) < B:
        ans += 1
    print(ans)


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):
#k = int(input())
#s = input()
#a, b = map(int, input().split())
#s, t = map(str, input().split())
#l = list(map(int, input().split()))

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

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




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

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

print(ans)


#k = int(input())
#s = input()
#a, b = map(int, input().split())
#s, t = map(str, input().split())
#l = list(map(int, input().split()))

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

ans = 0
outlet = 1
while outlet < b:
    outlet -= 1
    outlet += a
    ans += 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):


using namespace std;

int main(){
  int a,b,cnt,now;
  cin >> a >> b;
  now = 1;
  cnt = 0;
  while(now < b){
    if (cnt == 0) now += a;
    else now += a - 1;
  cnt += 1;
  }
  cout << cnt << endl;
  return 0;
}

[a,b] = [int(i) for i in input().split()]
now = 1
cnt = 0
while(now < b):
    now += a-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())

result = 0
result += a
cnt = 1

while b < result:
    result += a - 1
    cnt += 1

print(cnt)

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

a, b = map(int, input().split())
if (b == 1):
    ans = 0
elif (a >= b):
    ans = 1
else:
    result = a*2 - 1
    ans = 2
    while result < b:
        result += a-1
        ans += 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())

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

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

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

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

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

amount = 0
count = 1

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

print(count)


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

amount = 0
count = 0

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

print(count)


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

amount = 0
count = 0

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

print(count)


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

amount = 1
count = 0

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

print(count)


Verdicts: 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):
A=int(input())
B=int(input())

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

else:
    print(C)

A=int(input())
B=int(input())
C=B//(A-1)
if B%(A-1)!=0:
    print(C+1)
else:
    print(C)

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

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

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 = int(input())
B = int(input())
n = B // A

if n == B / A:
  print(n)
else:
  print(n+1)

  
  

import math

A = list(map(int, input().split()))
a = A[1] - 1
b = A[0] - 1
n = math.floor(a / b)

if n == a / b:
    print(n)
elif n < a / b:
    print(n + 1)
else:
    print(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):
# -*- coding: utf-8 -*-
import numpy as np

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

    num = 1
    tap = 0

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

    while True:
        tap += 1
        num -= 1
        num += A

        if num >=B:
            break

    print(tap)


# -*- coding: utf-8 -*-
import numpy as np

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

    num = 1
    tap = 0

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

    while True:
        tap += 1
        num -= 1
        num += A

        if num >=B:
            break

    print(tap)


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 = list(map(int,input().split()))
# sum_a = a[0]+(a[0]-1)+(a[0]-1)
sum_a=0
for i in range(100000000):
   if(sum_a>＝a[1]):
      break
   if(i==0):
      sum_a=a[0]
   else:
      sum_a=sum_a+(a[0]-1)

print(i)


a = list(map(int,input().split()))
# sum_a = a[0]+(a[0]-1)+(a[0]-1)
sum_a=0
for i in range(10000000000000):


   if(i==0):
      sum_a=a[0]
   else:
      sum_a=sum_a+(a[0]-1)
   if(sum_a>=a[1]):
      break
print(i)

a = list(map(int,input().split()))
# sum_a = a[0]+(a[0]-1)+(a[0]-1)
sum_a=0
for i in range(100000000):
   if(sum_a>a[1]):
      break
   if(i==0):
      sum_a=a[0]
   else:
      sum_a=sum_a+(a[0]-1)

print(i)


a = list(map(int,input().split()))
# sum_a = a[0]+(a[0]-1)+(a[0]-1)
b=0
for i in range(100000000):
   if(a[1]==1):
      break
   if(i==0):
      if(b>=a[1]): 
         break
      b=a[0]
   else:
      if(b>=a[1]):
         break
      b=b+(a[0]-1)

print(i)


Verdicts: 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):
import math
a, b = map(int, input().split())
c = a
count = 0
while True:
    if c<b:
        count +=1
        c += a-1
    else:
        break
print(count)

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

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

x = (b-1) // (a-1)

print(x + 1)

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

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):
num = list(map(int,input().split()))
#num[0]:A
#num[1]:B
A = num[0]
B = num[1]
j = 0
for i in range(500):
    if B<=A*j:
        break
    else:
        j+1
print(j)

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

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


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

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


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

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


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

cnt = 0

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


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

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

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


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

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

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

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

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

while num >= B:
    cnt = cnt + 1
    num = num + A - 1

print(cnt)

A, B = map(int, input().split())
cnt = 0
num = 1

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

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

a, b = map(int, input().split())
o = 1
c = 0
while o < b:
  o += 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= int(input())
b=int(input())
print(int((b-1)/(a-1)+0.99999))


A = int(input())
B = int(input())
socket = 0
count = 0
if B==1 :
    count=0
elif i != 0 :
    while socket < B :
        if socket + A < B :
            socket = socket + A - 1
            count += 1
        elif socket+A >= B :
            socket = socket + A
            count += 1
print(count)


from math import ciel
a,b=[int(x) for x in input().split()]
if b==1:
    print(0)
else :
    print(ciel((b-1)/(a-1)))

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

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

A, B = [int(A) for A in input().split()] 
socket = 0
count = 0
if B==1 :
    count=0
elif B != 0 :
    while socket < B :
        if socket + A < B :
            socket = socket + A - 1
            count += 1
        elif socket+A >= B :
            socket = socket + A
            count += 1
print(count)


Verdicts: Runtime Error

Runtime Error

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())
print((B-1)//(A-2) + 1)

Input = input().split(" ")
A = int(Input[0])
B = int(Input[1])
n = B/(A-1)
print(int(n)+1)

A,B = [int(x) for x in input().split()]
print((B-1)//(A-2) + 1)

import math
Input = input().split(" ")
A = int(Input[0])
B = int(Input[1])
n = (B-1)/(A-1)
print(math.ceil(n))

Verdicts: Runtime Error

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):
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(math.ceil(b-1/a-1))

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


a,b=map(int,input().split())
x=0
for i:
  if (a-1)*i+1<b:
    x+=1
  else:
    exit()
print(x)

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


Verdicts: Runtime Error

Runtime Error

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

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

c = 1
for i in range(20):
    if b > c:
        c += a-1
    else:
        break
print(c // a-1)

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

c = 1
for i in range(20):
    if b > c:
        c += a-1
    else:
        break
print(c // a-1)

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

c = 1
for i in range(20):
    if b > c:
        c += a-1
    else:
        break
print(c // a)

a, b = map(int, input().split())
c = 1
for i in range(20):
    if b > c:
        c += a-1
    else:
        break
print(-(-(c-1 // a-1))

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

c = 1
for i in range(20):
    if b > c:
        c += a-1
    else:
        break
print(-(-c // a-1))

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

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

c = 1
for i in range(20):
    if b > c:

        c += a-1
    else:
        break
print(count / a-1)

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

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

for i in range(20):
    if b > count:
        count += a-1
    else:
        break
c = count // a-1
print(c)

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

for i in range(20):
    if b > count:
        count += a-1
    else:
        break
c = -(-count // a-1)
print(c)

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

c = 1
for i in range(20):
    if b > c:

        c += a-1
    else:
        break
print(count / a-1)

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

c = 1
for i in range(20):
    if b > c:
        c += a-1
    else:
        break
print(-(c // a))

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

Verdicts: Runtime Error

Wrong Answer

Wrong Answer

Wrong Answer

Runtime Error

Wrong Answer

Runtime Error

Runtime Error

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


a,b = map(int, input())
count = 1
c = 1
while c < b:
  c += a-1
  count +=1
print(count)

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

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

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

print(cnt)

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

cnt = 1
ans = 0

while cnt < b:
  cnt = cnt-1 + a
  ans += 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())
n=0
t=0
while t<b:
  n+=1
  t+=a-1
print(n)

a,b=map(int, input().split())
n=0
t=1
while t<b:
  n+=1
  t+=a-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())
for i in range(1, 100):
    if (A - 1) * i >= B:
        print(i)
        exit(0)

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

empty = 1
num = 0
while empty < B:
    num += 1
    empty += (A-1)

print(num)


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 = a
while tap < b:
  tap = tap + a-1
return (i + 1)


a,b = map(int, input().split())
tap = a
for i in range(n):
  tap = tap + a-1
  if tap >= b:
    print(i + 1)
    break

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


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


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

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

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

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


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

if a >= b:
  print(1)
else:
  c = 1
  count=0
  while b > c:
    c + = a-1
    
    count += 1
  print(count)


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

if a >= b:
  print(1)
else:
  count=1
  b -= a
  while b >= 0:
    b -= (a-1)
    
    count += 1
  print(count)

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

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

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

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

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

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

tmp = B // (A - 1)

if tmp * (A - 1) >= B:
    print(tmp)
else:
    print(tmp + 1)


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

tmp = B // (A - 1)

if B == 1:
    print(0)
elif A == 2:
    print(B - 1)
elif tmp * (A - 1) + 1 >= B:
    print(tmp)
else:
    print(tmp + 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 = [int(x) for x in input().split()]

count = 1
b += -1
while b > 0:
    b += -(a - 1)
    count += 1
print(count)

a, b = [int(x) for x in input().split()]

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

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

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

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

print(ans)

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

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

Verdicts: Runtime Error

Wrong Answer

Accepted