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):
import math
n = int(input())
d = int(input())
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/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):
N, D=map(int,input().split())
int(N/(2*D) + 0.5)

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

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

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):
N,D = [int(s) for s in input().split()]
total = 0
count = 0

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

print(count)

N, D = [int(s) for s in input().split()]
print(N // (2 * D + 1) + (N % (2 * D + 1) != 0) )

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)%(2*D)!=0:
    print((N-2)//(2*D)+1)
else:
    print((N-2)//(2*D))

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

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

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):
 n,b = map(int,input().split())
 
 print(n //(b*2))
 
 

n,b = map(int,input().split())
 
print(n //(b*2))
 
 

n,b = map(int,input().split())
 
print(-(-n//(b*2 +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)
if n%(2*d):
    ans+=1
print(ans)

n,d = map(int,input().split())
ans = n//(2*d+1)
if n%(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):
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=int(input().split())
cnt=1
while True:
  if (2*d+1)*cnt>=n:
    print(cnt)
    break
  
  cnt+=1
  
  

n, d=input().split()
ni=int(n)
di=int(d)
cnt=1
while True:
  if (2*di+1)*cnt>=ni:
    print(cnt)
    break
  
  cnt+=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, k = list(map(int, input().split()))
print(math.ceil(n // (2 * k)))

import math
n, k = list(map(int, input().split()))
print(math.ceil(n / (2 * k + 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,inpit().split())
x=2*d+1
print((d+x-1)//x)

n,d=map(int,input().split())
x=2*d+1
print((n+x-1)//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 = list(map(int,input().split()))
mireru = 2*d+1
print(mireru)
print(int((n-(n%mireru))/mireru+int(n%mireru != 0)))

n,d = list(map(int,input().split()))
mireru = 2*d+1
print(int((n-(n%mireru))/mireru+int(n%mireru != 0)))

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 = list(map(int,input().split()))
human = 1
kanshi = 2*D+1
haniwhile hani < N:
    hani = hani + kanshi
    human +=1
    
print(human) = kanshi


N,D = list(map(int,input().split()))
human = 1
hani = 2*D+1
haniwhile hani < N:
    hani = hani + (2*D+1)
    human +=1
    
print(human) = kanshi


N,D = list(map(int,input().split()))
human = 1
hani = 2*D+1
while hani < N:
    hani = hani + (2*D+1)
    human +=1
    
print(human) = kanshi


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

human = 1
kanshi = 2*D+1

while kanshi < N-1:
    kanshi = kanshi*2
    human +=1
    
print(human)

N,D = list(map(int,input().split()))
human = 1
hani = 2*D+1
while hani < N:
    hani = hani + (2*D+1)
    human +=1
    
print(human)

Verdicts: Runtime Error

Runtime Error

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

a,b=map(int,input().split())
x=a//(2*b+1)
if a%(2*b+1)!=0:
  x=x+1
print(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):
N, D = map(int, input().split())
print(N//(2*D+1.001) + 1)

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

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

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):
N, D = map(int, input().split())
B=2*D
A=N//2B+1
print(A)

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

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

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):
N,D=list(map(int,input().split()))
print(N//(1+2D))

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

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

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

Verdicts: Runtime Error

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 = int(input())
d = int(input())
i = (d * 2) + 1
if n % i == 0 :
  print(n / i)
else :
  print((n // i) + 1)


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


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

n, d = map(int, input().split())
i = (d * 2) + 1
if n % i == 0 :
  print(n // i)
else :
  print((n // i) + 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):
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):
# coding: utf-8
# Your code here!

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


preans = N/(2*D + 1)

print(preans)

if preans == N//(2*D + 1) :
    print(preans)
    
else:
    print(preans+1)

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

ans = N//D + 1

# coding: utf-8
# Your code here!

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


preans = N/(2*D + 1)

#print(preans)

if preans == N//(2*D + 1) :
    print(preans)
    
else:
    print(preans+1)

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


preans = N/(2*D + 1)

print(preans)

if preans == N//(2*D + 1) :
    print(int(preans))
    
else:
    print(int(preans+1))

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


preans = N/(2*D + 1)

#print(preans)

if preans == N//(2*D + 1) :
    print(int(preans))
    
else:
    print(int(preans+1))

Verdicts: Wrong Answer

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


import math
a,b=map(int,input().split())
print(math.ceil(a/(b*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=map(int,input().split());print(0--n//d-~d)

n,d=map(int,input().split());print(0--n//(d-~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(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(int(n/(2*d+1)))
else:
  print(int((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):
# -*- coding: <encoding name> -*-

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

# -*- coding: <encoding name> -*-

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

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)
print(D)
import math
print(N/(1+2*D))
math.ceil(N/(1+2*D))

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

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

import math

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

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

for i in range(N):
    if N - (2*D + 1)*i <= 0:
        print(i)
        break

print(N)


import sys

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

for i in range(N):
    if N - (2*D + 1)*i <= 0:
        print(i)
        sys.exit(0)

print(N)


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

watch = D * 2 + 1

ans = ( N + watch - 1 ) // watch

print(ans)

N, D = map(int,input().split())
 
watch = D * 2 + 1
 
ans = ( N + watch - 1 ) // watch
 
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/(2*d+1))

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

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(int((n+(2*d))/d))

n, d = map(int,input().split())
cov = 2 * d
print(int((n+cov)/(cov+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())
d = []
i = 1
while len(d) <= N:
    d += [i]*(D*2+1)
    i += 1
len(set(d))

N, D = map(int, input().split())
d = []
i = 1
while len(d) <= N:
    d += [i]*(D*2+1)
    i += 1
print(len(set(d[:N])))

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=(n/(d*2))
ansint =int(n/(d*2))

if(ansint - ans >= 0.5):
  ansint = ansint + 1

print(ansint)

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

hani = d*2 + 1

ans = int(n/hani)

print(ans)

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

print(int(n/(d*2)))

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

hani = d*2 + 1

ans = int(n/hani)

if(ans - (n/hani) < 0):
  ans += 1

print(ans)

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):
#int(input())
#map(int, input().split())
N,D=map(int, input().split())
print(N//(D*2))

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

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

#int(input())
#map(int, input().split())
N,D=map(int, input().split())
if N<=D*2:
  print(1)
elif N%(D*2+1)==0:
  print(N//(D*2+1))
else:
  print(N//(D*2+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())

print((n + d * 2) / (d * 2 + 1))

N, D = map(int,input().split())
 
num = D*2 + 1
if N % num == 0:
    print(int(N / num))
else:
    print(N // 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):
N,D = map(int,input().split())

can = ((2*D)+1)

ans = 0

while N >= can:
  ans += 1
  N -= can
  
  
print(ans)




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

can = ((2*N)+1)

ans = 0

while N > can:
  ans += 1
  N -= can
  
  
print(ans)


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



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):
n,d = map(int, input().split())
k = n%(2*d + 1)
if k == 0:
  print(n//(2*d+1))
else:
  print(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())
Answer = (N-1)//(2D+1)+1
print(Answer)

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

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+D*2)/(D*2+1))


N,D=map(int,input().split())
print(int((N+D*2)/(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())
x=d*2+1
print(math.ceil(n/x))

import math
n,d=map(int,input().split())
x=d*2+1
print(math.ceil(n/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):
import math
N,D = map(int,input().split())
print(math.ceil(D/(N*2+1)))

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

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

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

if N & (D*2 + 1 ) = 0:
    print(N/(D*2 + 1))
else :
    print(round(N//(D*2 + 1)+1))
    

N,D = map(int,input().split())
 
if N % (D*2 + 1 ) == 0:
    print(round(N/(D*2 + 1)))
else :
    print(round(N//(D*2 + 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):
def main():
    import sys
    input = sys.stdin.readline
    
    n, d = map(int, input().split())
    print((n + d - 1) // d)
    
    return 0

main()

def main():
    import sys
    input = sys.stdin.readline
    
    n, d = map(int, input().split())
    d = 2 * d + 1
    print((n + d - 1) // d)
    
    return 0

main()

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):
x, y = map( int, input().split())
print(x//(y*2+1))

import math
x,y=input().split()
print(math.ceil(int(x)/(int(y)*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):
N, D = map(int, input().split())

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

N, D = map(int, input().split())
print( (N + 2*D) // (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):
shuru=input()
shuru=shuru.split()
n=int(shuru[0])
d=int(shuru[1])
d=2*d+1
ans=n//d
if n%d==0 :
  ans+=1
print(ans)

shuru=input()
shuru=shuru.split()
n=int(shuru[0])
d=int(shuru[1])
d=2*d+1
ans=n//d
if n%d!=0 :
  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):
def main11():
    data = input().split()
    num = []
    for i in range(2):
        num.append(int(data[i]))
    result = int(num[0] / (num[1] * 2 + 1))
    print(result)

if __name__ == "__main__":
    main11()

def main11():
    data = input().split()
    num = []
    for i in range(2):
        num.append(int(data[i]))
    result = int(num[0] / (num[1] * 2 + 1))
    if int(num[0] % (num[1] * 2 + 1)) != 0:
        result = result + 1
    print(result)

if __name__ == "__main__":
    main11()

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 = D * 2 + 1

pre_answer = N / X
print(math.ceil(pre_answer))


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

x = D * 2 + 1

pre_answer = - (-N // X)
print(int(pre_answer))


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

X = D * 2 + 1

pre_answer = N / X
print(math.ceil(pre_answer))


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

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

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

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

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

if n%((2*d)+1)==0:
  print(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(int,input().split())
print((N//(2D+1))+1)

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

import math
N,D=map(int,input().split())
print(math.ceil(N/(2*D+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 // d + 1
print(ans)


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

if n % (2 * d + 1) == 0:
    ans = n // (2 * d + 1)
else:
    ans = n // (2 * d + 1) + 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):
N,D = map(int,input().split())
#print(N,D)
A = [i for i in range(1,N+1)]
#print(A)

def people(t):
    t = t + 2*D
    return t
if N<D:
    print(1)

else:
    t = 1
    c = 0
    while t < N:
        #print(t)
        t = people(t+1)
        c+=1
    print(c)
    

N,D = map(int,input().split())
#print(N,D)
A = [i for i in range(1,N+1)]
#print(A)

def people(t):
    p = t + D
    t = p + D
    return t
t = 1
c = 0
while t < N:
    #print(t)
    t = people(t+1)
    c+=1
print(c)

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

def people(t):
    t = t + 2*D
    return t
if N<D:
    print(1)

else:
    t = 1
    c = 0
    while t <= N:
        #print(t)
        t = people(t+1)
        c+=1
    print(c)

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):
nd=input()
ndlis=['' for i in range(2)]
ndlis=nd.split()
n=int(ndlis[0])
d=int(ndlis[1])
on=0
cnt=0
while on==0:
	cnt=cnt+1
	if n<=cnt*d:
		on=1
print(cnt)

nd=input()
ndlis=['' for i in range(2)]
ndlis=nd.split()
n=int(ndlis[0])
d=int(ndlis[1])
on=0
cnt=0
while on==0:
	cnt=cnt+1
	if n<=cnt*(d*2+1):
		on=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())
print((n + d + d) / (d + d + 1))


n, d = map(int, input().split())
print(int((n + d + d) / (d + 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())
print(N/D+1)


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


N,D = map(int,input().split())
ans = N //(2*D+1)+1
if N%(2*D+1)== 0:
    ans-=1
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):
N, D = map(int, input().split())

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



from math import floor,ceil
N, D = map(int, input().split())

print(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*2)))

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

ans = math.ceil((N-1)/(D*2+1))

if (N-1) % (D*2+1) == 0:
    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):
n,p=map(int,input().split())
if n%(2p+1)==0:
    print(n//(2p+1))
else:
    print(n//(2p+1)+1)

n,p=map(int,input().split())
if n%(2*p+1)==0:
    print(n//(2*p+1))
else:
    print(n//(2*p+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):
N, D = map(int, input().split())

syou=N//D
amari=N%D

if amari != 0:
  syou=syou+1

print(syou)


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

D=2*d+1
syou=N//D
amari=N%D

if amari != 0:
  syou=syou+1

print(syou)


Verdicts: Wrong Answer

Accepted