TnT/Multi_CodeNet4Repair huggingface dataset:
Problem: There are N apple trees in a row. People say that one of them will bear golden apples.  We want to deploy some number of inspectors so that each of these trees will be inspected.  Each inspector will be deployed under one of the trees. For convenience, we will assign numbers from 1 through N to the trees. An inspector deployed under the i-th tree (1 \leq i \leq N) will inspect the trees with numbers between i-D and i+D (inclusive).  Find the minimum number of inspectors that we need to deploy to achieve the objective.

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

print(n // d + 1)

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

if n // (2*d + 1) == n / (2*d + 1):
  print(int(n / (2*d + 1)))
else:
  print(int(n // (2*d + 1) + 1))

Verdicts: Wrong Answer

Accepted
Problem: There are N apple trees in a row. People say that one of them will bear golden apples.  We want to deploy some number of inspectors so that each of these trees will be inspected.  Each inspector will be deployed under one of the trees. For convenience, we will assign numbers from 1 through N to the trees. An inspector deployed under the i-th tree (1 \leq i \leq N) will inspect the trees with numbers between i-D and i+D (inclusive).  Find the minimum number of inspectors that we need to deploy to achieve the objective.

Submission attempts (in order):
n,d = map(int,input()split())
if n%(2*d+1) == 0:
  print(n%(2*d+1))
else:
  print(n%(2*d+1)+1)

n,d = map(int,input().split())
if n%(2*d+1) == 0:
  print(n//(2*d+1))
else:
  print(n//(2*d+1)+1)

Verdicts: Runtime Error

Accepted
Problem: There are N apple trees in a row. People say that one of them will bear golden apples.  We want to deploy some number of inspectors so that each of these trees will be inspected.  Each inspector will be deployed under one of the trees. For convenience, we will assign numbers from 1 through N to the trees. An inspector deployed under the i-th tree (1 \leq i \leq N) will inspect the trees with numbers between i-D and i+D (inclusive).  Find the minimum number of inspectors that we need to deploy to achieve the objective.

Submission attempts (in order):
import math
n,d =map(int,input().split())
print(math.ceil(n//(d*2+1)))


import math
n,d =map(int,input().split())
print(math.ceil(n/(d*2+1)))


Verdicts: Wrong Answer

Accepted
Problem: There are N apple trees in a row. People say that one of them will bear golden apples.  We want to deploy some number of inspectors so that each of these trees will be inspected.  Each inspector will be deployed under one of the trees. For convenience, we will assign numbers from 1 through N to the trees. An inspector deployed under the i-th tree (1 \leq i \leq N) will inspect the trees with numbers between i-D and i+D (inclusive).  Find the minimum number of inspectors that we need to deploy to achieve the objective.

Submission attempts (in order):
import math
n,d=map(int, input().split())
print(math.ceil(n/(2*d+1))+1)

import math
n,d=map(int, input().split())
print(math.ceil(n/(2*d+1)))

Verdicts: Wrong Answer

Accepted
Problem: There are N apple trees in a row. People say that one of them will bear golden apples.  We want to deploy some number of inspectors so that each of these trees will be inspected.  Each inspector will be deployed under one of the trees. For convenience, we will assign numbers from 1 through N to the trees. An inspector deployed under the i-th tree (1 \leq i \leq N) will inspect the trees with numbers between i-D and i+D (inclusive).  Find the minimum number of inspectors that we need to deploy to achieve the objective.

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

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

Verdicts: Wrong Answer

Accepted
Problem: There are N apple trees in a row. People say that one of them will bear golden apples.  We want to deploy some number of inspectors so that each of these trees will be inspected.  Each inspector will be deployed under one of the trees. For convenience, we will assign numbers from 1 through N to the trees. An inspector deployed under the i-th tree (1 \leq i \leq N) will inspect the trees with numbers between i-D and i+D (inclusive).  Find the minimum number of inspectors that we need to deploy to achieve the objective.

Submission attempts (in order):
n, d = map(int, input().split())
print(math.ceil(n / (2*d +1)))

import math
n, d = map(int, input().split())
print(math.ceil(n / (2*d +1)))

Verdicts: Runtime Error

Accepted
Problem: There are N apple trees in a row. People say that one of them will bear golden apples.  We want to deploy some number of inspectors so that each of these trees will be inspected.  Each inspector will be deployed under one of the trees. For convenience, we will assign numbers from 1 through N to the trees. An inspector deployed under the i-th tree (1 \leq i \leq N) will inspect the trees with numbers between i-D and i+D (inclusive).  Find the minimum number of inspectors that we need to deploy to achieve the objective.

Submission attempts (in order):
n, d = map(int, input().split())

dd = 2*d + 1

print(n // dd)

n, d = map(int, input().split())

dd = 2*d + 1

print((n+dd-1) // dd)


Verdicts: Wrong Answer

Accepted
Problem: There are N apple trees in a row. People say that one of them will bear golden apples.  We want to deploy some number of inspectors so that each of these trees will be inspected.  Each inspector will be deployed under one of the trees. For convenience, we will assign numbers from 1 through N to the trees. An inspector deployed under the i-th tree (1 \leq i \leq N) will inspect the trees with numbers between i-D and i+D (inclusive).  Find the minimum number of inspectors that we need to deploy to achieve the objective.

Submission attempts (in order):
N, D = map(int, input().split())

print(int(round(N / (D * 2 + 1))))

import math

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

print(int(math.ceil(N / (D * 2 + 1))))

Verdicts: Wrong Answer

Accepted
Problem: There are N apple trees in a row. People say that one of them will bear golden apples.  We want to deploy some number of inspectors so that each of these trees will be inspected.  Each inspector will be deployed under one of the trees. For convenience, we will assign numbers from 1 through N to the trees. An inspector deployed under the i-th tree (1 \leq i \leq N) will inspect the trees with numbers between i-D and i+D (inclusive).  Find the minimum number of inspectors that we need to deploy to achieve the objective.

Submission attempts (in order):
from math import ceil

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

print(math.ceil(a//(2*b+1)))


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

ans = a//(2*b+1)

if a%(2*b+1) == 0: pass
else: ans += 1
print(ans)


Verdicts: Runtime Error

Accepted
Problem: There are N apple trees in a row. People say that one of them will bear golden apples.  We want to deploy some number of inspectors so that each of these trees will be inspected.  Each inspector will be deployed under one of the trees. For convenience, we will assign numbers from 1 through N to the trees. An inspector deployed under the i-th tree (1 \leq i \leq N) will inspect the trees with numbers between i-D and i+D (inclusive).  Find the minimum number of inspectors that we need to deploy to achieve the objective.

Submission attempts (in order):
N, D = map(int, input().split())

r = N 
i = 0


for k in range(50):
    r = r - (2 * D + 1)
    print("r = ", r)
    if r < (2 * D + 1):
        i = i + 1
        break
    i = i + 1
    
print(i)

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

r = N 
i = 0


for k in range(50):
    r = r - (2 * D + 1)
    #print("r = ", r)
    if r < (2 * D + 1):
        i = i + 1
        break
    i = i + 1
    
print(i)

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

r = N 
i = 0

r = N - (2 * D + 1)
while r >= N:
    i = i + 1
    r = N - (2 * D + 1)


print(i+1)

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

r = N 
i = 0

"""
for k in range(50):
    r = r - (2 * D + 1)
    print("r = ", r)
    if r < (2 * D + 1):

        break
"""
a = N // (2*D+1)

if (N%(2*D+1))==0:
    print(a)
else:
    print(a+1)

Verdicts: Wrong Answer

Wrong Answer

Wrong Answer

Accepted
Problem: There are N apple trees in a row. People say that one of them will bear golden apples.  We want to deploy some number of inspectors so that each of these trees will be inspected.  Each inspector will be deployed under one of the trees. For convenience, we will assign numbers from 1 through N to the trees. An inspector deployed under the i-th tree (1 \leq i \leq N) will inspect the trees with numbers between i-D and i+D (inclusive).  Find the minimum number of inspectors that we need to deploy to achieve the objective.

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

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

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

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

Verdicts: Wrong Answer

Wrong Answer

Wrong Answer

Accepted
Problem: There are N apple trees in a row. People say that one of them will bear golden apples.  We want to deploy some number of inspectors so that each of these trees will be inspected.  Each inspector will be deployed under one of the trees. For convenience, we will assign numbers from 1 through N to the trees. An inspector deployed under the i-th tree (1 \leq i \leq N) will inspect the trees with numbers between i-D and i+D (inclusive).  Find the minimum number of inspectors that we need to deploy to achieve the objective.

Submission attempts (in order):
n,d= map(int,input().split(" "))
if n%(1+2*d):
    print(n/(1+2*d))
else:
    print(int(n/(1+2*d))+1)

n,d= map(int,input().split(" "))
if n%(1+2*d)==0:
    print(int(n/(1+2*d)))
else:
    print(int(n/(1+2*d))+1)

Verdicts: Wrong Answer

Accepted
Problem: There are N apple trees in a row. People say that one of them will bear golden apples.  We want to deploy some number of inspectors so that each of these trees will be inspected.  Each inspector will be deployed under one of the trees. For convenience, we will assign numbers from 1 through N to the trees. An inspector deployed under the i-th tree (1 \leq i \leq N) will inspect the trees with numbers between i-D and i+D (inclusive).  Find the minimum number of inspectors that we need to deploy to achieve the objective.

Submission attempts (in order):
t,d = map(int,input().split())
p_a = t//(2d+1)
p_b = t%(2d+1)
if p_b == 0:
  print(p_a)
else:
  print(p_a + 1)
  


t,d = map(int,input().split())
p_a = t//(2*d+1)
p_b = t%(2*d+1)
if p_b == 0:
  print(p_a)
else:
  print(p_a + 1)
  


Verdicts: Runtime Error

Accepted
Problem: There are N apple trees in a row. People say that one of them will bear golden apples.  We want to deploy some number of inspectors so that each of these trees will be inspected.  Each inspector will be deployed under one of the trees. For convenience, we will assign numbers from 1 through N to the trees. An inspector deployed under the i-th tree (1 \leq i \leq N) will inspect the trees with numbers between i-D and i+D (inclusive).  Find the minimum number of inspectors that we need to deploy to achieve the objective.

Submission attempts (in order):
N, D = map(int, input().split())









print(-(-N//(2D+1)))

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




 


 

print((N+2*D) // (2*D+1))

Verdicts: Runtime Error

Accepted
Problem: There are N apple trees in a row. People say that one of them will bear golden apples.  We want to deploy some number of inspectors so that each of these trees will be inspected.  Each inspector will be deployed under one of the trees. For convenience, we will assign numbers from 1 through N to the trees. An inspector deployed under the i-th tree (1 \leq i \leq N) will inspect the trees with numbers between i-D and i+D (inclusive).  Find the minimum number of inspectors that we need to deploy to achieve the objective.

Submission attempts (in order):
N, D = map(int, input())
x = N//((2*D)+1)
if(x*((2*D)+1)>= N):
	print(N//((2*D)+1))
else:
	print((N//((2*D)+1)+1))

N, D = map(int, input())
if(N%2*D+1==0):
	print(N//((2*D)+1))
else:
	print(N//((2*D)+1)+1)

N, D = map(int, input())
x = N//((2*D)+1)
if(x*((2*D)+1)>= N):
	print(N//((2*D)+1))
else:
	print(N//((2*D)+1)+1)

N, D = map(int, input().split())
x = N//((2*D)+1)
if(x*((2*D)+1)>= N):
	print(N//((2*D)+1))
else:
	print((N//((2*D)+1)+1))

Verdicts: Runtime Error

Runtime Error

Runtime Error

Accepted
Problem: There are N apple trees in a row. People say that one of them will bear golden apples.  We want to deploy some number of inspectors so that each of these trees will be inspected.  Each inspector will be deployed under one of the trees. For convenience, we will assign numbers from 1 through N to the trees. An inspector deployed under the i-th tree (1 \leq i \leq N) will inspect the trees with numbers between i-D and i+D (inclusive).  Find the minimum number of inspectors that we need to deploy to achieve the objective.

Submission attempts (in order):
n, d= map(int, input().split())

num = 1
while True:
    if (num*d+1)*2 >= n:
        print(num)
        break
    else:
        num +=1
        

n, d= map(int, input().split())

num = 1
while True:
    if (2*d+1)*num >= n:
        print(num)
        break
    else:
        num +=1
        

Verdicts: Wrong Answer

Accepted
Problem: There are N apple trees in a row. People say that one of them will bear golden apples.  We want to deploy some number of inspectors so that each of these trees will be inspected.  Each inspector will be deployed under one of the trees. For convenience, we will assign numbers from 1 through N to the trees. An inspector deployed under the i-th tree (1 \leq i \leq N) will inspect the trees with numbers between i-D and i+D (inclusive).  Find the minimum number of inspectors that we need to deploy to achieve the objective.

Submission attempts (in order):
import math
n,d = map(int,input().split())
print(math.ceil(n/2*d+1))

import math
n,d = map(int,input().split())
print(math.ceil(n/(2*d+1)))

Verdicts: Wrong Answer

Accepted
Problem: There are N apple trees in a row. People say that one of them will bear golden apples.  We want to deploy some number of inspectors so that each of these trees will be inspected.  Each inspector will be deployed under one of the trees. For convenience, we will assign numbers from 1 through N to the trees. An inspector deployed under the i-th tree (1 \leq i \leq N) will inspect the trees with numbers between i-D and i+D (inclusive).  Find the minimum number of inspectors that we need to deploy to achieve the objective.

Submission attempts (in order):
import math
n, d = map(int, input().split())
print(math.ceil)(n/(2*d+1))

import math
n, d = map(int, input().split())
print(math.ceil(n/(2*d+1)))


Verdicts: Runtime Error

Accepted
Problem: There are N apple trees in a row. People say that one of them will bear golden apples.  We want to deploy some number of inspectors so that each of these trees will be inspected.  Each inspector will be deployed under one of the trees. For convenience, we will assign numbers from 1 through N to the trees. An inspector deployed under the i-th tree (1 \leq i \leq N) will inspect the trees with numbers between i-D and i+D (inclusive).  Find the minimum number of inspectors that we need to deploy to achieve the objective.

Submission attempts (in order):
N,D=map(int(),input().split())
print(N//(2D+1))

import math
N,D=map(int,input().split())
print(math.ceil(N/(2*D+1)))


Verdicts: Runtime Error

Accepted
Problem: There are N apple trees in a row. People say that one of them will bear golden apples.  We want to deploy some number of inspectors so that each of these trees will be inspected.  Each inspector will be deployed under one of the trees. For convenience, we will assign numbers from 1 through N to the trees. An inspector deployed under the i-th tree (1 \leq i \leq N) will inspect the trees with numbers between i-D and i+D (inclusive).  Find the minimum number of inspectors that we need to deploy to achieve the objective.

Submission attempts (in order):
N, D = map(int, input().split())

d, m = divmod(N, 2 * D + 1)
print(d, m)
if m != 0:
    d += 1
print(d)

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

d, m = divmod(N, 2 * D + 1)
if m != 0:
    d += 1
print(d)

Verdicts: Wrong Answer

Accepted
Problem: There are N apple trees in a row. People say that one of them will bear golden apples.  We want to deploy some number of inspectors so that each of these trees will be inspected.  Each inspector will be deployed under one of the trees. For convenience, we will assign numbers from 1 through N to the trees. An inspector deployed under the i-th tree (1 \leq i \leq N) will inspect the trees with numbers between i-D and i+D (inclusive).  Find the minimum number of inspectors that we need to deploy to achieve the objective.

Submission attempts (in order):
N,D = map(input().split())
print(N//(2*D+1))

N,D = map(int, input().split())
print(N//(2*D+1))

N,D = map(int, input().split())
print(N//(2*D+1) if N%(2*D+1)==0 else N//(2*D+1)+1)

Verdicts: Runtime Error

Wrong Answer

Accepted
Problem: There are N apple trees in a row. People say that one of them will bear golden apples.  We want to deploy some number of inspectors so that each of these trees will be inspected.  Each inspector will be deployed under one of the trees. For convenience, we will assign numbers from 1 through N to the trees. An inspector deployed under the i-th tree (1 \leq i \leq N) will inspect the trees with numbers between i-D and i+D (inclusive).  Find the minimum number of inspectors that we need to deploy to achieve the objective.

Submission attempts (in order):
N, D = map(int, input().split(" "))
ans = N / (2*D+1) + int(N%(2*D+1)>0)
print(ans)

N, D = map(int, input().split(" "))
ans = (N-1) / (2*D+1) + 1
print(ans)

N, D = map(int, input().split(" "))
ans = N // (2*D+1) + int(N%(2*D+1)>0)
print(ans)

Verdicts: Wrong Answer

Wrong Answer

Accepted
Problem: There are N apple trees in a row. People say that one of them will bear golden apples.  We want to deploy some number of inspectors so that each of these trees will be inspected.  Each inspector will be deployed under one of the trees. For convenience, we will assign numbers from 1 through N to the trees. An inspector deployed under the i-th tree (1 \leq i \leq N) will inspect the trees with numbers between i-D and i+D (inclusive).  Find the minimum number of inspectors that we need to deploy to achieve the objective.

Submission attempts (in order):
import math

n,d=list(map(int(input().split()))
         
print (math.ceil(n/1+2*d))

import math

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

print(math.ceil(n / (1+2*d)))

Verdicts: Runtime Error

Accepted
Problem: There are N apple trees in a row. People say that one of them will bear golden apples.  We want to deploy some number of inspectors so that each of these trees will be inspected.  Each inspector will be deployed under one of the trees. For convenience, we will assign numbers from 1 through N to the trees. An inspector deployed under the i-th tree (1 \leq i \leq N) will inspect the trees with numbers between i-D and i+D (inclusive).  Find the minimum number of inspectors that we need to deploy to achieve the objective.

Submission attempts (in order):
n,d = map(int, input().split())
print(n // (2d + 1) + 1)

import math

n,d = map(int, input().split())
print(math.ceil(n / (2*d + 1)))

Verdicts: Runtime Error

Accepted
Problem: There are N apple trees in a row. People say that one of them will bear golden apples.  We want to deploy some number of inspectors so that each of these trees will be inspected.  Each inspector will be deployed under one of the trees. For convenience, we will assign numbers from 1 through N to the trees. An inspector deployed under the i-th tree (1 \leq i \leq N) will inspect the trees with numbers between i-D and i+D (inclusive).  Find the minimum number of inspectors that we need to deploy to achieve the objective.

Submission attempts (in order):
n,d=map(int,input().split())
n=n-1
if n%(1+2*d)==0:
  print(n//(1+2*d))
else:
  print((n//(1+2*d))+1)


n,d=map(int,input().split())

if n%(1+2*d)==0:
  print(n//(1+2*d))
else:
  print((n//(1+2*d))+1)


Verdicts: Wrong Answer

Accepted
Problem: There are N apple trees in a row. People say that one of them will bear golden apples.  We want to deploy some number of inspectors so that each of these trees will be inspected.  Each inspector will be deployed under one of the trees. For convenience, we will assign numbers from 1 through N to the trees. An inspector deployed under the i-th tree (1 \leq i \leq N) will inspect the trees with numbers between i-D and i+D (inclusive).  Find the minimum number of inspectors that we need to deploy to achieve the objective.

Submission attempts (in order):
import math
n,d=map(int,input().split())
x=n/(n*d+1)
print(math.ceil(x))

import math
n,d=map(int,input().split())
x=n/(2*d+1)
print(math.ceil(x))


Verdicts: Wrong Answer

Accepted
Problem: There are N apple trees in a row. People say that one of them will bear golden apples.  We want to deploy some number of inspectors so that each of these trees will be inspected.  Each inspector will be deployed under one of the trees. For convenience, we will assign numbers from 1 through N to the trees. An inspector deployed under the i-th tree (1 \leq i \leq N) will inspect the trees with numbers between i-D and i+D (inclusive).  Find the minimum number of inspectors that we need to deploy to achieve the objective.

Submission attempts (in order):
import math
N, D = map(int,input().split())
print(N, D)
cnt = math.floor(N/(2*D+1))
if N%(2*D+1) != 0:
  cnt += 1
print(cnt)

import math
N, D = map(int,input().split())
cnt = math.floor(N/(2*D+1))
if N%(2*D+1) != 0:
  cnt += 1
print(cnt)

Verdicts: Wrong Answer

Accepted
Problem: There are N apple trees in a row. People say that one of them will bear golden apples.  We want to deploy some number of inspectors so that each of these trees will be inspected.  Each inspector will be deployed under one of the trees. For convenience, we will assign numbers from 1 through N to the trees. An inspector deployed under the i-th tree (1 \leq i \leq N) will inspect the trees with numbers between i-D and i+D (inclusive).  Find the minimum number of inspectors that we need to deploy to achieve the objective.

Submission attempts (in order):
N,D = map(int, input().split())
d = 2D+1
print(N//d+1)

N,D = map(int, input().split())
print(N//(2D+1)+1)


N,D = map(int, input().split())
print(N//D+1)

N,D = map(int, input().split())
count = 0
i = 0
while i < N:
  i += 2*D+1
  count +=1
print(count+1)


N,D = map(int, input().split())
count = 0
i = 0
while i < N:
  i += 2*D+1
  count +=1
print(count)


Verdicts: Runtime Error

Runtime Error

Wrong Answer

Wrong Answer

Accepted
Problem: There are N apple trees in a row. People say that one of them will bear golden apples.  We want to deploy some number of inspectors so that each of these trees will be inspected.  Each inspector will be deployed under one of the trees. For convenience, we will assign numbers from 1 through N to the trees. An inspector deployed under the i-th tree (1 \leq i \leq N) will inspect the trees with numbers between i-D and i+D (inclusive).  Find the minimum number of inspectors that we need to deploy to achieve the objective.

Submission attempts (in order):
n, d = map(int,input().split())

print(int(n/d)+1)

n, d = map(int,input().split())
ans = int(n/(2*d+1))
if n%(2*d+1) == 0:
	print(int(ans))
else:
	print(ans+1)

Verdicts: Wrong Answer

Accepted
Problem: There are N apple trees in a row. People say that one of them will bear golden apples.  We want to deploy some number of inspectors so that each of these trees will be inspected.  Each inspector will be deployed under one of the trees. For convenience, we will assign numbers from 1 through N to the trees. An inspector deployed under the i-th tree (1 \leq i \leq N) will inspect the trees with numbers between i-D and i+D (inclusive).  Find the minimum number of inspectors that we need to deploy to achieve the objective.

Submission attempts (in order):
N, D = map(input())
A = (2D+1)//N
if A == 0:
  print(A)
elif A == 1:
  print(A+1)
 


n, d = map(int, input().split())
t = 2*d+1
print(n//t+1 if n%t else n//t)

Verdicts: Runtime Error

Accepted
Problem: There are N apple trees in a row. People say that one of them will bear golden apples.  We want to deploy some number of inspectors so that each of these trees will be inspected.  Each inspector will be deployed under one of the trees. For convenience, we will assign numbers from 1 through N to the trees. An inspector deployed under the i-th tree (1 \leq i \leq N) will inspect the trees with numbers between i-D and i+D (inclusive).  Find the minimum number of inspectors that we need to deploy to achieve the objective.

Submission attempts (in order):
x,y = map(int,input().split())
print(y//2*n+1)

x,y = map(int,input().split())
i=0
while x>0:
  i+=1
  x = x-(2*y+1)
print(i)  

Verdicts: Runtime Error

Accepted
Problem: There are N apple trees in a row. People say that one of them will bear golden apples.  We want to deploy some number of inspectors so that each of these trees will be inspected.  Each inspector will be deployed under one of the trees. For convenience, we will assign numbers from 1 through N to the trees. An inspector deployed under the i-th tree (1 \leq i \leq N) will inspect the trees with numbers between i-D and i+D (inclusive).  Find the minimum number of inspectors that we need to deploy to achieve the objective.

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


N,D = map(int,input(),split())
a = (N-1)/(2*D)
if (N-1)%(2*D)==0:
	print(a)
else:
 	print((N-1)//(2*D+1))


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


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


N,D = map(int,input(),split())
a = (N-1)//(2*D)
if (N-1)%(2*D) == 0:
	print(a)
else:
 	print((N-1)//(2*D+1))


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


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


N,D = map(int,input(),split()))
a = (N-1)/(2*D)
if (N-1)%(2*D)==0:
	print(a)
else :
 	print((N-1)//2*D+1)

N,D = map(int,input().split())
a = N//(2*D+1)
if N%(2*D+1) == 0:
	print(a)
else:
 	print(a+1)


Verdicts: Wrong Answer

Runtime Error

Wrong Answer

Wrong Answer

Runtime Error

Wrong Answer

Wrong Answer

Runtime Error

Accepted
Problem: There are N apple trees in a row. People say that one of them will bear golden apples.  We want to deploy some number of inspectors so that each of these trees will be inspected.  Each inspector will be deployed under one of the trees. For convenience, we will assign numbers from 1 through N to the trees. An inspector deployed under the i-th tree (1 \leq i \leq N) will inspect the trees with numbers between i-D and i+D (inclusive).  Find the minimum number of inspectors that we need to deploy to achieve the objective.

Submission attempts (in order):
n, d = map(int,input().split())
print(math.ceil(n/(2*d+1)))

import math
n, d = map(int,input().split())
print(math.ceil(n/(2*d+1)))

Verdicts: Runtime Error

Accepted
Problem: There are N apple trees in a row. People say that one of them will bear golden apples.  We want to deploy some number of inspectors so that each of these trees will be inspected.  Each inspector will be deployed under one of the trees. For convenience, we will assign numbers from 1 through N to the trees. An inspector deployed under the i-th tree (1 \leq i \leq N) will inspect the trees with numbers between i-D and i+D (inclusive).  Find the minimum number of inspectors that we need to deploy to achieve the objective.

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


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


Verdicts: Wrong Answer

Accepted
Problem: There are N apple trees in a row. People say that one of them will bear golden apples.  We want to deploy some number of inspectors so that each of these trees will be inspected.  Each inspector will be deployed under one of the trees. For convenience, we will assign numbers from 1 through N to the trees. An inspector deployed under the i-th tree (1 \leq i \leq N) will inspect the trees with numbers between i-D and i+D (inclusive).  Find the minimum number of inspectors that we need to deploy to achieve the objective.

Submission attempts (in order):
import math import ceil

n, d = map(int, input().split())

t = 2d + 1

print(ceil(n/t))

from math import ceil

n, d = map(int, input().split())

t = 2 * d + 1

print(ceil(n/t))

Verdicts: Runtime Error

Accepted
Problem: There are N apple trees in a row. People say that one of them will bear golden apples.  We want to deploy some number of inspectors so that each of these trees will be inspected.  Each inspector will be deployed under one of the trees. For convenience, we will assign numbers from 1 through N to the trees. An inspector deployed under the i-th tree (1 \leq i \leq N) will inspect the trees with numbers between i-D and i+D (inclusive).  Find the minimum number of inspectors that we need to deploy to achieve the objective.

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

c = a//b

print(c+1)

n, d = map(int, input().split())

if n%(2d+1) == 0:
  print(n%(2d+1))
else:
  print(n%(2d+1)+1)
  

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

c = a//b

print(c+1)


n, d = map(int, input().split())
 
if n%(2*d+1) == 0:
    print(n//(2*d+1))
else:
    print((n//(2*d+1))+1)
  

Verdicts: Wrong Answer

Runtime Error

Runtime Error

Accepted
Problem: There are N apple trees in a row. People say that one of them will bear golden apples.  We want to deploy some number of inspectors so that each of these trees will be inspected.  Each inspector will be deployed under one of the trees. For convenience, we will assign numbers from 1 through N to the trees. An inspector deployed under the i-th tree (1 \leq i \leq N) will inspect the trees with numbers between i-D and i+D (inclusive).  Find the minimum number of inspectors that we need to deploy to achieve the objective.

Submission attempts (in order):
nd=list(map(int,input().split()))
ans=nd[0]//(2*nd[1]+1)
if nd%(2*nd[1]+1)!=0:
  ans+=1
print(ans)

nd=list(map(int,input().split()))
ans=nd[0]//(2*nd[1]+1)
if nd[0]%(2*nd[1]+1)!=0:
  ans+=1
print(ans)

Verdicts: Runtime Error

Accepted
Problem: There are N apple trees in a row. People say that one of them will bear golden apples.  We want to deploy some number of inspectors so that each of these trees will be inspected.  Each inspector will be deployed under one of the trees. For convenience, we will assign numbers from 1 through N to the trees. An inspector deployed under the i-th tree (1 \leq i \leq N) will inspect the trees with numbers between i-D and i+D (inclusive).  Find the minimum number of inspectors that we need to deploy to achieve the objective.

Submission attempts (in order):
import math 
n,d=map(int,input().split())
print(math.ceil(n/(s*2+1)))


import math 
n,d=map(int,input().split())
print(math.ceil(n/(d*2+1)))


Verdicts: Runtime Error

Accepted
Problem: There are N apple trees in a row. People say that one of them will bear golden apples.  We want to deploy some number of inspectors so that each of these trees will be inspected.  Each inspector will be deployed under one of the trees. For convenience, we will assign numbers from 1 through N to the trees. An inspector deployed under the i-th tree (1 \leq i \leq N) will inspect the trees with numbers between i-D and i+D (inclusive).  Find the minimum number of inspectors that we need to deploy to achieve the objective.

Submission attempts (in order):
n,d = mat(int,input().split())

if n % (d*2+1) != 0:
  print(int(n % (d*2+1) + 1)) 
 else:
  print(int(n % (d*2+1)))

n,d = map(int,input().split())
 
if n % (d*2+1) != 0:
  print(int(n // (d*2+1) + 1)) 
else:
  print(int(n // (d*2+1)))

Verdicts: Runtime Error

Accepted
Problem: There are N apple trees in a row. People say that one of them will bear golden apples.  We want to deploy some number of inspectors so that each of these trees will be inspected.  Each inspector will be deployed under one of the trees. For convenience, we will assign numbers from 1 through N to the trees. An inspector deployed under the i-th tree (1 \leq i \leq N) will inspect the trees with numbers between i-D and i+D (inclusive).  Find the minimum number of inspectors that we need to deploy to achieve the objective.

Submission attempts (in order):
l = list(map(int,input().split()))
n = l[0]
d = l[1]

if n % (2d+1) == 0:
  print(n // (2d+1))
else:
  print(n // (2d+1) + 1)

l = list(map(int,input().split()))
n = l[0]
d = l[1]

if n % (2*d+1) == 0:
  print(n // (2*d+1))
else:
  print(n // (2*d+1) + 1)


Verdicts: Runtime Error

Accepted
Problem: There are N apple trees in a row. People say that one of them will bear golden apples.  We want to deploy some number of inspectors so that each of these trees will be inspected.  Each inspector will be deployed under one of the trees. For convenience, we will assign numbers from 1 through N to the trees. An inspector deployed under the i-th tree (1 \leq i \leq N) will inspect the trees with numbers between i-D and i+D (inclusive).  Find the minimum number of inspectors that we need to deploy to achieve the objective.

Submission attempts (in order):
import math
n, d = map(int, input().split())
print(math.ceil(n / (2d + 1)))

import math
n, d = map(int, input().split())
print(math.ceil(n / ((2 * d) + 1)))

Verdicts: Runtime Error

Accepted
Problem: There are N apple trees in a row. People say that one of them will bear golden apples.  We want to deploy some number of inspectors so that each of these trees will be inspected.  Each inspector will be deployed under one of the trees. For convenience, we will assign numbers from 1 through N to the trees. An inspector deployed under the i-th tree (1 \leq i \leq N) will inspect the trees with numbers between i-D and i+D (inclusive).  Find the minimum number of inspectors that we need to deploy to achieve the objective.

Submission attempts (in order):
n,d = map(int, input().split())

ans =  n // (2*d +1)

if ans == 0:
  print(ans +1)
else:
  print(ans)

import math
n,d = map(int, input().split())
a = n/(2*d+1)
print(math.ceil(a))

Verdicts: Wrong Answer

Accepted
Problem: There are N apple trees in a row. People say that one of them will bear golden apples.  We want to deploy some number of inspectors so that each of these trees will be inspected.  Each inspector will be deployed under one of the trees. For convenience, we will assign numbers from 1 through N to the trees. An inspector deployed under the i-th tree (1 \leq i \leq N) will inspect the trees with numbers between i-D and i+D (inclusive).  Find the minimum number of inspectors that we need to deploy to achieve the objective.

Submission attempts (in order):
n,d = map(int,input().split())
import math
print(math.ceil((n-1)/(2*d+1)) )


n,d = map(int,input().split())
import math
print(math.ceil(n/(2*d+1)) )


Verdicts: Wrong Answer

Accepted
Problem: There are N apple trees in a row. People say that one of them will bear golden apples.  We want to deploy some number of inspectors so that each of these trees will be inspected.  Each inspector will be deployed under one of the trees. For convenience, we will assign numbers from 1 through N to the trees. An inspector deployed under the i-th tree (1 \leq i \leq N) will inspect the trees with numbers between i-D and i+D (inclusive).  Find the minimum number of inspectors that we need to deploy to achieve the objective.

Submission attempts (in order):

S=input()

tmp=S.split()
N=int(tmp[0])
D=int(tmp[1])

List=[0]*N

count=0

for i in range(0+D,N-D,D+1):
    count+=1

print(count)


S=input()

tmp=S.split()
N=int(tmp[0])
D=int(tmp[1])

List=[0]*N

count=0

for i in range(0+D,N-D,D+1):
    if i>=N-D:
        break
    count+=1

print(count)


S=input()

tmp=S.split()
N=int(tmp[0])
D=int(tmp[1])

result=float(N/(2*D+1))

if result-int(result)>0:
    result=int(result)+1
else:
    result=int(result)

print(result)

Verdicts: Wrong Answer

Wrong Answer

Accepted
Problem: There are N apple trees in a row. People say that one of them will bear golden apples.  We want to deploy some number of inspectors so that each of these trees will be inspected.  Each inspector will be deployed under one of the trees. For convenience, we will assign numbers from 1 through N to the trees. An inspector deployed under the i-th tree (1 \leq i \leq N) will inspect the trees with numbers between i-D and i+D (inclusive).  Find the minimum number of inspectors that we need to deploy to achieve the objective.

Submission attempts (in order):
import math

n,d=map(int,input().split())

print(math.ceil(n/(2d+1.0)))


import math

n,d=map(int,input().split())

print(math.ceil(n/(2*d+1.0)))


Verdicts: Runtime Error

Accepted
Problem: There are N apple trees in a row. People say that one of them will bear golden apples.  We want to deploy some number of inspectors so that each of these trees will be inspected.  Each inspector will be deployed under one of the trees. For convenience, we will assign numbers from 1 through N to the trees. An inspector deployed under the i-th tree (1 \leq i \leq N) will inspect the trees with numbers between i-D and i+D (inclusive).  Find the minimum number of inspectors that we need to deploy to achieve the objective.

Submission attempts (in order):
a = n // (2*d+1)

if n%(2*d+1) == 0:
    print(a)
else:
    print(a+1)

n,d = list(map(int, input().split(' ')))

a = n // (2*d+1)

if n%(2*d+1) == 0:
    print(a)
else:
    print(a+1)

Verdicts: Runtime Error

Accepted
Problem: There are N apple trees in a row. People say that one of them will bear golden apples.  We want to deploy some number of inspectors so that each of these trees will be inspected.  Each inspector will be deployed under one of the trees. For convenience, we will assign numbers from 1 through N to the trees. An inspector deployed under the i-th tree (1 \leq i \leq N) will inspect the trees with numbers between i-D and i+D (inclusive).  Find the minimum number of inspectors that we need to deploy to achieve the objective.

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

n,d = map(int, input().split())
print((n + d) // d+1)

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

Verdicts: Wrong Answer

Wrong Answer

Accepted
Problem: There are N apple trees in a row. People say that one of them will bear golden apples.  We want to deploy some number of inspectors so that each of these trees will be inspected.  Each inspector will be deployed under one of the trees. For convenience, we will assign numbers from 1 through N to the trees. An inspector deployed under the i-th tree (1 \leq i \leq N) will inspect the trees with numbers between i-D and i+D (inclusive).  Find the minimum number of inspectors that we need to deploy to achieve the objective.

Submission attempts (in order):
import math
n, d=map(int, input().split())
print(math.ceil(n//(2*d+1)))

import math
n, d=map(int, input().split())
print(math.ceil(n/(2*d+1)))

Verdicts: Wrong Answer

Accepted
Problem: There are N apple trees in a row. People say that one of them will bear golden apples.  We want to deploy some number of inspectors so that each of these trees will be inspected.  Each inspector will be deployed under one of the trees. For convenience, we will assign numbers from 1 through N to the trees. An inspector deployed under the i-th tree (1 \leq i \leq N) will inspect the trees with numbers between i-D and i+D (inclusive).  Find the minimum number of inspectors that we need to deploy to achieve the objective.

Submission attempts (in order):
import math
n,d = map(int,input().split())
math.ceil(n/(2*d+1))

import math
n,d = map(int,input().split())
print(math.ceil(n/(2*d+1)))

Verdicts: Wrong Answer

Accepted
Problem: There are N apple trees in a row. People say that one of them will bear golden apples.  We want to deploy some number of inspectors so that each of these trees will be inspected.  Each inspector will be deployed under one of the trees. For convenience, we will assign numbers from 1 through N to the trees. An inspector deployed under the i-th tree (1 \leq i \leq N) will inspect the trees with numbers between i-D and i+D (inclusive).  Find the minimum number of inspectors that we need to deploy to achieve the objective.

Submission attempts (in order):
N, D = map(int,input().split())
ans = 0
count = 0
while(count>=N):
    count += 2*D + 1
    ans += 1
print(ans)

N, D = map(int,input().split())
ans = 0
count = 0
while(count < N):
    count += 2*D + 1
    ans += 1
print(ans)

Verdicts: Wrong Answer

Accepted
Problem: There are N apple trees in a row. People say that one of them will bear golden apples.  We want to deploy some number of inspectors so that each of these trees will be inspected.  Each inspector will be deployed under one of the trees. For convenience, we will assign numbers from 1 through N to the trees. An inspector deployed under the i-th tree (1 \leq i \leq N) will inspect the trees with numbers between i-D and i+D (inclusive).  Find the minimum number of inspectors that we need to deploy to achieve the objective.

Submission attempts (in order):
# ABC001A

n, d = map(int, input().split())
print(sp.ceil(n / (2 * d + 1)))


# ABC001A

n, d = map(int, input().split())
print(-(-n // (2 * d + 1)))


Verdicts: Runtime Error

Accepted
Problem: There are N apple trees in a row. People say that one of them will bear golden apples.  We want to deploy some number of inspectors so that each of these trees will be inspected.  Each inspector will be deployed under one of the trees. For convenience, we will assign numbers from 1 through N to the trees. An inspector deployed under the i-th tree (1 \leq i \leq N) will inspect the trees with numbers between i-D and i+D (inclusive).  Find the minimum number of inspectors that we need to deploy to achieve the objective.

Submission attempts (in order):
N,D = map(int,input().split())
x = N//(D*2+1)
if N%(D*2+1)1=0:
  print(x+1)
else:
  print(x)

N,D = map(int,input().split())
x = N//(D*2+1)
if N%(D*2+1)!=0:
  print(x+1)
else:
  print(x)

Verdicts: Runtime Error

Accepted
Problem: There are N apple trees in a row. People say that one of them will bear golden apples.  We want to deploy some number of inspectors so that each of these trees will be inspected.  Each inspector will be deployed under one of the trees. For convenience, we will assign numbers from 1 through N to the trees. An inspector deployed under the i-th tree (1 \leq i \leq N) will inspect the trees with numbers between i-D and i+D (inclusive).  Find the minimum number of inspectors that we need to deploy to achieve the objective.

Submission attempts (in order):
n,d = map(int,input().split())

if (2*d+1) > N:
  print(1)
else:
  print(int(n / (2*d+1)))

n,d = map(int.input(),split())

if (2*d+1) > N:
  print(1)
else:
  print(int(n / (2*d+1)))

n,d = map(int,input().split())

if (2*d+1) > n:
  print(1)
else:
  print(int(n / (2*d+1)))

n,d = map(int,input().split())

if (2*d+1) > n:
  print(1)
else:
  print(-(-n // (2*d+1))+1)

n,d = map(int,input().split())

if (2*d+1) > n:
  print(1)
else:
  print(-(-n // (2*d+1)))

Verdicts: Runtime Error

Runtime Error

Wrong Answer

Wrong Answer

Accepted
Problem: There are N apple trees in a row. People say that one of them will bear golden apples.  We want to deploy some number of inspectors so that each of these trees will be inspected.  Each inspector will be deployed under one of the trees. For convenience, we will assign numbers from 1 through N to the trees. An inspector deployed under the i-th tree (1 \leq i \leq N) will inspect the trees with numbers between i-D and i+D (inclusive).  Find the minimum number of inspectors that we need to deploy to achieve the objective.

Submission attempts (in order):
n, d = map(int, input().split())
print((2 * d + n) / (2 * d + 1))

n, d = map(int, input().split())
  while((2 * (d + i) + 1) * 2 >= n):
print((2 * d + n) / (2 * d + 1))



n, d = map(int, input().split())
i = 0
if(((d + i) + 1) * 2 >= n):
  i += 0
else:
  while((2 * (d + i) + 1) * 2 >= n):
    i += 1
print(i + 1)



n, d = map(int, input().split())
i = 0
if((2 *(d + i) + 1) * 2 >= n):
  i += 0
else:
  while((2 * (d + i) + 1) * 2 >= n):
    i += 1
print(i + 1)



n, d = map(int, input().split())
print((2 * d + n) // (2 * d + 1))


Verdicts: Wrong Answer

Runtime Error

Wrong Answer

Wrong Answer

Accepted
Problem: There are N apple trees in a row. People say that one of them will bear golden apples.  We want to deploy some number of inspectors so that each of these trees will be inspected.  Each inspector will be deployed under one of the trees. For convenience, we will assign numbers from 1 through N to the trees. An inspector deployed under the i-th tree (1 \leq i \leq N) will inspect the trees with numbers between i-D and i+D (inclusive).  Find the minimum number of inspectors that we need to deploy to achieve the objective.

Submission attempts (in order):
N,D=[int(x) for x in input().split()]

ans=N/(2*D+1)
int_ans=int(ans)
print(ans)

if ans-int_ans!=0:
    ans+=1

print(int(ans))

N,D=[int(x) for x in input().split()]

ans=N/(2*D+1)
int_ans=int(ans)

if ans-int_ans!=0:
    ans+=1

print(int(ans))

Verdicts: Wrong Answer

Accepted
Problem: There are N apple trees in a row. People say that one of them will bear golden apples.  We want to deploy some number of inspectors so that each of these trees will be inspected.  Each inspector will be deployed under one of the trees. For convenience, we will assign numbers from 1 through N to the trees. An inspector deployed under the i-th tree (1 \leq i \leq N) will inspect the trees with numbers between i-D and i+D (inclusive).  Find the minimum number of inspectors that we need to deploy to achieve the objective.

Submission attempts (in order):
inp = list(map(int, input().strip().split(' ')))

a = inp[0]
b = inp[1]

r = b * 2 + 1
m = math.ceil(a / r)
print(m)


import math

inp = list(map(int, input().strip().split(' ')))

a = inp[0]
b = inp[1]

r = b * 2 + 1
m = math.ceil(a / r)
print(m)


Verdicts: Runtime Error

Accepted
Problem: There are N apple trees in a row. People say that one of them will bear golden apples.  We want to deploy some number of inspectors so that each of these trees will be inspected.  Each inspector will be deployed under one of the trees. For convenience, we will assign numbers from 1 through N to the trees. An inspector deployed under the i-th tree (1 \leq i \leq N) will inspect the trees with numbers between i-D and i+D (inclusive).  Find the minimum number of inspectors that we need to deploy to achieve the objective.

Submission attempts (in order):
n,d=map(int,input().split())
print(-(-n//(2*d))

n,d=map(int,input().split())
print(-(-n//2d))

n,d=map(int,input().split())
print(-(-n//(2*d+1)))

Verdicts: Runtime Error

Runtime Error

Accepted
Problem: There are N apple trees in a row. People say that one of them will bear golden apples.  We want to deploy some number of inspectors so that each of these trees will be inspected.  Each inspector will be deployed under one of the trees. For convenience, we will assign numbers from 1 through N to the trees. An inspector deployed under the i-th tree (1 \leq i \leq N) will inspect the trees with numbers between i-D and i+D (inclusive).  Find the minimum number of inspectors that we need to deploy to achieve the objective.

Submission attempts (in order):
import sys

if sys.platform =='ios':
    sys.stdin=open('input_file.txt')
    
a,b=map(int,input().split())

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

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

c=(-((-a)//(2*b+1)))
print(c)

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

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

import sys

if sys.platform =='ios':
    sys.stdin=open('input_file.txt')
    
a,b=map(int,input().split())

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

import sys

if sys.platform =='ios':
    sys.stdin=open('input_file.txt')
    
a,b=map(int,input().split())

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

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

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

Verdicts: Wrong Answer

Runtime Error

Runtime Error

Runtime Error

Runtime Error

Accepted