problem_id
stringlengths
6
6
user_id
stringlengths
10
10
time_limit
float64
1k
8k
memory_limit
float64
262k
1.05M
problem_description
stringlengths
48
1.55k
codes
stringlengths
35
98.9k
status
stringlengths
28
1.7k
submission_ids
stringlengths
28
1.41k
memories
stringlengths
13
808
cpu_times
stringlengths
11
610
code_sizes
stringlengths
7
505
p02964
u844789719
2,000
1,048,576
We have a sequence of N \times K integers: X=(X_0,X_1,\cdots,X_{N \times K-1}). Its elements are represented by another sequence of N integers: A=(A_0,A_1,\cdots,A_{N-1}). For each pair i, j (0 \leq i \leq K-1,\ 0 \leq j \leq N-1), X_{i \times N + j}=A_j holds. Snuke has an integer sequence s, which is initially empty...
["import bisect\nN, K, *A = [int(_) for _ in open(0).read().split()]\nK -= 1\nL = [[] for _ in range(10)]\nfor i, a in enumerate(A * 2):\n L[a] += [i]\nbefore_next = [L[a][bisect.bisect(L[a], i)] for i, a in enumerate(A)]\nfirst_cycle = [None] * N\nnow = 0\nidx = 0\ncycle = 0\nwhile True:\n if first_cycle[now] is...
['Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted']
['s028648229', 's659509492', 's999700449', 's438609923']
[31764.0, 31748.0, 31704.0, 78732.0]
[81.0, 82.0, 79.0, 576.0]
[1172, 1172, 1172, 1165]
p02964
u922449550
2,000
1,048,576
We have a sequence of N \times K integers: X=(X_0,X_1,\cdots,X_{N \times K-1}). Its elements are represented by another sequence of N integers: A=(A_0,A_1,\cdots,A_{N-1}). For each pair i, j (0 \leq i \leq K-1,\ 0 \leq j \leq N-1), X_{i \times N + j}=A_j holds. Snuke has an integer sequence s, which is initially empty...
["N, K = map(int, input().split())\nA = list(map(int, input().split()))\n\nremain = [''] * (N+1) \nd = {}\nfor i, a in enumerate(A[::-1]):\n j = N - 1 - i\n if a in d:\n idx = d[a][-1]\n remain[j] = remain[idx+1]\n d[a].append(j)\n else:\n remain[j] = str(a) + ' ' + remain[j+1]\n d[a] = [j]\n\ncands =...
['Runtime Error', 'Wrong Answer', 'Accepted']
['s352133553', 's928784285', 's857070085']
[495284.0, 97432.0, 96280.0]
[2635.0, 834.0, 648.0]
[495, 1062, 4030]
p02965
u340781749
2,000
1,048,576
We have a sequence of N integers: x=(x_0,x_1,\cdots,x_{N-1}). Initially, x_i=0 for each i (0 \leq i \leq N-1). Snuke will perform the following operation **exactly** M times: * Choose two distinct indices i, j (0 \leq i,j \leq N-1,\ i \neq j). Then, replace x_i with x_i+2 and x_j with x_j+1. Find the number of dif...
['def prepare(n, MOD):\n f = 1\n factorials = [1] * (n + 1)\n for m in range(1, n + 1):\n f = f * m % MOD\n factorials[m] = f\n inv = pow(f, MOD - 2, MOD)\n invs = [1] * (n + 1)\n invs[n] = inv\n for m in range(n, 1, -1):\n inv = inv * m % MOD\n invs[m - 1] = inv\n\n ...
['Wrong Answer', 'Accepted']
['s740805916', 's230073650']
[200820.0, 200820.0]
[1523.0, 1526.0]
[1006, 1006]
p02970
u003501233
2,000
1,048,576
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 ...
['N=int(input())\nD=int(input())\n\nprint((N+D*2)/(D*2+1))', 'N=int(input())\nD=int(input())\n\nprint((N+D*2)//(D*2+1))', 'N,D=map(int,input().split())\n\nprint((N+2*D) // (2*D+1))']
['Runtime Error', 'Runtime Error', 'Accepted']
['s012143485', 's904055925', 's531908087']
[3060.0, 2940.0, 2940.0]
[19.0, 17.0, 17.0]
[53, 54, 55]
p02970
u016622494
2,000
1,048,576
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 ...
['N ,D =map(int,input().split())\ncnt = 0\ni2 = 0\nfor i in range(N):\n if i - D ==1:\n i2 = i\n break\nfor j in range(N):\n if i2 + D >=N:\n cnt += 1\n break\n else:\n print(i2)\n i2 = i2 + D + i2\n cnt+= 1\nprint(cnt)\n', 'N ,D =map(int,input().split())\ncnt =...
['Wrong Answer', 'Wrong Answer', 'Accepted']
['s721437730', 's929476728', 's706711798']
[2940.0, 2940.0, 2940.0]
[17.0, 18.0, 17.0]
[261, 258, 117]
p02970
u017064954
2,000
1,048,576
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 ...
['import math\nn, d = map(input().split())\nse = d * 2 + 1\nprint(math.ceil(n/d))', 'n, d = map(int, input().split())\na = n // (2d + 1) + 1\nprint(a)\n', 'n, d = map(int, input().split())\na = n // (2d + 1) + 1\nprint(a)', 'import math\nn, d = map(input().split())\nse = d * 2 + 1\nprint(math.ceil(n/se))\n', 'n = int(i...
['Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Wrong Answer', 'Accepted']
['s139222398', 's198583731', 's277328892', 's473641492', 's475592503', 's637310431', 's731325654']
[2940.0, 2940.0, 2940.0, 2940.0, 2940.0, 2940.0, 2940.0]
[17.0, 18.0, 18.0, 18.0, 17.0, 17.0, 17.0]
[76, 64, 63, 78, 54, 54, 83]
p02970
u017624958
2,000
1,048,576
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 ...
['import math\n\ninputted = list(map(int, input().split()))\nN = inputted[0]\nD = inputted[1]\n\nmonitor = (D + 1) * 2\nanswer = math.ceil(N / monitor)\n\nprint(answer)\n', 'import math\n\ninputted = list(map(int, input()))\nN = inputted[0]\nD = inputted[1]\n\nmonitor = (D + 1) * 2\nanswer = math.ceil(N / monitor)\n\np...
['Wrong Answer', 'Runtime Error', 'Accepted']
['s210854903', 's590297145', 's554834534']
[2940.0, 2940.0, 2940.0]
[17.0, 18.0, 18.0]
[158, 150, 156]
p02970
u020959776
2,000
1,048,576
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 ...
["import io\nimport sys\nfrom math import ceil\n\n\ndef IN_S():\n return input()\n\n\ndef IN_I():\n return int(input())\n\n\ndef IN_L_I():\n return list(map(int, input().split()))\n\n\ndef IN_L_S():\n return list(map(str, input().split()))\n\n\ndef STR_SPLIT(s, n):\n for l in range(0, len(s), n):\n yield s[0 + ...
['Wrong Answer', 'Accepted']
['s178004653', 's452639654']
[3064.0, 3064.0]
[17.0, 17.0]
[574, 570]
p02970
u023229441
2,000
1,048,576
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 ...
['a,b=map(int,input().split())\nprnit((a-0.01)//(2*b+1)+1)', 'a,b=map(int,input().split())\nprint((a-0.01)//(2*b+1)+1)\n', 'a,b=map(int,input().split())\nprint(int((a-0.01)//(2*b+1)+1))']
['Runtime Error', 'Wrong Answer', 'Accepted']
['s207722416', 's314111105', 's149984478']
[2940.0, 2940.0, 2940.0]
[18.0, 17.0, 17.0]
[55, 56, 60]
p02970
u025501820
2,000
1,048,576
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 ...
['import math\nN, D = map(int, input().split())\nprint(math.ceil((N - 1) / (2 * D + 1)))', 'import math\nN, D = map(int, input().split())\nprint(math.ceil(N / (2 * D + 1)))']
['Wrong Answer', 'Accepted']
['s355121436', 's440448929']
[2940.0, 2940.0]
[17.0, 17.0]
[84, 78]
p02970
u027929618
2,000
1,048,576
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 ...
['n,d=map(int,input().split())\nprint(n//d)\n', 'n,d=map(int,input().split())\nprint(int((n+d*2)/(d*2+1)))\n']
['Wrong Answer', 'Accepted']
['s122680315', 's170992476']
[2940.0, 2940.0]
[17.0, 17.0]
[41, 57]
p02970
u034777138
2,000
1,048,576
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 ...
['\na,b = map(int, input().split())\n\nprint(a/(b*2)+1)\n', 'N,D = map(int,input().split())\n\nif N % (D*2+1)== 0:\n print(int(N / (D*2+1)))\nelse:\n print(int(N / (D*2+1)) + 1)']
['Wrong Answer', 'Accepted']
['s196684615', 's279108951']
[2940.0, 2940.0]
[17.0, 17.0]
[51, 117]
p02970
u036479746
2,000
1,048,576
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 ...
['n,d=map(int,input().split())\nif n%(2*d+1)!=0:\n print(n//(2*d+1)+1)\nelse:\n print(n//(2*d+1', 'n,d=map(int,input().split())\nif n%(2*d+1)!=0:\n print(n//(2*d+1)+1)\nelse:\n print(n//(2*d+1))']
['Runtime Error', 'Accepted']
['s563490978', 's871508353']
[2940.0, 2940.0]
[17.0, 17.0]
[94, 96]
p02970
u039332718
2,000
1,048,576
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 ...
['# -*- coding: UTF-8 -*-\nimport math\nn, d = map(int, input().split())\nprint(math.floor(n/(2*d+1)))\n', '# -*- coding: UTF-8 -*-\nimport math\nn, d = map(int, input().split())\nprint(math.ceil(n/(2*d+1)))\n']
['Wrong Answer', 'Accepted']
['s723103764', 's708304569']
[2940.0, 2940.0]
[18.0, 17.0]
[98, 97]
p02970
u040141413
2,000
1,048,576
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 ...
['n,d=map(int,input().split())\nx=2*d+1\nif(n%x!=0):\n print(int(n/x))\nelse:\n print(int(n/x)+1)\n\n\n', 'n,d=map(int,input().split())\nif(d>=10){\nprint(1)\n}else{\nx=2*d+1\nprint(int(n/x)+1)\n}\n', 'n,d=map(int,input().split())\nx=2*d+1\nif(n%x!=0):\n print(int(n/x)+1)\nelse:\n print(int(n/x))\n\n\n']
['Wrong Answer', 'Runtime Error', 'Accepted']
['s395524644', 's800911746', 's647516382']
[2940.0, 2940.0, 2940.0]
[17.0, 18.0, 17.0]
[99, 84, 99]
p02970
u042385277
2,000
1,048,576
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 ...
['import math\nN, D = map(int, input().split())\nprint(math.ceil(N/(2D+1)))\n', 'import math\nN, D = map(int, input().split())\nprint(math.ceil(N /(2 * D + 1)))\n\n']
['Runtime Error', 'Accepted']
['s915942608', 's199369361']
[2940.0, 3188.0]
[18.0, 18.0]
[72, 79]
p02970
u042716570
2,000
1,048,576
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 ...
['N, D = map(int, input().split())\nprint(N//(D*2+1)+1)N, D = map(int, input().split())\nprint(-(-N//(D*2+1)))', 'N, D = map(int, input().split())\nprint(-(-N//(D*2+1)))']
['Runtime Error', 'Accepted']
['s430623315', 's763341851']
[2940.0, 2940.0]
[17.0, 17.0]
[106, 54]
p02970
u046592970
2,000
1,048,576
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 ...
['n,d = map(int,input().split())\nx = d*2 + 1\nprint((n+d*2)//(x)', 'n,d = map(int,input().split())\nx = d*2 + 1\nprint((n+d*2)//x)']
['Runtime Error', 'Accepted']
['s312796392', 's059283677']
[2940.0, 3064.0]
[17.0, 17.0]
[61, 60]
p02970
u054471580
2,000
1,048,576
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 ...
['n,d = (int(i) for i in input().split())\n\ni=1\nanswer=0\nwhile(True):\n i = i + 2*d + 1\n answer += 1\n if i>=n:\n break\n \nprint(answer)', 'n,d = (int(i) for i in input().split())\n\ni=1\nanswer=0\nwhile(True):\n i = i + 2*d + 1\n answer += 1\n if (i-1)>=n:\n break\n \...
['Wrong Answer', 'Accepted']
['s785725259', 's603456942']
[2940.0, 2940.0]
[18.0, 19.0]
[152, 156]
p02970
u060569392
2,000
1,048,576
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 ...
['n,s=map(int,input().split())\n\ncount=n//(2*d+1)\n\nif n%(2*d+1)==0:\n print(count)\nelse:\n print(count+1)', 'n,s=map(int,input().split())\n\ncount=n//(2*s+1)\n\nif n%(2*s+1)==0:\n print(count)\nelse:\n print(count+1)']
['Runtime Error', 'Accepted']
['s771525640', 's396801240']
[2940.0, 2940.0]
[17.0, 17.0]
[106, 106]
p02970
u062314674
2,000
1,048,576
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 ...
['import math\nN = int(input())\nD = int(input())\ni = N / (2*D + 1)\nif 1 <= N <= 20 and 1 <= D <= 20:\n if i > 0:\n i = math.ceil(i)\n print(i)\n\n', 'import math\nN, D = map(int, input().split())\ni = N / (2*D + 1)\nif 1 <= N <= 20 and 1 <= D <= 20:\n if i > 0:\n i = math.ceil(i)\n ...
['Runtime Error', 'Accepted']
['s151157045', 's197837605']
[2940.0, 2940.0]
[17.0, 17.0]
[155, 152]
p02970
u064563749
2,000
1,048,576
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 ...
['N,D=map(int,input().split())\npeople=N/(2D+1)\nif people%2==O:\n print(int(people))\nelse:\n print(int(people)+1)\n', 'N,D=map(int,input().split())\npeople=N/(2*D+1)\nif N % (2*D+1) == 0:\n print(int(people))\nelse:\n print(int(people)+1)\n']
['Runtime Error', 'Accepted']
['s937794156', 's386360148']
[2940.0, 2940.0]
[18.0, 17.0]
[115, 121]
p02970
u068586753
2,000
1,048,576
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 ...
['N, D = [int (x) for x in input().split()]\nX = N / (2 * D + 1)\nif (X.is_integer()) print(X)\nelse print(X + 1)', 'N, D = (int(x) for x in input().split())\nX = N / (2 * D + 1)\n#print(X)\nif (X.is_integer()):\n print(int(X))\nelse:\n print(int(X) + 1)\n']
['Runtime Error', 'Accepted']
['s650812816', 's483971795']
[2940.0, 2940.0]
[17.0, 17.0]
[108, 134]
p02970
u068944955
2,000
1,048,576
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 ...
['import math\n\nN, D = input().split()\n\nn = int(N)\nd = int(D)\n\ncheck = 2 * d + 1\n\nprint(math.ceil(d/check))\n', 'import math\n\nN, D = input().split()\n\nn = int(N)\nd = int(D)\n\ncheck = 2 * d + 1\n\nprint(math.ceil(n/check))\n']
['Wrong Answer', 'Accepted']
['s141650541', 's969638365']
[3064.0, 2940.0]
[17.0, 17.0]
[105, 105]
p02970
u075303794
2,000
1,048,576
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 ...
['n,d = map(int, input().split())\nans = 0\nif n % (2d+1) == 0:\n ans = n//(2d+1)\nelse:\n ans = n//(2d+1) + 1', 'n,d = map(int, input().split())\nans = 0\nif n % (2d+1) == 0:\n ans = n//(2d+1)\nelse:\n ans = n//(2d+1) + 1\nprint(ans)', 'n,d = map(int, input().split())\nans = 0\nif n % (2 * d + 1) == 0:\n ans = n ...
['Runtime Error', 'Runtime Error', 'Accepted']
['s194569203', 's421908766', 's478901440']
[2940.0, 2940.0, 2940.0]
[17.0, 17.0, 17.0]
[105, 116, 135]
p02970
u081688405
2,000
1,048,576
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 ...
['n, d = map(int, input())\nprint(n//(2*d+1)+(1 if n%(2*d+1)!=0 else 0))', 'n, d = map(int, input().split())\nprint(n//(2*d+1)+(1 if n%(2*d+1)!=0 else 0))\n']
['Runtime Error', 'Accepted']
['s203303068', 's014651250']
[2940.0, 2940.0]
[18.0, 17.0]
[69, 78]
p02970
u084320347
2,000
1,048,576
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 ...
['n,d = list(map(int,input().split()))\nprint(n//(d+d+1))', 'import math\nn,d = list(map(int,input().split()))\nprint(math.ceil(n//(d+d+1)))\n', 'n,d = list(map(int,input().split()))\n\nans = 0\ncnt = 0\nwhile ans < n:\n ans += d*2+1\n cnt += 1\n\nprint(cnt)']
['Wrong Answer', 'Wrong Answer', 'Accepted']
['s265104072', 's843435979', 's336439490']
[2940.0, 2940.0, 2940.0]
[17.0, 17.0, 20.0]
[55, 79, 111]
p02970
u084498522
2,000
1,048,576
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 ...
['N, D = map(int, input().split())\n \nresult = -(-N // (2D+1))\n \nprint(result)', 'N, D = map(int, input().split())\n\nresult = N // (2D+1) + 1\n\nprint(result)', 'N, D = map(int, input().split())\n \nresult = -(-N // (2*D+1))\n \nprint(result)']
['Runtime Error', 'Runtime Error', 'Accepted']
['s482638838', 's961668213', 's778929728']
[2940.0, 2940.0, 2940.0]
[17.0, 17.0, 17.0]
[75, 73, 76]
p02970
u086503932
2,000
1,048,576
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 ...
['N,D=map(int,input().split())\nprint((N+2*D)%(2*D+1))\n', 'N,D=map(int,input().split())\nprint((N+2*D)//(2*D+1))\n']
['Wrong Answer', 'Accepted']
['s798114028', 's163603005']
[2940.0, 2940.0]
[17.0, 17.0]
[52, 53]
p02970
u096514906
2,000
1,048,576
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 ...
['import numpy as np\nl = input().split()\nn = int(l[0])\nd = int(l[1])\na = np.ceil(n / (2 * d +1))\nprint(a)\n', 'import numpy as np\nl = input().split()\nn = int(l[0])\nd = int(l[1])\na = np.ceil(n / (2 * d +1))\nprint(int(a))']
['Wrong Answer', 'Accepted']
['s470211537', 's831481737']
[21640.0, 21532.0]
[319.0, 331.0]
[104, 108]
p02970
u102242691
2,000
1,048,576
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 ...
['\nn,d = map(int,input().split())\nans = 0\ndis = 2*d +1\n\nif (n % d) == 0:\n\tans = int(n / dis)\nelse:\n\tans = int()(n // dis)+1)\n\nprint(ans)\n', '\nn,d = map(int,input().split())\n\nif n % (2*d+1) == 0:\n print(int(n/(2*d+1)))\nelse:\n print(int(n/(2*d+1))+1)\n\n\n']
['Runtime Error', 'Accepted']
['s533799489', 's478354537']
[2940.0, 2940.0]
[17.0, 18.0]
[135, 116]
p02970
u103902792
2,000
1,048,576
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 ...
['import math\nn,d = map(int,input().split())\nprint(math.ceil(n / (2d+1)) )', 'import math\nn,d = map(int,input().split())\nprint(math.ceil(n / (2*d+1)) )\n\n']
['Runtime Error', 'Accepted']
['s107119247', 's021375942']
[2940.0, 2940.0]
[18.0, 17.0]
[72, 75]
p02970
u104675693
2,000
1,048,576
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 ...
['n, d = map(int, input().split())\n\nstart, end = 1, n\ncount = 0\nif d >= n:\n count += 1\nelse:\n while start < end:\n start = start + (d*2) + 1\n end = end - (d*2) - 1\n count += 2\n if (start - end) > 0:\n count -= 1\n else:\n count += 1\nprint(count)', 'import math\nN, D = map(int, input().spli...
['Wrong Answer', 'Accepted']
['s658051828', 's317690162']
[3060.0, 2940.0]
[17.0, 17.0]
[258, 84]
p02970
u104930676
2,000
1,048,576
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 ...
['n, d = map(int, input().split())\n\nc = 0\n\nfor i in range(1, n, 2*d+1):\n c += 1\n \nprint(c)', 'n, d = map(int, input().split())\n\nc = 0\n\nfor i in range(1, n+1, 2*d+1):\n c += 1\n \nprint(c)']
['Wrong Answer', 'Accepted']
['s751331163', 's185375913']
[2940.0, 2940.0]
[18.0, 17.0]
[90, 92]
p02970
u105302073
2,000
1,048,576
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 ...
['import math\nN, D = [int(i) for i in input().split()]\nprint(math.ceil(N / ((2 * D) + 1)', 'import math\n\nN, D = [int(i) for i in input().split()]\nprint(math.ceil(N / ((2 * D) + 1)))\n']
['Runtime Error', 'Accepted']
['s531499787', 's085427213']
[2940.0, 3188.0]
[17.0, 19.0]
[86, 90]
p02970
u105456682
2,000
1,048,576
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 ...
['n, d = list(map(int, input().split()))\nprint(n / (2 * d + 1))', 'import math\nn, d = list(map(int, input().split()))\nprint(math.ceil(n / (2 * d + 1)))']
['Wrong Answer', 'Accepted']
['s078126277', 's271260970']
[3064.0, 2940.0]
[17.0, 19.0]
[61, 84]
p02970
u106103668
2,000
1,048,576
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 ...
['n,d = map(int, input().split())\nprint int((n+(d*2+1)-1)/(d*2+1))', 'n,d = map(int, input().split())\nprint(int((n+(d*2+1)-1)/(d*2+1)))']
['Runtime Error', 'Accepted']
['s507940411', 's916478842']
[2940.0, 2940.0]
[18.0, 17.0]
[64, 65]
p02970
u107406081
2,000
1,048,576
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 ...
['N,D=map(int,input().split())\n\nz=2*D+1\nwhile N>z:\n z=z+1\n\nprint(z)', 'N,D=map(int,input().split())\n\nn=1\nwhile N>2*n+1:\n n=n+1\n\nprint(n)', 'N,D=map(int,input().split())\n\nz=1\nwhile N>(2*D+1)*z:\n z=z+1\n \nprint(z)\n']
['Wrong Answer', 'Wrong Answer', 'Accepted']
['s245970393', 's817215923', 's813157758']
[2940.0, 2940.0, 3064.0]
[17.0, 17.0, 17.0]
[66, 66, 73]
p02970
u112567325
2,000
1,048,576
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 ...
['n=int(input())\nd=int(input())\n\nd1=d*2+1\nprint((n+d1-1)/d1)', 'n,d=list(map(int, input().split()))\n \nd1=d*2+1\nprint(int((n+d1-1)/d1))']
['Runtime Error', 'Accepted']
['s011810676', 's150013351']
[2940.0, 2940.0]
[17.0, 17.0]
[58, 70]
p02970
u113255362
2,000
1,048,576
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 ...
['N,D=map(int,input().split())\nres = 0\nfor i in range(D,N,2*D):\n res += 1\n if i+D < N and i + 2*D > N:\n res+=1\nprint(res)', 'N,D=map(int,input().split())\na = 0\nblock = 2*D+1\na = N /block\nb = int(a)\nif a-b > 0:\n a = a+1\nprint(int(a))']
['Wrong Answer', 'Accepted']
['s264231269', 's443362765']
[9060.0, 9164.0]
[26.0, 27.0]
[124, 108]
p02970
u116233709
2,000
1,048,576
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 ...
['n,d=map(int,inout().split())\na=2*d+1\nprint((n//a)+1)', 'n,d=map(int,input().split())\na=(2*d)+1\nif n%a==0:\n print(int(n/a))\nelse:\n print((n//a)+1)\n\n']
['Runtime Error', 'Accepted']
['s792119952', 's399391185']
[2940.0, 2940.0]
[17.0, 17.0]
[52, 93]
p02970
u116763463
2,000
1,048,576
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 ...
['import math\nn, d = map(int, input().split())\nx = 2*n + 1\nprint(int(math.ceil(n/x))', 'import math\nn, d = map(int, input().split())\nx = 2*d + 1\nprint(int(math.ceil(n/x)))']
['Runtime Error', 'Accepted']
['s121075773', 's931100586']
[2940.0, 2940.0]
[17.0, 17.0]
[82, 83]
p02970
u122195031
2,000
1,048,576
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 ...
['a,b = list(map(int,input().split()))\nans = -(a // (b*2 + 1))\nprint(ans)', 'a,b = map(int,input().split())\nans = a // (b*2 + 1)\nif a % (b*2 + 1) == 0:\n print(round(ans))\nelse:\n print(round(ans + 1))']
['Wrong Answer', 'Accepted']
['s478190361', 's520629577']
[2940.0, 2940.0]
[17.0, 17.0]
[71, 124]
p02970
u123745130
2,000
1,048,576
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 ...
[' a,b=map(int,input().split()) \nfor i in range(21): \n\tl=(b*2+1)*i \n\t\tif l>=a: \n\t\t\tprint(i) \n\t\t\tbreak ', 'a,b=map(int,input().split()) \nfor i in range(21): \n\tl=(b*2+1)*i \n\t\tif l>=a: \n\t\t\tprint(i) \n\t\t\tbreak \n', 'a,b=map(int,input().split())\nfor i in range(21):\n\tl=(b+1)*i\n\tif l>=a:\n\t\tp...
['Runtime Error', 'Runtime Error', 'Wrong Answer', 'Runtime Error', 'Accepted']
['s274000153', 's777451320', 's842613993', 's848627598', 's577768350']
[2940.0, 2940.0, 2940.0, 2940.0, 2940.0]
[17.0, 17.0, 17.0, 17.0, 19.0]
[100, 100, 80, 98, 95]
p02970
u124063060
2,000
1,048,576
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 ...
['n, d = int(input().split())\n\nif n/(2*d+1) == 0:\n print(n/(2*d+1))\nelse:\n print(n//(2*d+1)+1)', 'n, d = map(int, input().split())\nif n//(2*d+1) % 0:\n print(n/(2*d+1))\nelse:\n print(n//(2*d+1)+1)', 'n, d = map(int, input().split())\nif n%(2*d+1) == 0:\n print(n//(2*d+1))\nelse:\n print(n//(2*d...
['Runtime Error', 'Runtime Error', 'Accepted']
['s014134785', 's900803765', 's244392598']
[2940.0, 2940.0, 2940.0]
[17.0, 18.0, 17.0]
[98, 102, 103]
p02970
u124843595
2,000
1,048,576
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 ...
['#!/usr/bin/env python3\n\nn = int(input())\nprint(int((n - 1) / 2) if n % 2 == 1 else int(n / 2) - 1)\n', '#!/usr/bin/env python3\n\n\nimport math\nn, d = [int(x) for x in input().split()]\nprint(math.ceil(n / (d * 2 + 1)))\n']
['Runtime Error', 'Accepted']
['s267140007', 's918852035']
[3316.0, 2940.0]
[20.0, 17.0]
[99, 163]
p02970
u127165646
2,000
1,048,576
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 ...
['n,d = input().split()\nn = int(n)\nd = int(d)\n\nif n%(d*2+1)==0:\n print(int(n/(d*2+1)))\nelse:\n print(int(n/(d*2+1)))', 'n,d = input().split()\nn = int(n)\nd = int(d)\n\nif n%(d*2+1)==0:\n print(int(n/(d*2+1)))\nelse:\n print(int(n/(d*2+1))+1)']
['Wrong Answer', 'Accepted']
['s099163865', 's713509564']
[2940.0, 2940.0]
[17.0, 17.0]
[119, 121]
p02970
u131406572
2,000
1,048,576
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 ...
['n,d=map(int,input().split())\nw=2*d+1\na=n/d\nif a%1==0:\n print(n//d)\nelse:\n print(n//d+1)\n', 'N,D=map(int,input.split())\na=N/(2*D+1)\nif a%1==0:\n print(a)\nelse:\n print(int(a)+1)', 'n,d=map(int,input().split())\nw=2*d+1\nif n%w==0:\n print(n//w)\nelse:\n print(n//w+1)']
['Wrong Answer', 'Runtime Error', 'Accepted']
['s291444172', 's362685417', 's506020283']
[2940.0, 2940.0, 2940.0]
[17.0, 17.0, 17.0]
[90, 84, 83]
p02970
u132687480
2,000
1,048,576
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 ...
['n,d = list(map(int, input().split()))\nprint((n / (2*d+1)) + 1)\n', 'import math\nn,d = list(map(int, input().split()))\nprint(math.ceil(n / (2*d+1)))']
['Wrong Answer', 'Accepted']
['s918703826', 's777878830']
[2940.0, 2940.0]
[17.0, 19.0]
[63, 79]
p02970
u139614630
2,000
1,048,576
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 ...
["#!/usr/bin/env python3\n\ndef solve(N, d):\n total = 0\n for i1 in range(len(d)):\n for i2 in range(i1+1, len(d)):\n total += d[i1] * d[i2]\n return total\n\n\nif __name__ == '__main__':\n N = int(input())\n d = map(int, input().split())\n\n ans = solve(N, list(d))\n\n print(ans...
['Runtime Error', 'Accepted']
['s507304719', 's530437953']
[2940.0, 2940.0]
[18.0, 17.0]
[304, 209]
p02970
u151503168
2,000
1,048,576
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 ...
['import math\n\nN, D = map(float,input().split())\nd = 2 * D + 1\n\nn = math.ceil(N / D)\nprint(n)', 'import math\n\nN, D = map(float,input().split())\nd = 2 * D + 1\n\nn = math.ceil(N / d)\nprint(n)']
['Wrong Answer', 'Accepted']
['s179254267', 's657463919']
[2940.0, 3188.0]
[17.0, 18.0]
[91, 91]
p02970
u158569318
2,000
1,048,576
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 ...
['N = int(input())\nD = int(input())\n\nif (N%(2*D-1)==0):\n print(N//(2*D-1))\nelse:\n print(N//(2*D-1) + 1)', 'N = int(input())\nD = int(input())\n\nif (N%(2*D-1)==0):\n print(N//(2*D-1))\nelse:\n print(N//(2*D-1) + 1)', 'N, D = tuple([int(i) for i in input().split(" ")])\n\nif (N%(2*D+1)==0):\n print(N//(2*D+1)...
['Runtime Error', 'Runtime Error', 'Accepted']
['s053234809', 's864707848', 's589709480']
[2940.0, 2940.0, 2940.0]
[17.0, 17.0, 17.0]
[103, 103, 120]
p02970
u167908302
2,000
1,048,576
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 ...
['#coding:utf-8\nn, d = map(int, input().split())\n\nflag = [0] * n\npeople = 0\n\n\nfor i in range(0,2*d):\n flag[i] = 1\n\nif sum(flag) != n:\n people += 1\n\nfor i in range(n-2*d-1, n):\n flag[i] = 1\n\nif sum(flag) != n:\n people += 1\n\n#print(flag)\n\nfor i in range(2*d, n-2*d):\n if flag[i] == 0:\...
['Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted']
['s205645219', 's417432843', 's717609737', 's128524828']
[3064.0, 3064.0, 3060.0, 2940.0]
[18.0, 17.0, 18.0, 17.0]
[527, 492, 426, 160]
p02970
u168416324
2,000
1,048,576
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 ...
['n,d=map(int,input().split())\nans=n//(d*2+1)\nif n%(d*2+1)==0:\n ans+1\nprint(ans)', 'n,d=map(int,input().split())\nans=n//(d*2+1)\nif n%(d*2+1)!=0:\n ans+=1\nprint(ans)\n']
['Wrong Answer', 'Accepted']
['s220403048', 's092067329']
[9156.0, 9056.0]
[25.0, 28.0]
[79, 81]
p02970
u168744617
2,000
1,048,576
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 ...
['import math\nN,D = map(int,input().split)\nprint(N/(D*2+1))', 'import math\nN,D = map(int,input().split())\nprint(math.ceil(N/(D*2+1)))']
['Runtime Error', 'Accepted']
['s767406094', 's827200687']
[2940.0, 2940.0]
[18.0, 17.0]
[57, 70]
p02970
u170765582
2,000
1,048,576
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 ...
['a,b=map(int,input())\nprint(0--a//b)', "a,b=map(int,input().split(' '))\nprint(-(-a//(1+2*b)))"]
['Runtime Error', 'Accepted']
['s880457064', 's582087461']
[3064.0, 2940.0]
[17.0, 17.0]
[35, 53]
p02970
u172337086
2,000
1,048,576
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 ...
['n, d = input().split()\nn=int(n)\nd=int(d)\nsum=0\ncount=0\nwhile 1:\n sum=sum+2*d+1\n count+=1\n break\nprint(count)', 'n, d = input().split()\nn=int(n)\nd=int(d)\nsum=0\ncount=0\nwhile 1:\n sum=sum+2*d+1\n count+=1\n if sum>=n:\n break\nprint(count)']
['Runtime Error', 'Accepted']
['s239374482', 's299438463']
[3064.0, 3060.0]
[18.0, 17.0]
[113, 126]
p02970
u172569352
2,000
1,048,576
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 ...
['import math\ndef q45(n, d):\n a = math.ceil(n/(2*d+1))\n return a\n\nN = int(input())\nD = int(input())\nprint(q45(N, D))', 'import math\ndef q45(n, d):\n a = math.ceil(n/(2*d+1))\n return a\n\nN = int(input())\nD = int(input())\nprint(q45(N, D))', 'import math\ndef q45(n, d):\n a = math.ceil(n/(2*d+1)...
['Runtime Error', 'Runtime Error', 'Accepted']
['s036439735', 's710500639', 's842024900']
[2940.0, 2940.0, 2940.0]
[17.0, 17.0, 18.0]
[120, 120, 126]
p02970
u175590965
2,000
1,048,576
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 ...
['n,d = map(int,input().split())\nc = d*2+1\nif n%c ==0:\n print((int(n//c)))\nelse:\n print(int(n//d)+1)', 'a.b = map(int.input().split())\nc = a/2/b\nd = round(c)\nprint(d)', 'a.b = map(int.input().split())\nif a/2%b === 0 :\n print (a/2/b)\nelse :\nprint(a/2//b+1)\n', 'n,d = map(int,input().split())\nc = d*...
['Wrong Answer', 'Runtime Error', 'Runtime Error', 'Wrong Answer', 'Runtime Error', 'Accepted']
['s141056771', 's239016370', 's536533945', 's553602322', 's941821294', 's119776449']
[2940.0, 2940.0, 2940.0, 2940.0, 2940.0, 2940.0]
[17.0, 17.0, 17.0, 17.0, 18.0, 17.0]
[104, 62, 89, 102, 63, 102]
p02970
u175746978
2,000
1,048,576
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 ...
['n, d = mpa(int, input().split())\nk = d * 2 + 1\nif n % k == 0:\n print(n//k)\nelse:\n print(n//k + 1)', 'n, d = map(int, input().split())\nk = d * 2 + 1\nif n % k == 0:\n print(n//k)\nelse:\n print(n//k + 1)']
['Runtime Error', 'Accepted']
['s258703084', 's564838489']
[2940.0, 2940.0]
[17.0, 17.0]
[103, 103]
p02970
u177067177
2,000
1,048,576
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 ...
['n, d = map(int, input().split())\nmin = (n+((2*d+1)-n%(2*d+1)))/(2*d+1)\nprint(min)\n', 'n, d = map(int, input().split())\nmin = (n+n%(2*d))/2*d\nprint(min)\n', '\nimport math\nn, d = map(int, input().split())\na = math.seil(n/(2*d+1))\nprint(a)\n', 'import math\nn, d = map(int, input().split())\na = int(math.seil(n/...
['Wrong Answer', 'Wrong Answer', 'Runtime Error', 'Runtime Error', 'Accepted']
['s290446462', 's327270252', 's336489231', 's550234246', 's641447845']
[2940.0, 2940.0, 2940.0, 2940.0, 2940.0]
[17.0, 17.0, 17.0, 17.0, 17.0]
[82, 66, 80, 84, 67]
p02970
u178192749
2,000
1,048,576
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 ...
['import math\nn,d = map(int,input().split())\nprint(math.ceil(n//(d*2+1)))', 'import math\nn,d = map(int,input().split())\nprint(math.ceil(n/(d*2+1)))']
['Wrong Answer', 'Accepted']
['s642729459', 's164832565']
[2940.0, 2940.0]
[17.0, 17.0]
[71, 70]
p02970
u181195295
2,000
1,048,576
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 ...
['N , D = map(int, input().split())\n\nd = 2*D + 1\nnum = int(N / d)\n\nif (N % d == 0):\n num += 1\n \nprint(num)', 'N , D = map(int, input().split())\n \nd = 2*D + 1\nnum = int(N // d)\n \nif (N % d == 0):\n num += 1\n \nprint(num)', 'N , D = map(int, input().split())\n \nd = 2*D + 1\nnum = int(N // d)\n \nif (N ...
['Wrong Answer', 'Wrong Answer', 'Accepted']
['s203480719', 's507256179', 's476475257']
[2940.0, 2940.0, 2940.0]
[18.0, 18.0, 18.0]
[106, 109, 109]
p02970
u184902932
2,000
1,048,576
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 ...
['N, D = map(int, input().split())\nprint(math.ceil(N/(2*D+1)))\n', 'import math\nN, D = map(int, input().split())\nprint(math.ceil(N/(2*D+1)))']
['Runtime Error', 'Accepted']
['s257160870', 's595354623']
[2940.0, 2940.0]
[17.0, 17.0]
[61, 72]
p02970
u185464141
2,000
1,048,576
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 ...
['# coding: utf-8\n# submission # - User: herp_sy\n\n\nimport math\nimport statistics\n\nn,d = map(int, input().split())\nprint((n + d * 2) // (d * 2 + 1)', '# coding: utf-8\n# submission # - User: herp_sy\n\n\nimport math\nimport statistics\n\nn,d = map(int, input().split())\nprint((n + d * 2) // (d * 2 + 1))\n']
['Runtime Error', 'Accepted']
['s215404737', 's259119410']
[2940.0, 5340.0]
[17.0, 40.0]
[174, 176]
p02970
u188817425
2,000
1,048,576
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 ...
['import numpy as np\nn, d = list(map(int, input().split()))\nprint(np.ceil(n/d*2+1))', 'import numpy as np\nn, d = list(map(int, input().split()))\nprint(int(np.ceil(n/(d*2+1))))']
['Wrong Answer', 'Accepted']
['s616872162', 's782717162']
[12388.0, 12392.0]
[149.0, 150.0]
[81, 88]
p02970
u192908410
2,000
1,048,576
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 ...
['a,b=map(int,input().split())\nr=a//(2*b+1)\nr+=1 if a%(2*b+1)>0\nprint(r)', 'a,b=map(int,input().split())\nr=a//(2*b+1)\nr+=1 if a%(2*b+1)>0 else 0\nprint(r)']
['Runtime Error', 'Accepted']
['s626497448', 's950768324']
[2940.0, 2940.0]
[17.0, 18.0]
[70, 77]
p02970
u194894739
2,000
1,048,576
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 ...
['N = int(input())\nD = int(input())\nif N % (2*D+1) == 0:\n print(N // (2*D+1))\nelse:\n print(N// (2*D+1) + 1)', 'N, D = map(int, input().split())\n\nif N % (2*D+1) == 0:\n print(N // (2*D+1))\nelse:\n print(N// (2*D+1) + 1)']
['Runtime Error', 'Accepted']
['s105263502', 's314625024']
[2940.0, 2940.0]
[17.0, 20.0]
[111, 111]
p02970
u222643751
2,000
1,048,576
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 ...
['import math\nN, D = map(int, input().split())\nmath.ceil(N/(D*2+1))', 'import math\nN, D = map(int, input().split())\nprint(math.ceil(N/(D*2+1)))']
['Wrong Answer', 'Accepted']
['s330173863', 's488161468']
[2940.0, 2940.0]
[17.0, 17.0]
[65, 72]
p02970
u222801992
2,000
1,048,576
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 ...
['import math\nn,d=map(int,input().split())\nprint(math.ceil(n/2*d+1))', 'import math\nn,d=map(int,input().split())\nprint(math.ceil(n/(2*d+1)))']
['Wrong Answer', 'Accepted']
['s280767978', 's513357203']
[2940.0, 2940.0]
[18.0, 18.0]
[66, 68]
p02970
u222859507
2,000
1,048,576
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 ...
['n, d = map(int, input())\nprint(-(-n // (1 + d * 2)))\n', 'n, d = map(int, input().split())\nprint(-(-n // (1 + d * 2)))']
['Runtime Error', 'Accepted']
['s626799708', 's637928239']
[2940.0, 2940.0]
[20.0, 18.0]
[53, 60]
p02970
u223555291
2,000
1,048,576
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 ...
['a,b=map(int,input().split())\nb=b*2+1\nc=0\nc=a/b\nif c>b:\n print(c+1)\nelse:\n print(c)', 'a,b=map(int,input().split())\nb=b*2+1\nc=0\nc=a/b\nif c>1:\n print(c+1)\nelse:\n print(c)', 'a,b=map(int,input().split())\nb=b*2+1\nc=1\nwhile 1:\n if a-b>0:\n c+=1\n else:\n break\n \nprint(c) ', 'a,b=map(int...
['Wrong Answer', 'Wrong Answer', 'Time Limit Exceeded', 'Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Accepted']
['s171220020', 's180254357', 's236862752', 's696748207', 's698121387', 's976804081', 's336725470']
[2940.0, 2940.0, 2940.0, 2940.0, 2940.0, 2940.0, 2940.0]
[17.0, 17.0, 2104.0, 18.0, 17.0, 2104.0, 17.0]
[84, 84, 104, 91, 81, 104, 101]
p02970
u226912938
2,000
1,048,576
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 ...
['N, D = map(int, input().split())\nX = D * 2 + 1\nprint(N//X)', 'N, D = map(int, input().split())\nX = D * 2 + 1\nprint(-(-N//X))']
['Wrong Answer', 'Accepted']
['s726779524', 's475956774']
[2940.0, 2940.0]
[17.0, 18.0]
[58, 62]
p02970
u227412361
2,000
1,048,576
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 ...
['lst = int(input().split())\nprint((lst[0]+2*lst[1])//(2*lst[1]+1))', 'lst = list(map(int,input().split()))\nprint((lst[0]+2*lst[1])//(2*lst[1]+1))']
['Runtime Error', 'Accepted']
['s341000754', 's683344350']
[2940.0, 2940.0]
[17.0, 17.0]
[65, 75]
p02970
u231905444
2,000
1,048,576
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 ...
['n,d=map(int,input().split())\nprint(ceil(n/(2*d+1)))\n', 'from math import *\nn,d=map(int,input().split())\nprint(ceil(n/(2*d+1)))\n']
['Runtime Error', 'Accepted']
['s388897262', 's969972095']
[2940.0, 2940.0]
[18.0, 18.0]
[52, 71]
p02970
u235107623
2,000
1,048,576
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 ...
['n, d = input().split(" ")\nn = int(n)\nd = int(d)\nprint(n / (2*d+1) + int(n % (2*d+1) != 0))', 'string = input()\nn, d = string.split(" ")\nn = int(n)\nd = int(d)\nprint(n // (2*d+1) + int(n % (2*d+1) != 0))']
['Wrong Answer', 'Accepted']
['s481783046', 's961687789']
[2940.0, 2940.0]
[18.0, 17.0]
[90, 107]
p02970
u244087909
2,000
1,048,576
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 ...
['import math\nN,D = map(int, input().split())\nprint(math.ceil(N/(2*(1+D))))', 'import math\nN,D = map(int, input().split())\nprint(math.ceil(N/(2*D+1)))']
['Wrong Answer', 'Accepted']
['s782553356', 's465733139']
[2940.0, 2940.0]
[17.0, 17.0]
[73, 71]
p02970
u244836567
2,000
1,048,576
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 ...
['a,b=input().split()\na=int(a)\nb=int(b)\nif a%(b*2+1)==0:\n print(a//(b*2+1))\nelse:\n print(a//(b*2))', 'a,b=input().split()\na=int(a)\nb=int(b)\nprint(a//(b*2+1))', 'a,b=input().split()\na=int(a)\nb=int(b)\nif a%(b*2+1)==0:\n print(a//(b*2+1))\nelse:\n print(a//(b*2+1)+1)']
['Wrong Answer', 'Wrong Answer', 'Accepted']
['s297165610', 's650566426', 's588831321']
[9052.0, 9072.0, 9080.0]
[24.0, 30.0, 29.0]
[98, 55, 102]
p02970
u247211039
2,000
1,048,576
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 ...
['import math\nN, D=map(int, input().split())\nprint(math.ceil(N/(2*D+1))', 'import math\nN, D =map(int, input().split())\nprint(math.ceil(N/(2*D+1)))']
['Runtime Error', 'Accepted']
['s083409217', 's275018445']
[2940.0, 2940.0]
[18.0, 18.0]
[69, 71]
p02970
u251075661
2,000
1,048,576
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 ...
['n, d = list(map(int, input().split()))\n\nprint(n // d + 1)', 'n, d = list(map(int, input().split()))\n\nif n // (2*d + 1) == n / (2*d + 1):\n print(int(n / (2*d + 1)))\nelse:\n print(int(n // (2*d + 1) + 1))']
['Wrong Answer', 'Accepted']
['s053922905', 's992171063']
[2940.0, 2940.0]
[17.0, 17.0]
[57, 142]
p02970
u252828980
2,000
1,048,576
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 ...
['n,d = map(int,input()split())\nif n%(2*d+1) == 0:\n print(n%(2*d+1))\nelse:\n print(n%(2*d+1)+1)', 'n,d = map(int,input().split())\nif n%(2*d+1) == 0:\n print(n//(2*d+1))\nelse:\n print(n//(2*d+1)+1)']
['Runtime Error', 'Accepted']
['s340383206', 's509600321']
[2940.0, 2940.0]
[17.0, 17.0]
[94, 97]
p02970
u256833330
2,000
1,048,576
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 ...
['import math\nn,d =map(int,input().split())\nprint(math.ceil(n//(d*2+1)))\n', 'import math\nn,d =map(int,input().split())\nprint(math.ceil(n/(d*2+1)))\n']
['Wrong Answer', 'Accepted']
['s969094839', 's737363150']
[3064.0, 2940.0]
[17.0, 17.0]
[71, 70]
p02970
u260216890
2,000
1,048,576
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 ...
['import math\nn,d=map(int, input().split())\nprint(math.ceil(n/(2*d+1))+1)', 'import math\nn,d=map(int, input().split())\nprint(math.ceil(n/(2*d+1)))']
['Wrong Answer', 'Accepted']
['s974664148', 's894599973']
[2940.0, 2940.0]
[18.0, 17.0]
[71, 69]
p02970
u262869085
2,000
1,048,576
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 ...
['A,B = map(int,input().split())\nprint(A//(2*B+1))', 'A,B = map(int,input().split())\nprint((A+2*B)//(2*B+1))']
['Wrong Answer', 'Accepted']
['s222383018', 's088495705']
[2940.0, 2940.0]
[17.0, 17.0]
[48, 54]
p02970
u265118937
2,000
1,048,576
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 ...
['n, d = map(int, input().split())\nprint(math.ceil(n / (2*d +1)))', 'import math\nn, d = map(int, input().split())\nprint(math.ceil(n / (2*d +1)))']
['Runtime Error', 'Accepted']
['s533244238', 's005108884']
[9092.0, 9092.0]
[22.0, 25.0]
[63, 75]
p02970
u270467412
2,000
1,048,576
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 ...
['n, d = map(int, input().split())\n\ndd = 2*d + 1\n\nprint(n // dd)', 'n, d = map(int, input().split())\n\ndd = 2*d + 1\n\nprint((n+dd-1) // dd)\n']
['Wrong Answer', 'Accepted']
['s762014821', 's543237988']
[2940.0, 2940.0]
[18.0, 17.0]
[62, 70]
p02970
u276204978
2,000
1,048,576
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 ...
['N, D = map(int, input().split())\n\nprint(int(round(N / (D * 2 + 1))))', 'import math\n\nN, D = map(int, input().split())\n\nprint(int(math.ceil(N / (D * 2 + 1))))']
['Wrong Answer', 'Accepted']
['s957112915', 's535007776']
[2940.0, 2940.0]
[17.0, 17.0]
[68, 85]
p02970
u276686572
2,000
1,048,576
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 ...
['from math import ceil\n\na,b=map(int,input().split())\n\nprint(math.ceil(a//(2*b+1)))\n', 'a,b=map(int,input().split())\n\nans = a//(2*b+1)\n\nif a%(2*b+1) == 0: pass\nelse: ans += 1\nprint(ans)\n']
['Runtime Error', 'Accepted']
['s851032833', 's511418084']
[8968.0, 9156.0]
[38.0, 28.0]
[82, 98]
p02970
u288500098
2,000
1,048,576
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 ...
['N, D = map(int, input().split())\n\nr = N \ni = 0\n\n\nfor k in range(50):\n r = r - (2 * D + 1)\n print("r = ", r)\n if r < (2 * D + 1):\n i = i + 1\n break\n i = i + 1\n \nprint(i)', 'N, D = map(int, input().split())\n\nr = N \ni = 0\n\n\nfor k in range(50):\n r = r - (2 * D + 1)\n ...
['Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Accepted']
['s055225085', 's434706108', 's643598823', 's216256177']
[2940.0, 2940.0, 2940.0, 2940.0]
[18.0, 17.0, 19.0, 17.0]
[276, 277, 132, 230]
p02970
u291132512
2,000
1,048,576
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 ...
['a,b = map(int,input().split())\nif a%b == 0:\n print(int(a/b))\nelse:\n print(int(a//b+1))', 'a,b = map(int,input().split())\nif a%b == 0:\n print(a/b)\nelse:\n print(a//b+1)', 'a,b = map(int,input().split())\nif a%b == 0:\n print(a//b)\nelse:\n print(a//b+1)', 'a,b = map(int,input().split())\nif a ...
['Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Accepted']
['s144176634', 's921649866', 's945408565', 's016582054']
[2940.0, 2940.0, 2940.0, 2940.0]
[17.0, 17.0, 17.0, 17.0]
[92, 82, 83, 117]
p02970
u291628833
2,000
1,048,576
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 ...
['n,d= map(int,input().split(" "))\nif n%(1+2*d):\n print(n/(1+2*d))\nelse:\n print(int(n/(1+2*d))+1)', 'n,d= map(int,input().split(" "))\nif n%(1+2*d)==0:\n print(int(n/(1+2*d)))\nelse:\n print(int(n/(1+2*d))+1)']
['Wrong Answer', 'Accepted']
['s259273269', 's413810264']
[2940.0, 2940.0]
[17.0, 17.0]
[101, 109]
p02970
u302292660
2,000
1,048,576
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 ...
['t,d = map(int,input().split())\np_a = t//(2d+1)\np_b = t%(2d+1)\nif p_b == 0:\n print(p_a)\nelse:\n print(p_a + 1)\n \n', 't,d = map(int,input().split())\np_a = t//(2*d+1)\np_b = t%(2*d+1)\nif p_b == 0:\n print(p_a)\nelse:\n print(p_a + 1)\n \n']
['Runtime Error', 'Accepted']
['s435310101', 's624162742']
[2940.0, 2940.0]
[18.0, 17.0]
[114, 116]
p02970
u309120194
2,000
1,048,576
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 ...
['N, D = map(int, input().split())\n\n\n\n\n\n\n\n\n\nprint(-(-N//(2D+1)))', 'N, D = map(int, input().split())\n \n\n\n\n\n \n\n\n \n\nprint((N+2*D) // (2*D+1))']
['Runtime Error', 'Accepted']
['s026806867', 's335272888']
[9024.0, 9140.0]
[22.0, 30.0]
[326, 365]
p02970
u317018965
2,000
1,048,576
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 ...
['N, D = map(int, input())\nx = N//((2*D)+1)\nif(x*((2*D)+1)>= N):\n\tprint(N//((2*D)+1))\nelse:\n\tprint((N//((2*D)+1)+1))', 'N, D = map(int, input())\nif(N%2*D+1==0):\n\tprint(N//((2*D)+1))\nelse:\n\tprint(N//((2*D)+1)+1)', 'N, D = map(int, input())\nx = N//((2*D)+1)\nif(x*((2*D)+1)>= N):\n\tprint(N//((2*D)+1))\nelse...
['Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted']
['s527376107', 's726251741', 's807411158', 's163925567']
[2940.0, 2940.0, 3060.0, 3060.0]
[17.0, 17.0, 17.0, 21.0]
[114, 90, 112, 122]
p02970
u319002530
2,000
1,048,576
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 ...
['n, d= map(int, input().split())\n\nnum = 1\nwhile True:\n if (num*d+1)*2 >= n:\n print(num)\n break\n else:\n num +=1\n ', 'n, d= map(int, input().split())\n\nnum = 1\nwhile True:\n if (2*d+1)*num >= n:\n print(num)\n break\n else:\n num +=1\n ']
['Wrong Answer', 'Accepted']
['s609831873', 's214329682']
[2940.0, 2940.0]
[18.0, 18.0]
[145, 145]
p02970
u319589470
2,000
1,048,576
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 ...
['import math\nn,d = map(int,input().split())\nprint(math.ceil(n/2*d+1))', 'import math\nn,d = map(int,input().split())\nprint(math.ceil(n/(2*d+1)))']
['Wrong Answer', 'Accepted']
['s914621553', 's690764248']
[2940.0, 2940.0]
[18.0, 18.0]
[68, 70]
p02970
u327248573
2,000
1,048,576
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 ...
['import math\nn, d = map(int, input().split())\nprint(math.ceil)(n/(2*d+1))', 'import math\nn, d = map(int, input().split())\nprint(math.ceil(n/(2*d+1)))\n']
['Runtime Error', 'Accepted']
['s057699956', 's722471957']
[2940.0, 2940.0]
[18.0, 17.0]
[72, 73]
p02970
u329058683
2,000
1,048,576
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 ...
['N,D=map(int(),input().split())\nprint(N//(2D+1))', 'import math\nN,D=map(int,input().split())\nprint(math.ceil(N/(2*D+1)))\n']
['Runtime Error', 'Accepted']
['s519029228', 's773966258']
[2940.0, 2940.0]
[17.0, 17.0]
[47, 69]
p02970
u329565519
2,000
1,048,576
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 ...
['N, D = map(int, input().split())\n\nd, m = divmod(N, 2 * D + 1)\nprint(d, m)\nif m != 0:\n d += 1\nprint(d)', 'N, D = map(int, input().split())\n\nd, m = divmod(N, 2 * D + 1)\nif m != 0:\n d += 1\nprint(d)']
['Wrong Answer', 'Accepted']
['s072509384', 's508234499']
[2940.0, 2940.0]
[17.0, 18.0]
[104, 92]
p02970
u331997680
2,000
1,048,576
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 ...
['N,D = map(input().split())\nprint(N//(2*D+1))', 'N,D = map(int, input().split())\nprint(N//(2*D+1))', 'N,D = map(int, input().split())\nprint(N//(2*D+1) if N%(2*D+1)==0 else N//(2*D+1)+1)']
['Runtime Error', 'Wrong Answer', 'Accepted']
['s617845881', 's861290208', 's397391555']
[2940.0, 2940.0, 3064.0]
[17.0, 17.0, 17.0]
[44, 49, 83]