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
p02994
u151015483
2,000
1,048,576
You have N apples, called Apple 1, Apple 2, Apple 3, ..., Apple N. The _flavor_ of Apple i is L+i-1, which can be negative. You can make an apple pie using one or more of the apples. The flavor of the apple pie will be the sum of the flavors of the apples used. You planned to make an apple pie using all of the apples...
['N,L = map(int,input().split())\n\na = 10**6\nb = 0\nans = 0\nfor i in range(1,N+1):\n if abs(L+i-1) < mina:\n mina = abs(L+i-1)\n minb = i\n \nfor i in range(1,N+1):\n if i != minb:\n ans += (L+i-1)\n\nprint(ans)\n\n\n', 'N,L = map(int,input().split())\n\na = 10**6\nb = 0\nans = 0\n\...
['Runtime Error', 'Runtime Error', 'Accepted']
['s238701321', 's858596262', 's555404925']
[3060.0, 3060.0, 3060.0]
[17.0, 17.0, 17.0]
[235, 249, 215]
p02994
u159144188
2,000
1,048,576
You have N apples, called Apple 1, Apple 2, Apple 3, ..., Apple N. The _flavor_ of Apple i is L+i-1, which can be negative. You can make an apple pie using one or more of the apples. The flavor of the apple pie will be the sum of the flavors of the apples used. You planned to make an apple pie using all of the apples...
['N, L = map(int, input().split())\nA = []\nfor i in range(N):\n A.append(L+i)\ni = 0\nfor k in A:\n if i == 0:\n x = 0\n else:\n x, y = abs(i), -abs(i)\n i += 1\n for \n ', 'N, L = map(int, input().split())\nA = []\nfor i in range(N):\n A.append(L+i)\ni = 0\nans = False\nwhile ans == False:\n x, y = ab...
['Runtime Error', 'Accepted']
['s441402929', 's775128079']
[8948.0, 9092.0]
[25.0, 29.0]
[169, 246]
p02994
u161211576
2,000
1,048,576
You have N apples, called Apple 1, Apple 2, Apple 3, ..., Apple N. The _flavor_ of Apple i is L+i-1, which can be negative. You can make an apple pie using one or more of the apples. The flavor of the apple pie will be the sum of the flavors of the apples used. You planned to make an apple pie using all of the apples...
['# -*- coding: utf-8 -*-\nN, L = map(int,input().split())\ns = []\neat = 9999\n\nfor i in range(1,N+1):\n value = i + L - 1\n s.append(value)\n if abs(eat) > abs(value):\n eat = value\n\nprint(s)\nprint(eat)\nprint(sum(s))\nprint(sum(s) - eat)\n', '# -*- coding: utf-8 -*-\nN, L = map(int,input().split(...
['Wrong Answer', 'Accepted']
['s979863537', 's528249044']
[3060.0, 2940.0]
[17.0, 17.0]
[245, 212]
p02994
u163874353
2,000
1,048,576
You have N apples, called Apple 1, Apple 2, Apple 3, ..., Apple N. The _flavor_ of Apple i is L+i-1, which can be negative. You can make an apple pie using one or more of the apples. The flavor of the apple pie will be the sum of the flavors of the apples used. You planned to make an apple pie using all of the apples...
['n, l = map(int, input().split())\nans = 10 ** 6\nfor i in range(1, n + 1):\n t = l + i - 1\n if ans > abs(t):\n ans, t = abs(t), t\nprint(n * l + n * (n - 1) // 2 - t)', 'n, l = map(int, input().split())\nans = 10 ** 6\nk = 0\nfor i in range(1, n + 1):\n t = l + i - 1\n if ans > abs(t):\n an...
['Wrong Answer', 'Accepted']
['s340622799', 's016747733']
[2940.0, 3060.0]
[17.0, 17.0]
[174, 180]
p02994
u167507723
2,000
1,048,576
You have N apples, called Apple 1, Apple 2, Apple 3, ..., Apple N. The _flavor_ of Apple i is L+i-1, which can be negative. You can make an apple pie using one or more of the apples. The flavor of the apple pie will be the sum of the flavors of the apples used. You planned to make an apple pie using all of the apples...
['N, L = map(int, input().split(\' \'))\nazi = [L+(i+1)+1 for i in range(N)]\nprint("{}".format(sum(azi)-min(azi)))', "N, L = map(int, input().split(' '))\nazi = [L+(i+1)+1 for i in range(N)]\nprint(sum(azi)-min(azi))", "import numpy as np\nN, L = map(int, input().split(' '))\nazi = np.array([L+(i+1)-1 for i in range(N...
['Wrong Answer', 'Wrong Answer', 'Accepted']
['s295111397', 's989584781', 's171169821']
[2940.0, 2940.0, 12500.0]
[17.0, 17.0, 149.0]
[109, 96, 177]
p02994
u169696482
2,000
1,048,576
You have N apples, called Apple 1, Apple 2, Apple 3, ..., Apple N. The _flavor_ of Apple i is L+i-1, which can be negative. You can make an apple pie using one or more of the apples. The flavor of the apple pie will be the sum of the flavors of the apples used. You planned to make an apple pie using all of the apples...
['N, L = map(int, input().split())\na = [L + i for i in range(N)]\nb = list(map(lambda x:abs(x), a))\nc = b.index(min(b))\ndel a[c]\nprint(sum(j) for j in a )', 'N, L = map(int, input().split())\na = [L + i for i in range(N)]\nb = list(map(lambda x:abs(x), a))\nc = b.index(min(b))\ndel a[c]\nprint(sum(j for j in a))']
['Wrong Answer', 'Accepted']
['s882374230', 's399909282']
[3060.0, 3060.0]
[17.0, 17.0]
[151, 150]
p02994
u175590965
2,000
1,048,576
You have N apples, called Apple 1, Apple 2, Apple 3, ..., Apple N. The _flavor_ of Apple i is L+i-1, which can be negative. You can make an apple pie using one or more of the apples. The flavor of the apple pie will be the sum of the flavors of the apples used. You planned to make an apple pie using all of the apples...
['n.l = map(int,input().split())\nal = [l+i for i in range(n)]\na = min(al,key=abs)\nal.remove(a)\nprint(sum(al))', 'n,l = map(int,input().split())\nal = [l+i for i in range(n)]\na = min(al,key=abs)\nal.remove(a)\nprint(sum(al))']
['Runtime Error', 'Accepted']
['s921710190', 's628826918']
[9100.0, 9032.0]
[28.0, 28.0]
[107, 107]
p02994
u177756077
2,000
1,048,576
You have N apples, called Apple 1, Apple 2, Apple 3, ..., Apple N. The _flavor_ of Apple i is L+i-1, which can be negative. You can make an apple pie using one or more of the apples. The flavor of the apple pie will be the sum of the flavors of the apples used. You planned to make an apple pie using all of the apples...
["S=str(input())\n\nans='Good'\nfor i in range(len(S)-1):\n if S[i]==S[i+1]:\n ans='Bad'\nprint(ans)", 'N,L=map(int,input().split())\n\nT=[]\nt=1000\nfor i in range(N):\n if t>abs(L+i+1-1):\n t=abs(L+i+1-1)\n x=i\n T.append(L+i+1-1)\nprint(sum(T)-T[x])']
['Wrong Answer', 'Accepted']
['s485052181', 's839445086']
[2940.0, 3064.0]
[17.0, 17.0]
[102, 159]
p02994
u178192749
2,000
1,048,576
You have N apples, called Apple 1, Apple 2, Apple 3, ..., Apple N. The _flavor_ of Apple i is L+i-1, which can be negative. You can make an apple pie using one or more of the apples. The flavor of the apple pie will be the sum of the flavors of the apples used. You planned to make an apple pie using all of the apples...
['n,l = map(int,input().split())\nl = [i for i in range(l,l+n)]\nminus = min(list(map(abs,l)))\nminus = minus if minus<0 else -1*minus\nprint(sum(l)-minus)', 'n,l = map(int,input().split())\nli = [i for i in range(l,l+n)]\nminus = min(list(map(abs,li)))\nminus = minus if l+n>0 else -1*minus\nprint(sum(li)-minus)']
['Wrong Answer', 'Accepted']
['s887477893', 's303027509']
[2940.0, 2940.0]
[17.0, 18.0]
[149, 150]
p02994
u185966380
2,000
1,048,576
You have N apples, called Apple 1, Apple 2, Apple 3, ..., Apple N. The _flavor_ of Apple i is L+i-1, which can be negative. You can make an apple pie using one or more of the apples. The flavor of the apple pie will be the sum of the flavors of the apples used. You planned to make an apple pie using all of the apples...
['N, L = map(int, input().split())\npi = [L+i-1 for i in range(1, N+1)]\nminval = 100 + 200 -1\nminindex = 0\nfor o in range(N):\n if minval>abs(pi[o]):\n minval = abs(pi[o])\n minindex = o\nprint(sum(pi) - pi[o])\n \n \n \n', 'N, L = map(int, input().split())\na = L\nans = 1\nfor i in range(1, N+1):\n if ...
['Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Accepted']
['s048771382', 's410364728', 's826290320', 's849208683', 's252710684']
[2940.0, 3060.0, 3060.0, 3060.0, 3060.0]
[17.0, 17.0, 17.0, 19.0, 17.0]
[222, 166, 286, 286, 219]
p02994
u194440952
2,000
1,048,576
You have N apples, called Apple 1, Apple 2, Apple 3, ..., Apple N. The _flavor_ of Apple i is L+i-1, which can be negative. You can make an apple pie using one or more of the apples. The flavor of the apple pie will be the sum of the flavors of the apples used. You planned to make an apple pie using all of the apples...
['# -*- coding: utf-8 -*-\n\nimport numpy as np\nn,l = map(int, input().split())\na = np.arange(l,l + n, 1)\namax = l + n -1\namin = l\nif amax * amin >0:\n if abs(amax) - abs(amin):\n print(sum(a) - (amax))\n else:\n print(sum(a) - (amim))\nelif amax * amin <= 0:\n print(sum(a))\nelse:\n pas...
['Wrong Answer', 'Accepted']
['s475005801', 's166777879']
[12396.0, 21656.0]
[150.0, 319.0]
[326, 323]
p02994
u200527996
2,000
1,048,576
You have N apples, called Apple 1, Apple 2, Apple 3, ..., Apple N. The _flavor_ of Apple i is L+i-1, which can be negative. You can make an apple pie using one or more of the apples. The flavor of the apple pie will be the sum of the flavors of the apples used. You planned to make an apple pie using all of the apples...
['N, L = map(int, input().split())\ntmp = 0\nfor _ in range(N):\n tmp += L\n L += 1\nif tmp == 0:\n print(0)\nelif tmp > 0:\n if L=< 0:\n print(tmp)\n else:\n print(tmp-L)\nelse:\n if N > L:\n print(tmp)\n else:\n print(tmp-(N+L-1))\n ', 'N, L = map(int, input().s...
['Runtime Error', 'Wrong Answer', 'Runtime Error', 'Wrong Answer', 'Accepted']
['s048036856', 's331672902', 's569838817', 's815678710', 's044942327']
[2940.0, 3060.0, 2940.0, 3060.0, 3060.0]
[18.0, 17.0, 17.0, 17.0, 18.0]
[272, 296, 264, 289, 318]
p02994
u201802797
2,000
1,048,576
You have N apples, called Apple 1, Apple 2, Apple 3, ..., Apple N. The _flavor_ of Apple i is L+i-1, which can be negative. You can make an apple pie using one or more of the apples. The flavor of the apple pie will be the sum of the flavors of the apples used. You planned to make an apple pie using all of the apples...
['import io\nimport math\n# libraries\n\nn, m = map(int, input().split())\n\nif m<=0<=m+n-1:\n print(sum(range(m,m+n)))\n\n elif m<0:\n print(sum(range(m,m+n-1)))\n\n else:\n print(sum(range(m+1,m+n)))', 'nim, lima = map(int, input().split())\nif lima<=0<=lima+nim-1:\n print(sum(range(lima,lima+nim)))\nelif lim...
['Runtime Error', 'Accepted']
['s079717255', 's394793045']
[2940.0, 3060.0]
[18.0, 17.0]
[191, 195]
p02994
u204208382
2,000
1,048,576
You have N apples, called Apple 1, Apple 2, Apple 3, ..., Apple N. The _flavor_ of Apple i is L+i-1, which can be negative. You can make an apple pie using one or more of the apples. The flavor of the apple pie will be the sum of the flavors of the apples used. You planned to make an apple pie using all of the apples...
['n,l=map(int,input().split())\n\nif l<0:\n if l+n-1>0:\n print(l*n+(n-1)*n/2)\n else:\n print(l*(n-1)+(n-2)*(n-1)/2)\nelse:\n print((l+1)*(n-1)+(n-2)*(n-1)/2)', 'n,l=map(int,input().split())\n\nif l<0:\n if l+n-1>0:\n print(int(l*n+(n-1)*n/2))\n else:\n print(int(l*(n-1)+(n-2...
['Wrong Answer', 'Accepted']
['s279929661', 's986883543']
[2940.0, 3060.0]
[17.0, 17.0]
[172, 187]
p02994
u206787454
2,000
1,048,576
You have N apples, called Apple 1, Apple 2, Apple 3, ..., Apple N. The _flavor_ of Apple i is L+i-1, which can be negative. You can make an apple pie using one or more of the apples. The flavor of the apple pie will be the sum of the flavors of the apples used. You planned to make an apple pie using all of the apples...
['#B\nN, L = map(int, input().split())\napple = []\nfor i in range(N):\n apple.append(L + i)\nj = 0\nfor i in range(N):\n if apple[i] == 0:\n a = apple[i]\n del apple[i]\n j += 1\n break\nif j == 0:\n del apple[-1]\n \nprint(sum(apple))', '#B\nN, L = map(int, input().split())\nap...
['Wrong Answer', 'Accepted']
['s454985241', 's072271353']
[3060.0, 3064.0]
[17.0, 17.0]
[259, 400]
p02994
u211236379
2,000
1,048,576
You have N apples, called Apple 1, Apple 2, Apple 3, ..., Apple N. The _flavor_ of Apple i is L+i-1, which can be negative. You can make an apple pie using one or more of the apples. The flavor of the apple pie will be the sum of the flavors of the apples used. You planned to make an apple pie using all of the apples...
['N ,L= map(int,input().split())\none_aji = 0\naji = []\nanswer = []\nfor i in range(N):\n one_aji = L+i\n if one_aji < 0:\n answer.append(one_aji)\n one_aji *= -1\n aji.append(one_aji)\n else:\n aji.append(one_aji)\n answer.append(one_aji)\nzettai = 500\nind = 0\nfor i, a in...
['Runtime Error', 'Accepted']
['s533535247', 's596353620']
[3064.0, 3064.0]
[17.0, 18.0]
[440, 434]
p02994
u221041683
2,000
1,048,576
You have N apples, called Apple 1, Apple 2, Apple 3, ..., Apple N. The _flavor_ of Apple i is L+i-1, which can be negative. You can make an apple pie using one or more of the apples. The flavor of the apple pie will be the sum of the flavors of the apples used. You planned to make an apple pie using all of the apples...
["lm = []\nN,L = input().split()\nN = int(N)\nL = int(L)\nfor x in range(N):\n lm.append((abs(L+x-1),L+x-1))\nlm.sort(reverse=True)\nlm = lm[1::]\ns = 0\nfor u in range(len(lm)):\n s = s + lm[u][1]\nprint('{}'.format(s))", "lm = []\nN,L = input().split()\nN = int(N)\nL = int(L)\nfor x in range(1,N+1):\n lm.app...
['Wrong Answer', 'Accepted']
['s669163470', 's905620134']
[3064.0, 3064.0]
[17.0, 17.0]
[213, 205]
p02994
u223555291
2,000
1,048,576
You have N apples, called Apple 1, Apple 2, Apple 3, ..., Apple N. The _flavor_ of Apple i is L+i-1, which can be negative. You can make an apple pie using one or more of the apples. The flavor of the apple pie will be the sum of the flavors of the apples used. You planned to make an apple pie using all of the apples...
['n,l=map(int,input().split())\nans=[]\nsum=0\nfor i in range(n):\n ans.append([abs(l+i),l+i])\n sum+=l+i\nans.sort()\nprint(ans)\nprint(sum-ans[0][1])', 'n,l=map(int,input().split())\nans=[]\nsum=0\nfor i in range(n):\n ans.append([abs(l+i),l+i])\n sum+=l+i\nans.sort()\nprint(sum-ans[0][1])\n']
['Wrong Answer', 'Accepted']
['s237290344', 's851377405']
[3060.0, 2940.0]
[17.0, 17.0]
[147, 137]
p02994
u228759454
2,000
1,048,576
You have N apples, called Apple 1, Apple 2, Apple 3, ..., Apple N. The _flavor_ of Apple i is L+i-1, which can be negative. You can make an apple pie using one or more of the apples. The flavor of the apple pie will be the sum of the flavors of the apples used. You planned to make an apple pie using all of the apples...
['import numpy as np\nN,L = map(int, input() . split())\nx=[]\nM = 0\nN_list = np.array([])\n\nfor i in range(N):\n M += L + (i+1) - 1\n N_list = np.append(N_list, L + (i+1) - 1)\n \nm = np.abs(N_list).argmin()\n\n#M - N_list[m]\nprint(M - N_list[m])\n \n ', 'import numpy as np\nN,L = map(int, input() . split())\n...
['Wrong Answer', 'Accepted']
['s769222060', 's117544687']
[12488.0, 12488.0]
[149.0, 150.0]
[244, 249]
p02994
u229621546
2,000
1,048,576
You have N apples, called Apple 1, Apple 2, Apple 3, ..., Apple N. The _flavor_ of Apple i is L+i-1, which can be negative. You can make an apple pie using one or more of the apples. The flavor of the apple pie will be the sum of the flavors of the apples used. You planned to make an apple pie using all of the apples...
['N,L = map(int,input().split())\nA = [L + n for n in range(N)]\n\nans = 9999999999\n\nfor a in A:\n if abs(a) < ans:\n ans = a\n \nprint(sum(A) - a)', 'N,L = map(int,input().split())\nA = [L + n for n in range(N)]\n\nans = 9999999999\n\nfor a in A:\n if abs(a) < abs(ans):\n ans = a\n \nprint(sum(A) - a)'...
['Wrong Answer', 'Wrong Answer', 'Accepted']
['s155569288', 's481157527', 's275447784']
[3060.0, 2940.0, 2940.0]
[17.0, 17.0, 17.0]
[145, 150, 152]
p02994
u236536206
2,000
1,048,576
You have N apples, called Apple 1, Apple 2, Apple 3, ..., Apple N. The _flavor_ of Apple i is L+i-1, which can be negative. You can make an apple pie using one or more of the apples. The flavor of the apple pie will be the sum of the flavors of the apples used. You planned to make an apple pie using all of the apples...
['n,l=map(int,input().split())\n\naji=[]\nfor i in range(1,n+1):\n aji.append(l+i-1)\nsum=sum(aji)\nprint(aji)\nprint(sum)\np=1000\nfor i in range(n):\n if abs(aji[i])<=abs(aji[i-1]):\n p=aji[i]\n print(aji[i])\nprint(sum-p)', 'n,l=map(int,input().split())\n\naji=[]\nfor i in range(1,n+1):\n aji....
['Wrong Answer', 'Accepted']
['s759262765', 's489920793']
[3064.0, 3060.0]
[17.0, 17.0]
[229, 232]
p02994
u242196904
2,000
1,048,576
You have N apples, called Apple 1, Apple 2, Apple 3, ..., Apple N. The _flavor_ of Apple i is L+i-1, which can be negative. You can make an apple pie using one or more of the apples. The flavor of the apple pie will be the sum of the flavors of the apples used. You planned to make an apple pie using all of the apples...
['N, L = list(map(int, input().split()))\nr = np.arange(L, N + L)\nprint(np.sum(r) - r[np.argmin(np.abs(r))])', 'import numpy as np\nN, L = list(map(int, input().split()))\nr = np.arange(L, N + L)\nprint(np.sum(r) - r[np.argmin(np.abs(r))])']
['Runtime Error', 'Accepted']
['s434451506', 's507327971']
[2940.0, 18468.0]
[17.0, 303.0]
[106, 125]
p02994
u244033183
2,000
1,048,576
You have N apples, called Apple 1, Apple 2, Apple 3, ..., Apple N. The _flavor_ of Apple i is L+i-1, which can be negative. You can make an apple pie using one or more of the apples. The flavor of the apple pie will be the sum of the flavors of the apples used. You planned to make an apple pie using all of the apples...
['N,L = map(int,input().split())\nls = []\nfor i in range(L,L+N):\n ls.append(i)\n \nx = ls[0]\nabs_x = abs(x)\nif abs_x in ls[1:]:\n print(sum(ls))\nelse:\n emp = []\n for i in ls:\n emp.append(abs(i))\n mi = min(emp)\n ind = emp.index(mi)\n print(ind)\n ls.pop(ind)\n print(sum(ls)...
['Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Accepted']
['s256716951', 's689129327', 's903188797', 's686499309']
[3064.0, 3060.0, 3060.0, 3188.0]
[17.0, 19.0, 17.0, 19.0]
[302, 170, 171, 220]
p02994
u246975555
2,000
1,048,576
You have N apples, called Apple 1, Apple 2, Apple 3, ..., Apple N. The _flavor_ of Apple i is L+i-1, which can be negative. You can make an apple pie using one or more of the apples. The flavor of the apple pie will be the sum of the flavors of the apples used. You planned to make an apple pie using all of the apples...
['nl=map((int,input().split()))\na=[i+nl[1] for i in range(nl[0])]\n\na_sum = sum(a)\nabs_ = []\nfor i in range(nl[0]):\n abs_.append(abs(a_sum - a[i]))\nidx=abs_.index(min(abs_))\nprint(a_sum-a[idx])\n ', 'nl=list(map(int,input().split()))\na=[i+nl[1] for i in range(nl[0])]\n \na_sum = sum(a)\nabs_ = []\nfor i in ra...
['Runtime Error', 'Wrong Answer', 'Runtime Error', 'Accepted']
['s214483515', 's337629184', 's837315977', 's555453120']
[3060.0, 3060.0, 3064.0, 3064.0]
[17.0, 17.0, 17.0, 17.0]
[194, 196, 198, 187]
p02994
u250061066
2,000
1,048,576
You have N apples, called Apple 1, Apple 2, Apple 3, ..., Apple N. The _flavor_ of Apple i is L+i-1, which can be negative. You can make an apple pie using one or more of the apples. The flavor of the apple pie will be the sum of the flavors of the apples used. You planned to make an apple pie using all of the apples...
['import numpy as np\n\nN, L = map(int, input().split())\n\nA = np.arange(N)+L\n\nif A[0] <= 0 and A[N] => 0:\n print(np.sum(A))\nelif A[0] < 0 and A[N] < 0:\n print(np.sum(A)-A[N])\nelse:\n print(np.sum(A)-A[0])', 'import numpy as np\n\nN, L = map(int, input().split())\n\nA = np.arange(N)+L\n\nif A[0] <= 0 an...
['Runtime Error', 'Accepted']
['s656501040', 's380983294']
[2940.0, 12420.0]
[17.0, 150.0]
[208, 214]
p02994
u250583425
2,000
1,048,576
You have N apples, called Apple 1, Apple 2, Apple 3, ..., Apple N. The _flavor_ of Apple i is L+i-1, which can be negative. You can make an apple pie using one or more of the apples. The flavor of the apple pie will be the sum of the flavors of the apples used. You planned to make an apple pie using all of the apples...
["import sys\ndef input(): return sys.stdin.readline().rstrip()\n\ndef main():\n n, l = map(int, input().split())\n\n ls = [i + l for i in range(1, n+1)]\n if l >= 0:\n ls = ls[1:]\n elif n + l < 0:\n ls = ls[:-1]\n\n print(sum(ls))\n\nif __name__ == '__main__':\n main()\n", "import sys\...
['Wrong Answer', 'Accepted']
['s447244347', 's877824099']
[2940.0, 2940.0]
[17.0, 17.0]
[287, 286]
p02994
u251075661
2,000
1,048,576
You have N apples, called Apple 1, Apple 2, Apple 3, ..., Apple N. The _flavor_ of Apple i is L+i-1, which can be negative. You can make an apple pie using one or more of the apples. The flavor of the apple pie will be the sum of the flavors of the apples used. You planned to make an apple pie using all of the apples...
['n, l = map(int, input().split())\n\neat_taste = 99999\nfor i in range(n):\n taste = l + i\n if taste < eat_taste:\n eat_taste = taste\n if taste == 0:\n print(0)\n break\nelse:\n print(eat_taste)', 'n, l = map(int, input().split())\n\neat_taste = 99999\nsum_taste = 0\nfor i in range(n):\n taste = l + i\...
['Wrong Answer', 'Accepted']
['s710963043', 's834192887']
[2940.0, 2940.0]
[17.0, 17.0]
[197, 206]
p02994
u254221913
2,000
1,048,576
You have N apples, called Apple 1, Apple 2, Apple 3, ..., Apple N. The _flavor_ of Apple i is L+i-1, which can be negative. You can make an apple pie using one or more of the apples. The flavor of the apple pie will be the sum of the flavors of the apples used. You planned to make an apple pie using all of the apples...
['n,l= map(int,input().split())\nif l == -1:\n count = 0\n for i in range(n):\n count += l\n l += 1\n print(count)\nelif l < 0:\n count = 0\n for i in range(n-1):\n count += l\n l += 1\n print(count)\nelse:\n print(((2*l+n)*(n-1))//2)', "n,l= map(int,input().split())\nli =...
['Runtime Error', 'Accepted']
['s473096851', 's103831617']
[2940.0, 3064.0]
[17.0, 17.0]
[265, 262]
p02994
u266874640
2,000
1,048,576
You have N apples, called Apple 1, Apple 2, Apple 3, ..., Apple N. The _flavor_ of Apple i is L+i-1, which can be negative. You can make an apple pie using one or more of the apples. The flavor of the apple pie will be the sum of the flavors of the apples used. You planned to make an apple pie using all of the apples...
["N,L = map(int,input().split())\ninf = float('inf')\neat = inf\nans = 0\nfor i in range(N):\n eat = min(eat, abs(L+i))\nif L > 0:\n s = eat - L + 1\nelse:\n s = abs(eat + L -1)\nprint(s)\nfor i in range(1,N+1):\n if s == i:\n continue\n ans += L + i -1\nprint(ans)\n", "N,L = map(int,input().split...
['Wrong Answer', 'Accepted']
['s881081747', 's006709713']
[3060.0, 3060.0]
[17.0, 17.0]
[271, 263]
p02994
u268181283
2,000
1,048,576
You have N apples, called Apple 1, Apple 2, Apple 3, ..., Apple N. The _flavor_ of Apple i is L+i-1, which can be negative. You can make an apple pie using one or more of the apples. The flavor of the apple pie will be the sum of the flavors of the apples used. You planned to make an apple pie using all of the apples...
['import numpy as np\n\nN,L = [int(i) for i in input().split()]\nL = np.arange(L,L+N)\nprint(L)\n\nif 0 in L:\n print(sum(L))\nelse:\n if min(L) > 0:\n print(sum(L)-min(L))\n else:\n print(sum(L)-max(L))', 'import numpy as np\n\nN,L = [int(i) for i in input().split()]\nL = np.arange(L,L+N)\n\n\nif 0 in L:\n p...
['Wrong Answer', 'Accepted']
['s898867316', 's146818993']
[12508.0, 21136.0]
[149.0, 293.0]
[198, 191]
p02994
u270170852
2,000
1,048,576
You have N apples, called Apple 1, Apple 2, Apple 3, ..., Apple N. The _flavor_ of Apple i is L+i-1, which can be negative. You can make an apple pie using one or more of the apples. The flavor of the apple pie will be the sum of the flavors of the apples used. You planned to make an apple pie using all of the apples...
["import numpy as np\n\ndef main():\n N, L = map(int, input().split())\n apple = np.zeros(N)\n R = L + N - 1\n eat = 0\n if R <= 0:\n eat = R\n elif L >= 0:\n eat = L\n print((R + L) * (R - L + 1)/2 - eat)\n\n\n\n \n\nif __name__ == '__main__':\n main()", "import numpy as np\...
['Wrong Answer', 'Accepted']
['s862788667', 's130935755']
[12504.0, 12504.0]
[148.0, 148.0]
[277, 283]
p02994
u277641173
2,000
1,048,576
You have N apples, called Apple 1, Apple 2, Apple 3, ..., Apple N. The _flavor_ of Apple i is L+i-1, which can be negative. You can make an apple pie using one or more of the apples. The flavor of the apple pie will be the sum of the flavors of the apples used. You planned to make an apple pie using all of the apples...
['n,l=map(int,input().split())\navemoto=l-1+(n+1)/2\nmotomoto=n*avemoto\nzettaisa=1000\nkeep=0\nfor i in range(1,n+1):\n aji=l+i-1\n if zettaisa>=abs(avemoto-aji):\n zettaisa=abs(avemoto-aji)\n keep=aji\n\nprint(int(motomoto-aji))', 'n,l=map(int,input().split())\nmotomoto=n*l-n+n*(n+1)//2\nzettaisa=10**100\nkee...
['Wrong Answer', 'Accepted']
['s032996486', 's041222701']
[3060.0, 3060.0]
[18.0, 18.0]
[225, 207]
p02994
u279266699
2,000
1,048,576
You have N apples, called Apple 1, Apple 2, Apple 3, ..., Apple N. The _flavor_ of Apple i is L+i-1, which can be negative. You can make an apple pie using one or more of the apples. The flavor of the apple pie will be the sum of the flavors of the apples used. You planned to make an apple pie using all of the apples...
['n, l = map(int, input().split())\nt = list(map(lambda x: l + x, range(n)))\nr = sum(t)\nfor i in range(n):\n tmp = sum(t[:i] + t[i + 1:])\n dif_t = abs(r - tmp)\n if i == 0:\n dif = dif_t\n if dif_t < dif:\n ans = tmp\n dif = dif_t\nprint(ans)\n', 'n, l = map(int, input().split())\nt ...
['Runtime Error', 'Accepted']
['s460837810', 's757940475']
[9124.0, 9084.0]
[26.0, 27.0]
[266, 247]
p02994
u283520984
2,000
1,048,576
You have N apples, called Apple 1, Apple 2, Apple 3, ..., Apple N. The _flavor_ of Apple i is L+i-1, which can be negative. You can make an apple pie using one or more of the apples. The flavor of the apple pie will be the sum of the flavors of the apples used. You planned to make an apple pie using all of the apples...
['L,N = (int(i) for i in input().split()) \nsum = (2*L+N-1)*N/2 \nif L>0:\n print(int(sum-L))\nelif L+N-1<0:\n print(int(sum-(L+N-1)))\nelse:\n ans=sum\n print(int(sum))', 'N,L = (int(i) for i in input().split()) \nsum = (2*L+N-1)*N/2 \nif L>0:\n print(int(sum-L))\nelif L+N-1<0:\n print(int(sum-(L+N-1...
['Wrong Answer', 'Accepted']
['s558877889', 's061093733']
[3060.0, 3060.0]
[18.0, 18.0]
[171, 171]
p02994
u283751459
2,000
1,048,576
You have N apples, called Apple 1, Apple 2, Apple 3, ..., Apple N. The _flavor_ of Apple i is L+i-1, which can be negative. You can make an apple pie using one or more of the apples. The flavor of the apple pie will be the sum of the flavors of the apples used. You planned to make an apple pie using all of the apples...
['n,l = map(int,input().split())\ncount = 0\nlists = [l+i-1 for i in range(1,n+1)]\n\nx = 2000\nfor i in range(n):\n if abs(x)>abs(lists[i]):\n x = lists[i]\n\nprint(sum(lists))', 'n,l = map(int,input().split())\ncount = 0\nlists = [l+i-1 for i in range(1,n+1)]\nx = 2000\nfor i in range(n):\n if abs(x)>abs(lists[i...
['Wrong Answer', 'Accepted']
['s196919338', 's652213855']
[9128.0, 9172.0]
[28.0, 25.0]
[170, 184]
p02994
u286223754
2,000
1,048,576
You have N apples, called Apple 1, Apple 2, Apple 3, ..., Apple N. The _flavor_ of Apple i is L+i-1, which can be negative. You can make an apple pie using one or more of the apples. The flavor of the apple pie will be the sum of the flavors of the apples used. You planned to make an apple pie using all of the apples...
['n , k = [int(x) for x in input().split()]\ng = 100000000000\ns = n * k + (n*(n-1))//2\nfor x in range(n):\n g = min(g, s - (k + x))\n \nprint(g)\n', 'n , k = [int(x) for x in input().split()]\ns = n * k + (n*(n-1))//2\ng = s - k\nfor x in range(1,n):\n g = min(g, s - (k + x))\n \nprint(g)\n', 'n , k = [in...
['Wrong Answer', 'Wrong Answer', 'Accepted']
['s131267964', 's834972972', 's129470567']
[2940.0, 2940.0, 3060.0]
[20.0, 17.0, 19.0]
[145, 140, 185]
p02994
u286486951
2,000
1,048,576
You have N apples, called Apple 1, Apple 2, Apple 3, ..., Apple N. The _flavor_ of Apple i is L+i-1, which can be negative. You can make an apple pie using one or more of the apples. The flavor of the apple pie will be the sum of the flavors of the apples used. You planned to make an apple pie using all of the apples...
['N, L = map(int, input().split())\n\ntaste = [(L + i - 1) + 1 for i in range(N)]\n#print(taste)\npie = {}\nfor i in range(N-1):\n tmp = taste[:]\n tmp0 = tmp[i]\n tmp.pop(i)\n tmp1 = sum(tmp)\n pie[i] = abs(tmp0 - tmp1)\n print(pie)\n \nprint(pie[min(pie)])', 'N, L = map(int, input().split())\n\ntaste = [(L + i...
['Wrong Answer', 'Accepted']
['s762365050', 's399397083']
[3064.0, 3064.0]
[20.0, 18.0]
[250, 357]
p02994
u295585689
2,000
1,048,576
You have N apples, called Apple 1, Apple 2, Apple 3, ..., Apple N. The _flavor_ of Apple i is L+i-1, which can be negative. You can make an apple pie using one or more of the apples. The flavor of the apple pie will be the sum of the flavors of the apples used. You planned to make an apple pie using all of the apples...
['N,L=map(int ,input().split())\nprint((2*L+N)*(N-1)/2 )', 'N,L=map(int ,input().split())\nif L >= 0:\n print(int((2*L+N)*(N-1)/2) )\nelif L < 0 and L+N-1>=0:\n print(int((2*L+N-1)*(N)/2) )\nelse:\n print(int((2*L+N-2)*(N-1)/2) )']
['Wrong Answer', 'Accepted']
['s290031232', 's083836430']
[2940.0, 3188.0]
[18.0, 20.0]
[53, 172]
p02994
u299172013
2,000
1,048,576
You have N apples, called Apple 1, Apple 2, Apple 3, ..., Apple N. The _flavor_ of Apple i is L+i-1, which can be negative. You can make an apple pie using one or more of the apples. The flavor of the apple pie will be the sum of the flavors of the apples used. You planned to make an apple pie using all of the apples...
["N, L = map(int,input().split(' '))\nl=list(range(L,N+L,1))\ns = sum(l)\nprint(min([s-x for x in l]))", "N, L = map(int,input().split(' '))\nl=list(range(L,N+L,1))\ns = sum(l)\nans=-10000\nfor x in l:\n if abs(ans)>x:\n ans=x\nprint(s-ans) \n"]
['Wrong Answer', 'Accepted']
['s839873314', 's495891823']
[2940.0, 2940.0]
[17.0, 17.0]
[97, 146]
p02994
u304209389
2,000
1,048,576
You have N apples, called Apple 1, Apple 2, Apple 3, ..., Apple N. The _flavor_ of Apple i is L+i-1, which can be negative. You can make an apple pie using one or more of the apples. The flavor of the apple pie will be the sum of the flavors of the apples used. You planned to make an apple pie using all of the apples...
['N, L = map(int, input.split())\n\nlist = [L+(i+1)-1 for i in range(N)]\n\nprint(list)\nlist.sort(key=lambda x: abs(x))\n\ndel list[0]\nprint(sum(list))', 'N , L = map(int, input().split())\n \nlist = [L + (i+1)-1 for i in range(N)]\n \nlist.sort(key=lambda x:abs(x))\n \ndel list[0]\nprint(sum(list))']
['Runtime Error', 'Accepted']
['s562328251', 's369362353']
[2940.0, 3060.0]
[17.0, 17.0]
[143, 138]
p02994
u305366205
2,000
1,048,576
You have N apples, called Apple 1, Apple 2, Apple 3, ..., Apple N. The _flavor_ of Apple i is L+i-1, which can be negative. You can make an apple pie using one or more of the apples. The flavor of the apple pie will be the sum of the flavors of the apples used. You planned to make an apple pie using all of the apples...
['N,L = map(int, input().split())\nlist = []\nsum = 0\nmin = 10000\nsign = 1\nfor i in range(1,N+1):\n sum += L+i-1\n list.append(L+i-1)\nprint(sum)\nfor num in list:\n if min > abs(num):\n min = abs(num)\n if num > 0:\n sign = 1\n else:\n sign = -1\nprint(min)\nprint...
['Wrong Answer', 'Accepted']
['s245133239', 's142863294']
[3064.0, 3060.0]
[17.0, 17.0]
[328, 294]
p02994
u306033313
2,000
1,048,576
You have N apples, called Apple 1, Apple 2, Apple 3, ..., Apple N. The _flavor_ of Apple i is L+i-1, which can be negative. You can make an apple pie using one or more of the apples. The flavor of the apple pie will be the sum of the flavors of the apples used. You planned to make an apple pie using all of the apples...
['n,l = map(int,input().split())\n\nal = []\nfor i in range(n):\n aji = l + i\n aji_ = abs(aji)\n al += [aji_]\n\nx = abs(l)\nan = 0\nfor i in range(n):\n if al[i] < x:\n x = al[i]\n an = i\n\nans = (l + l+n-1)*n/2 - (l+an)\nprint(ans)\n', 'n,l = map(int,input().split())\n\nal = []\nfor i in r...
['Wrong Answer', 'Accepted']
['s068542301', 's017564440']
[3060.0, 3064.0]
[18.0, 17.0]
[244, 249]
p02994
u309120194
2,000
1,048,576
You have N apples, called Apple 1, Apple 2, Apple 3, ..., Apple N. The _flavor_ of Apple i is L+i-1, which can be negative. You can make an apple pie using one or more of the apples. The flavor of the apple pie will be the sum of the flavors of the apples used. You planned to make an apple pie using all of the apples...
['N, L = map(int, input().split())\n \ns = (N-1)*(2*L+N-1)/2\nif L >=0 : m = L\nelse: m = L + N - 1\n\nprint(s-m)', 'N, L = map(int, input().split())\n \n\ns = (N-1)*(2*L+N-1) // 2\nl = [abs(L+i) for i in range(N)]\n\nprint(s - (L+l.index(min(l))))', 'N, L = map(int, input().split())\n\n\ns = (N-1)*(2*L+N-1) // 2\nl = ...
['Wrong Answer', 'Wrong Answer', 'Runtime Error', 'Wrong Answer', 'Accepted']
['s066232077', 's281155297', 's476440953', 's557990504', 's121808921']
[9100.0, 9172.0, 9120.0, 9088.0, 9096.0]
[24.0, 27.0, 24.0, 28.0, 29.0]
[105, 142, 153, 119, 302]
p02994
u310381103
2,000
1,048,576
You have N apples, called Apple 1, Apple 2, Apple 3, ..., Apple N. The _flavor_ of Apple i is L+i-1, which can be negative. You can make an apple pie using one or more of the apples. The flavor of the apple pie will be the sum of the flavors of the apples used. You planned to make an apple pie using all of the apples...
['N,L=list(map(int,input().split()))\ntaste=[]\ntaste1=[]\nmemo=[]\nsum=0\nfor i in range(N):\n tasty=abs(L+i)\n if L+i<0:\n memo.append(L+i)\n taste.append(tasty)\n taste1.append(L+i)\n sum+=taste1[i]\ntasteab=sorted(taste)\nmemo=sorted(memo)\npie=(sum-memo[-1])\nprint(pie)', 'N,L=list(map(int,in...
['Runtime Error', 'Accepted']
['s752294574', 's644398278']
[3064.0, 3064.0]
[17.0, 17.0]
[280, 329]
p02994
u313478404
2,000
1,048,576
You have N apples, called Apple 1, Apple 2, Apple 3, ..., Apple N. The _flavor_ of Apple i is L+i-1, which can be negative. You can make an apple pie using one or more of the apples. The flavor of the apple pie will be the sum of the flavors of the apples used. You planned to make an apple pie using all of the apples...
['N, L = int(input()), int(input())\n\nflavors = [x + L - 1 for x in range(1, N + 1)]\nplanned_pie = sum(flavors)\neat = min(flavors)\neat_abs = -min([abs(x) for x in flavors])\nprint([planned_pie - max(eat, eat_abs) if planned_pie <\n 0 else planned_pie - max(eat, eat_abs)][0])', 'N, L = map(int, input().split()...
['Runtime Error', 'Accepted']
['s074270488', 's358576526']
[3064.0, 2940.0]
[17.0, 17.0]
[276, 189]
p02994
u321605735
2,000
1,048,576
You have N apples, called Apple 1, Apple 2, Apple 3, ..., Apple N. The _flavor_ of Apple i is L+i-1, which can be negative. You can make an apple pie using one or more of the apples. The flavor of the apple pie will be the sum of the flavors of the apples used. You planned to make an apple pie using all of the apples...
['r=input().split()\nN=int(r[0])\nL=int(r[1])\nans=0\nans_li=[]\nfor i in range(N):\n ans+=L-(i+1)-1\n ans_li.append(L-(i+1)-1)\nif 0 in ans_li:\n print(ans)\nelif max(ans_li)>0:\n print(ans-min(ans_li))\nelse:\n print(ans-max(ans_li))', 'r=input().split()\nN=int(r[0])\nL=int(r[1])\nans=0\nans_li=[]\nfor...
['Wrong Answer', 'Accepted']
['s167428895', 's243081698']
[9088.0, 9112.0]
[26.0, 29.0]
[235, 235]
p02994
u327162583
2,000
1,048,576
You have N apples, called Apple 1, Apple 2, Apple 3, ..., Apple N. The _flavor_ of Apple i is L+i-1, which can be negative. You can make an apple pie using one or more of the apples. The flavor of the apple pie will be the sum of the flavors of the apples used. You planned to make an apple pie using all of the apples...
['\nN,L = (int(i) for i in input().split())\nonon = 10000\nfor i in range(L,L+N):\n if i <= onon:\n onon = i\nprint(N*(L*2+N-1)-onon)', 'N,L = (int(i) for i in input().split())\nonon = 10000\nfor i in range(L,L+N):\n if abs(i) <= abs(onon):\n onon = i\nprint(N*(L*2+N-1)//2-onon)']
['Wrong Answer', 'Accepted']
['s441104531', 's951703355']
[2940.0, 3060.0]
[18.0, 17.0]
[135, 147]
p02994
u329058683
2,000
1,048,576
You have N apples, called Apple 1, Apple 2, Apple 3, ..., Apple N. The _flavor_ of Apple i is L+i-1, which can be negative. You can make an apple pie using one or more of the apples. The flavor of the apple pie will be the sum of the flavors of the apples used. You planned to make an apple pie using all of the apples...
['N,L=map(int,input().split())\nLL=[L+i for i in range(N)]\nLLL=[abs(L+i) for i in range(N)]\n\nif N+L<0:\n print(sum(LL)+min(LLL))\nelif N+L=0:\n print(sum(LL))\nelse:\n print(sum(LL)-min(LLL))', 'N,L=map(int,input().split()) \nLL=[L+i for i in range(N)]\nif L>=1:\n print(sum(LL)-min(LL))\nelif N+L>0:\n print(sum...
['Runtime Error', 'Accepted']
['s173512328', 's213038793']
[2940.0, 2940.0]
[17.0, 18.0]
[186, 151]
p02994
u331381193
2,000
1,048,576
You have N apples, called Apple 1, Apple 2, Apple 3, ..., Apple N. The _flavor_ of Apple i is L+i-1, which can be negative. You can make an apple pie using one or more of the apples. The flavor of the apple pie will be the sum of the flavors of the apples used. You planned to make an apple pie using all of the apples...
['n, l = (int(i) for i in input().split())\nap=[]\n\nfor i in range(n):\n\tap.append(l+i)\n\nidx=ap.index(min(map(abs,ap)))\n\nres=(l-1)*n+(1+n)*n/2-ap[idx]\nprint(res)', 'n, l = (int(i) for i in input().split())\n\nap=[]\n\nfor i in range(n):\n\tap[i]=l+i\n\nidx=ap.index(min(abs(ap))\n\nres=(l-1)*n+(1+n)*n/2-ap[idx]\n...
['Runtime Error', 'Runtime Error', 'Wrong Answer', 'Wrong Answer', 'Accepted']
['s050870597', 's079523097', 's661191886', 's899673671', 's049662114']
[3060.0, 2940.0, 3060.0, 3060.0, 3060.0]
[17.0, 17.0, 17.0, 17.0, 17.0]
[156, 148, 166, 172, 175]
p02994
u340792767
2,000
1,048,576
You have N apples, called Apple 1, Apple 2, Apple 3, ..., Apple N. The _flavor_ of Apple i is L+i-1, which can be negative. You can make an apple pie using one or more of the apples. The flavor of the apple pie will be the sum of the flavors of the apples used. You planned to make an apple pie using all of the apples...
['line = input().strip()\nN,K = line.split(" ")\nN = int(N)\nK = int(K)\nresult = 0\n\nflavors = [K + i - 1 for i in range(N)]\nif 0 in flavors: result = sum(flavors)\nelse:\n min_data = min(flavors)\n result = sum(flavors) - min_data\n\nprint(result)', 'line = input().strip()\nN,K = line.split(" ")\nN = int(N)\n...
['Wrong Answer', 'Accepted']
['s872229852', 's026578221']
[3060.0, 3064.0]
[17.0, 17.0]
[243, 326]
p02994
u346308892
2,000
1,048,576
You have N apples, called Apple 1, Apple 2, Apple 3, ..., Apple N. The _flavor_ of Apple i is L+i-1, which can be negative. You can make an apple pie using one or more of the apples. The flavor of the apple pie will be the sum of the flavors of the apples used. You planned to make an apple pie using all of the apples...
['import numpy as np\n\ndef acinput():\n return list(map(int,input().split(" ")))\n\n\nN,L=acinput()\n\n\naji=L+np.arange(1,N+1)-1\nsm=np.sum(aji)\n\narg=np.argmin(np.abs(aji))\nif aji[arg]>=0:\n print(sm-aji[arg])\nelse:\n print(sm-aji[arg])\n\n\nprint(aji)\n', 'import numpy as np\n\ndef acinput():\n ...
['Wrong Answer', 'Accepted']
['s800055897', 's306476011']
[12504.0, 12404.0]
[159.0, 149.0]
[255, 242]
p02994
u347600233
2,000
1,048,576
You have N apples, called Apple 1, Apple 2, Apple 3, ..., Apple N. The _flavor_ of Apple i is L+i-1, which can be negative. You can make an apple pie using one or more of the apples. The flavor of the apple pie will be the sum of the flavors of the apples used. You planned to make an apple pie using all of the apples...
['n, l = map(int, input().split())\ntaste_abs = [abs(l + i) for i in range(n)]\nindex = taste_abs.index(min(taste_abs))\ntaste.pop(index)\nprint(sum(taste))', 'n, l = map(int, input().split())\na = [l + i for i in range(n)]\ns = 1 if sum(a) >= 0 else -1 \nprint(sum(a) - s * min(abs(a[i]) for i in range(n)))']
['Runtime Error', 'Accepted']
['s426487847', 's073295693']
[2940.0, 9212.0]
[17.0, 26.0]
[150, 145]
p02994
u347912669
2,000
1,048,576
You have N apples, called Apple 1, Apple 2, Apple 3, ..., Apple N. The _flavor_ of Apple i is L+i-1, which can be negative. You can make an apple pie using one or more of the apples. The flavor of the apple pie will be the sum of the flavors of the apples used. You planned to make an apple pie using all of the apples...
['n, L = list(map(int, input().split()))\n\n\napple_taste = []\ntaste_total = 0\nfor i in range(1, n + 1):\n apple_taste.append(L + i - 1)\n taste_total += L + i - 1\n\n\n\n\nabs_taste_total = abs(sum(apple_taste))\nans = 10 ** 9 \n\nfor i in apple_taste:\n current_total = taste_total - i \n abs_current_tot...
['Runtime Error', 'Runtime Error', 'Accepted']
['s208032742', 's818571322', 's637406346']
[3064.0, 3064.0, 3064.0]
[17.0, 17.0, 17.0]
[903, 1339, 1405]
p02994
u348945811
2,000
1,048,576
You have N apples, called Apple 1, Apple 2, Apple 3, ..., Apple N. The _flavor_ of Apple i is L+i-1, which can be negative. You can make an apple pie using one or more of the apples. The flavor of the apple pie will be the sum of the flavors of the apples used. You planned to make an apple pie using all of the apples...
['N, L = map(int, input().split())\n\naji = list(map(lambda x: L + x - 1, range(1, N + 1)))\n\nprint(aji)\n\nif (aji[0] <= 0 and aji[N - 1] >= 0) :\n print(sum(aji))\nelif (aji[0] < 0 and aji[N - 1] < 0):\n print(sum(aji) - aji[N -1])\nelse:\n print(sum(aji) - aji[0])', 'N, L = map(int, input().split())\n\naji...
['Wrong Answer', 'Accepted']
['s461980327', 's948397368']
[3064.0, 3064.0]
[17.0, 17.0]
[264, 252]
p02994
u350093546
2,000
1,048,576
You have N apples, called Apple 1, Apple 2, Apple 3, ..., Apple N. The _flavor_ of Apple i is L+i-1, which can be negative. You can make an apple pie using one or more of the apples. The flavor of the apple pie will be the sum of the flavors of the apples used. You planned to make an apple pie using all of the apples...
['n,l=map(int,input.split())\nif l<0:\n print(((n+2*l-1)*n)//2)\nelse:\n print((((n+2*l-1)*n)//2)-l)', 'n,l=map(int,input.split())\nif l<0:\n print(((n+(2*l)-1)*n)//2)\nelse:\n print((((n+(2*l)-1)*n)//2)-l)\n', 'a,b=map(int,input().split())\ntotal=a*(a+2*b-1)//2\nx=b\ny=a+b-1\nif (abs(x)<abs(y):\n z=x\nelse:\n z=...
['Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted']
['s089367110', 's385137957', 's425662018', 's486572750', 's780327697', 's776779988']
[2940.0, 2940.0, 8856.0, 2940.0, 2940.0, 9076.0]
[17.0, 17.0, 22.0, 17.0, 17.0, 28.0]
[96, 101, 155, 89, 87, 154]
p02994
u354567428
2,000
1,048,576
You have N apples, called Apple 1, Apple 2, Apple 3, ..., Apple N. The _flavor_ of Apple i is L+i-1, which can be negative. You can make an apple pie using one or more of the apples. The flavor of the apple pie will be the sum of the flavors of the apples used. You planned to make an apple pie using all of the apples...
['n,l=map(int,input().split())\ntaste=[]\nall_taste = 0\nfor i in range(n):\n taste.append(l+i)\n all_taste += taste[i]\nif taste[0] > 0 and taste[n-1] > 0:\n print(all_taste - tasete[0])\n exit()\nelif taste[0] < 0 and taste[n-1] < 0:\n print(all_taste - taste[n-1])\n exit()\nelse:\n print(all_tas...
['Runtime Error', 'Accepted']
['s864030674', 's743414603']
[3060.0, 3060.0]
[17.0, 19.0]
[309, 272]
p02994
u356701928
2,000
1,048,576
You have N apples, called Apple 1, Apple 2, Apple 3, ..., Apple N. The _flavor_ of Apple i is L+i-1, which can be negative. You can make an apple pie using one or more of the apples. The flavor of the apple pie will be the sum of the flavors of the apples used. You planned to make an apple pie using all of the apples...
['n,l=map(int,input().split())\nif l<0 and l+n-1<0:\n print((2*l+n-2)*(n-1)/2)\nelif l>0 and l+n-1>0:\n print((2*l+n)*(n-1)/2)\nelse:\n print((2*l+n-1)*n/2)', 'n,l=map(int,input().split())\nif l<0 and l+n-1<0:\n print((2*l+n-2)*(n-1)//2)\nelif l>0 and l+n-1>0:\n print((2*l+n)*(n-1)//2)\nelse:\n print(...
['Wrong Answer', 'Accepted']
['s992047593', 's161316035']
[3060.0, 3060.0]
[19.0, 17.0]
[157, 160]
p02994
u360116509
2,000
1,048,576
You have N apples, called Apple 1, Apple 2, Apple 3, ..., Apple N. The _flavor_ of Apple i is L+i-1, which can be negative. You can make an apple pie using one or more of the apples. The flavor of the apple pie will be the sum of the flavors of the apples used. You planned to make an apple pie using all of the apples...
['def main():\n N, L = map(int, input().split())\n a = [L + n for n in range(N)]\n print(a)\n if L > 0:\n print(sum(a) - a[0])\n elif abs(L) >= N:\n print(sum(a) - a[-1])\n else:\n print(sum(a))\n\n\nmain()\n', 'def main():\n N, L = map(int, input().split())\n a = sum([L + n...
['Wrong Answer', 'Runtime Error', 'Accepted']
['s486512922', 's496114130', 's009099110']
[3060.0, 3056.0, 3064.0]
[17.0, 18.0, 17.0]
[232, 209, 219]
p02994
u360515075
2,000
1,048,576
You have N apples, called Apple 1, Apple 2, Apple 3, ..., Apple N. The _flavor_ of Apple i is L+i-1, which can be negative. You can make an apple pie using one or more of the apples. The flavor of the apple pie will be the sum of the flavors of the apples used. You planned to make an apple pie using all of the apples...
['N, L = map(int, input().split())\n\nA = [L+i for i in range(N)]\n\nB = list(map(lambda x: abs(x), A))\nprint (A)\nprint (B)\nprint (sum(A) - A[B.index(min(B))])', 'N, L = map(int, input().split())\n\nA = [L+i for i in range(N)]\n\nB = list(map(lambda x: abs(x), A))\nprint (sum(A) - A[B.index(min(B))])']
['Wrong Answer', 'Accepted']
['s185753248', 's235544356']
[3060.0, 2940.0]
[18.0, 18.0]
[153, 133]
p02994
u361826811
2,000
1,048,576
You have N apples, called Apple 1, Apple 2, Apple 3, ..., Apple N. The _flavor_ of Apple i is L+i-1, which can be negative. You can make an apple pie using one or more of the apples. The flavor of the apple pie will be the sum of the flavors of the apples used. You planned to make an apple pie using all of the apples...
['\n\nimport sys\n\n# import numpy as np\nimport itertools\n\nread = sys.stdin.buffer.read\nreadline = sys.stdin.buffer.readline\nreadlines = sys.stdin.buffer.readlines\nsys.setrecursionlimit(10 ** 7)\n\nN, L = map(int, read().split())\nF = [L + i for i in range(N)]\n\nans = 0\nfor i in itertools.combinations(F, N - 1)...
['Wrong Answer', 'Accepted']
['s147500428', 's388499395']
[3064.0, 3060.0]
[17.0, 17.0]
[402, 350]
p02994
u363146889
2,000
1,048,576
You have N apples, called Apple 1, Apple 2, Apple 3, ..., Apple N. The _flavor_ of Apple i is L+i-1, which can be negative. You can make an apple pie using one or more of the apples. The flavor of the apple pie will be the sum of the flavors of the apples used. You planned to make an apple pie using all of the apples...
['(L + N - 1)', '# -*- coding: utf-8 -*-\n\nN,L=map(int, input().split())\n\nans = 0\nfor i in range(N):\n ans = ans + L + i\n\nif L > 0:\n ans = ans - L\nif (L + N - 1) < 0:\n ans = ans - (L + N - 1)\n\nprint(ans)']
['Runtime Error', 'Accepted']
['s797704159', 's659442902']
[2940.0, 2940.0]
[17.0, 17.0]
[11, 193]
p02994
u363836311
2,000
1,048,576
You have N apples, called Apple 1, Apple 2, Apple 3, ..., Apple N. The _flavor_ of Apple i is L+i-1, which can be negative. You can make an apple pie using one or more of the apples. The flavor of the apple pie will be the sum of the flavors of the apples used. You planned to make an apple pie using all of the apples...
['n,l=map(int, input().split())\nt=0\nc=0\nfor i in range(n):\n if i==0:\n t=abs(l+(i+1)-1)\n c=0\n else:\n t=min(t, abs(l+(i+1)-1))\n if t=abs(l+(i+1)-1):\n c=i+1\ng=0\nfor i in range(n):\n g+=(l+(i+1)-1)\nprint(g-l-c)', 'n,l=map(int, input().split())\nt=0\nfor i in range(n):\n if i==0:\n t=abs...
['Runtime Error', 'Wrong Answer', 'Accepted']
['s209010375', 's581044021', 's573289515']
[2940.0, 2940.0, 3064.0]
[17.0, 18.0, 17.0]
[223, 130, 249]
p02994
u364061715
2,000
1,048,576
You have N apples, called Apple 1, Apple 2, Apple 3, ..., Apple N. The _flavor_ of Apple i is L+i-1, which can be negative. You can make an apple pie using one or more of the apples. The flavor of the apple pie will be the sum of the flavors of the apples used. You planned to make an apple pie using all of the apples...
['l,m = map(int,input().split())\nlis =[]\nlis2=[]\nfor i in range(l):\n lis.append(m+i)\n lis2.append(abs(m+i))\n\nlis.pop(lis2.index(min(lis2)))\nprint(sum(lis)\n ', 'l,m = map(int,input().split())\nlis =[]\nlis2=[]\nfor i in range(l):\n lis.append(m+i-1)\n lis2.append(abs(m+i-1))\n\nlis.pop(list_name.index(min(...
['Runtime Error', 'Runtime Error', 'Accepted']
['s458634023', 's625208264', 's839508337']
[2940.0, 2940.0, 2940.0]
[17.0, 17.0, 17.0]
[157, 166, 158]
p02994
u368796742
2,000
1,048,576
You have N apples, called Apple 1, Apple 2, Apple 3, ..., Apple N. The _flavor_ of Apple i is L+i-1, which can be negative. You can make an apple pie using one or more of the apples. The flavor of the apple pie will be the sum of the flavors of the apples used. You planned to make an apple pie using all of the apples...
['n,l = map(int,input().split())\n\nif l <= 0 <= n+l-1:\n print((n+l)*(n+l-1)//2 - (-l)*(-l+1)//2)\nelif n+l-1 < 0:\n print((n-1)*(n+2l-2)//2)\nelse:\n print((n-1)*(n+2l)//2)\n ', 'n,l = map(int,input().split())\n\nif l <= 0 <= n+l-1:\n print((n+l)*(n+l-1)//2 - (-l)*(-l+1)//2)\nelif n+l-1 < 0:\n print((n-1)*(n+2*...
['Runtime Error', 'Accepted']
['s239290351', 's538538965']
[2940.0, 2940.0]
[17.0, 17.0]
[171, 173]
p02994
u370721525
2,000
1,048,576
You have N apples, called Apple 1, Apple 2, Apple 3, ..., Apple N. The _flavor_ of Apple i is L+i-1, which can be negative. You can make an apple pie using one or more of the apples. The flavor of the apple pie will be the sum of the flavors of the apples used. You planned to make an apple pie using all of the apples...
["\nN, L = map(int, input().split(''))\nsum_all = N(L+((N+1)/2)-1)\n\nif L*(L+N-1) <= 0:\n print(sum_all)\nelif L < 0:\n print(sum_all - L - N + 1)\nelse:\n print(sum_all - L)", '\nN, L = map(int, input().split())\nsum_all = N*(L+((N+1)/2)-1)\n\nif L*(L+N-1) <= 0:\n print(sum_all)\nelif L < 0:\n print(sum_all - L ...
['Runtime Error', 'Wrong Answer', 'Accepted']
['s172080054', 's260287449', 's244553667']
[3060.0, 2940.0, 3060.0]
[17.0, 17.0, 17.0]
[208, 208, 222]
p02994
u373156647
2,000
1,048,576
You have N apples, called Apple 1, Apple 2, Apple 3, ..., Apple N. The _flavor_ of Apple i is L+i-1, which can be negative. You can make an apple pie using one or more of the apples. The flavor of the apple pie will be the sum of the flavors of the apples used. You planned to make an apple pie using all of the apples...
['def main(str):\n input = str.split()\n n = int(input[0])\n l = int(input[1])\n apples = [l + i for i in range(n)]\n abs_apples = list(map(lambda x: abs(x), apples))\n return sum(apples) - apples[abs_apples.index(min(abs_apples))]\n\n\nif __name__ == "__main__":\n str = input()\n main(str)', 'd...
['Wrong Answer', 'Accepted']
['s953492959', 's186848951']
[3064.0, 3064.0]
[17.0, 17.0]
[302, 309]
p02994
u379535139
2,000
1,048,576
You have N apples, called Apple 1, Apple 2, Apple 3, ..., Apple N. The _flavor_ of Apple i is L+i-1, which can be negative. You can make an apple pie using one or more of the apples. The flavor of the apple pie will be the sum of the flavors of the apples used. You planned to make an apple pie using all of the apples...
['N, L = map(int, input().split())\n\ncount = 0\nmin = None\nsum = 0\nfor i in range(N):\n i += 1\n num = abs(L + i - 1)\n if min == None:\n min = num\n continue\n if min > num:\n min = num\n count = i\n\nfor i in range(N):\n i += 1\n if i == count:\n continue\n num = L + i - 1\n sum += num\nprin...
['Wrong Answer', 'Accepted']
['s299075849', 's773234522']
[3064.0, 3064.0]
[22.0, 17.0]
[303, 307]
p02994
u385086422
2,000
1,048,576
You have N apples, called Apple 1, Apple 2, Apple 3, ..., Apple N. The _flavor_ of Apple i is L+i-1, which can be negative. You can make an apple pie using one or more of the apples. The flavor of the apple pie will be the sum of the flavors of the apples used. You planned to make an apple pie using all of the apples...
["N,L = map(int,input().rstrip().split(' '))\napple_pie = 0\nex = abs(L * N)\napple = []\nfor i in range(N):\n a = L + i \n apple.append(a)\n apple_pie += a\nprint(apple)\nfor i in range(len(apple)):\n if abs(ex) > abs(apple[i]):\n ex = apple[i]\nprint(ex)\napple_pie-= ex\nprint(apple_pie)", "N,L = m...
['Wrong Answer', 'Accepted']
['s232449209', 's616311146']
[3064.0, 3064.0]
[17.0, 17.0]
[293, 270]
p02994
u385244248
2,000
1,048,576
You have N apples, called Apple 1, Apple 2, Apple 3, ..., Apple N. The _flavor_ of Apple i is L+i-1, which can be negative. You can make an apple pie using one or more of the apples. The flavor of the apple pie will be the sum of the flavors of the apples used. You planned to make an apple pie using all of the apples...
['n,L = map(int,input().split())\nN=0\nG=0\nfor i in range(1,n):\n N +=(i+L-1)\nNN = N\nfor i in range(1,n):\n DD = NN - (L+i-1)\n if DD>G :\n G = DD\nprint(G)\n ', 'n, L = map(int, input().split())\nN = 0\nG = 999\nfor i in range(1, n+1):\n N += (i + L - 1)\nNN = N\nfor i in range(1, ...
['Wrong Answer', 'Accepted']
['s330060737', 's239056449']
[3064.0, 3064.0]
[17.0, 17.0]
[180, 220]
p02994
u388458865
2,000
1,048,576
You have N apples, called Apple 1, Apple 2, Apple 3, ..., Apple N. The _flavor_ of Apple i is L+i-1, which can be negative. You can make an apple pie using one or more of the apples. The flavor of the apple pie will be the sum of the flavors of the apples used. You planned to make an apple pie using all of the apples...
['N,L = map(int,input().split())\nderi = [L]\nfor num in range(0,N):\n deri.append(num)\n\nderi.sort()\naut = sum(deri,1)\nprint(aut)', 'N,L = map(int,input().split())\nderi = [L]\nfor num in range(1,N):\n num2 = L + num\n deri.append(num2)\n\nderi.sort() \nif (0 in deri) == True:\n deri.remove(0) \nelif su...
['Wrong Answer', 'Accepted']
['s056534257', 's939003932']
[2940.0, 3060.0]
[18.0, 17.0]
[127, 307]
p02994
u388971072
2,000
1,048,576
You have N apples, called Apple 1, Apple 2, Apple 3, ..., Apple N. The _flavor_ of Apple i is L+i-1, which can be negative. You can make an apple pie using one or more of the apples. The flavor of the apple pie will be the sum of the flavors of the apples used. You planned to make an apple pie using all of the apples...
['import numpy as np\nN,L = map(int,input().split())\nL_list=np.array(range(1,N+1))+L-1\nprint(sum(L_list))\nif (0 in L_list):\n print(sum(L_list))\n exit()\nif(N<=abs(L) and L<0):\n print(sum(L_list)-L_list[N-1])\n \n exit()\nelse:\n print(sum(L_list)-L_list[0])\n exit()', 'import numpy as np\nN,...
['Wrong Answer', 'Accepted']
['s283673828', 's959100202']
[27372.0, 26884.0]
[117.0, 113.0]
[279, 260]
p02994
u392938961
2,000
1,048,576
You have N apples, called Apple 1, Apple 2, Apple 3, ..., Apple N. The _flavor_ of Apple i is L+i-1, which can be negative. You can make an apple pie using one or more of the apples. The flavor of the apple pie will be the sum of the flavors of the apples used. You planned to make an apple pie using all of the apples...
['import math\nx = [int(s) for s in input().split()]\naji = [x[1]+i-1 for i in range(x[0])]\nsum = 0\nfor i in range(1,len(aji)):\n sum += aji[i]\nprint(sum)\n ', 'import math\nx = [int(s) for s in input().split()]\naji = [x[1]+i-1 for i in range(1,x[0]+1)]\nprint(aji)\nsum = 0\nif(0 in aji):\n for i in range...
['Wrong Answer', 'Wrong Answer', 'Accepted']
['s513326061', 's729421189', 's155777776']
[2940.0, 3064.0, 3064.0]
[17.0, 17.0, 17.0]
[157, 250, 467]
p02994
u396391104
2,000
1,048,576
You have N apples, called Apple 1, Apple 2, Apple 3, ..., Apple N. The _flavor_ of Apple i is L+i-1, which can be negative. You can make an apple pie using one or more of the apples. The flavor of the apple pie will be the sum of the flavors of the apples used. You planned to make an apple pie using all of the apples...
['n,l=map(int,input().split())\nv=[l+i-1for i in range(1,n+1)]\nprint(n,l,v)\nif l>=0:\n v.pop(0)\nelif n<=abs(l): \n v.pop(n-1)\nprint(sum(v))', 'n,l=map(int,input().split())\nv=[l+i-1for i in range(1,n+1)]\nif l>=0:\n v.pop(0)\nelif n<=abs(l): \n v.pop(n-1)\nprint(sum(v))\n']
['Wrong Answer', 'Accepted']
['s407733660', 's078358308']
[3060.0, 2940.0]
[18.0, 18.0]
[174, 162]
p02994
u405483159
2,000
1,048,576
You have N apples, called Apple 1, Apple 2, Apple 3, ..., Apple N. The _flavor_ of Apple i is L+i-1, which can be negative. You can make an apple pie using one or more of the apples. The flavor of the apple pie will be the sum of the flavors of the apples used. You planned to make an apple pie using all of the apples...
['N, L = map( int, input().split())\n\ni = min( 0, ( L - 1 ) )\nprint( N * ( L - 1 ) + N * ( N - 1 ) // 2 - i )', 'N, L = map( int, input().split())\n\n\nassumed_apple_pie = ( L - 1 ) * N + sum( range( 1, N + 1 ) )\n\n\n\nedible_apple = 0\nif L > 0:\n edible_apple = L\nelif ( L + N - 1 ) < 0:\n edible_apple = L + N -...
['Wrong Answer', 'Accepted']
['s962954937', 's859819839']
[2940.0, 3060.0]
[17.0, 17.0]
[106, 423]
p02994
u408262366
2,000
1,048,576
You have N apples, called Apple 1, Apple 2, Apple 3, ..., Apple N. The _flavor_ of Apple i is L+i-1, which can be negative. You can make an apple pie using one or more of the apples. The flavor of the apple pie will be the sum of the flavors of the apples used. You planned to make an apple pie using all of the apples...
['hoge = input().split()\nN = int(hoge[0])\nL = int(hoge[1])\n\nif L > 0:\n print("a")\n erase_apple = 0\nelif L+N-1 >= 0:\n for i in range(N):\n if i + L == 0:\n break\nelse:\n erase_apple = N-1\n\nprint(erase_apple)\napples = []\nfor i in range(N):\n apples.append(L+i)\n\napples.pop(erase_apple)\nprint(s...
['Runtime Error', 'Wrong Answer', 'Accepted']
['s576882357', 's833042545', 's102087517']
[3064.0, 3064.0, 3064.0]
[17.0, 18.0, 17.0]
[309, 362, 341]
p02994
u408375121
2,000
1,048,576
You have N apples, called Apple 1, Apple 2, Apple 3, ..., Apple N. The _flavor_ of Apple i is L+i-1, which can be negative. You can make an apple pie using one or more of the apples. The flavor of the apple pie will be the sum of the flavors of the apples used. You planned to make an apple pie using all of the apples...
['N, L = map(int, input().split())\nfor i in range(N):\n l.append(abs(L + i))\nl.sort()\nl.pop(0)\nprint(sum(l))', 'N, L = map(int, input().split())\nl = []\nfor i in range(N):\n l.append(L + i)\nl.sort()\nif 0 in l:\n print(sum(l))\nelse:\n if l[0] > 0:\n l.pop(0)\n print(sum(l))\n else:\n l.pop(-1)\n ...
['Runtime Error', 'Accepted']
['s069461919', 's518948132']
[2940.0, 2940.0]
[19.0, 18.0]
[106, 205]
p02994
u409064224
2,000
1,048,576
You have N apples, called Apple 1, Apple 2, Apple 3, ..., Apple N. The _flavor_ of Apple i is L+i-1, which can be negative. You can make an apple pie using one or more of the apples. The flavor of the apple pie will be the sum of the flavors of the apples used. You planned to make an apple pie using all of the apples...
['s = input()\n\nfor i in range(len(s)-1):\n if s[i] == s[i+1]:\n print("Bad")\n exit()\nelse:\n print("Good")', 'n,l = map(int,input().split())\nm = 300\n\nfor i in range(l,n+l):\n m = min(abs(m),abs(i))\n if i < 0:\n m *= -1\nelse:\n print(sum(range(l,n+l))-m)']
['Wrong Answer', 'Accepted']
['s707558619', 's430774554']
[3064.0, 3060.0]
[17.0, 17.0]
[121, 156]
p02994
u411858517
2,000
1,048,576
You have N apples, called Apple 1, Apple 2, Apple 3, ..., Apple N. The _flavor_ of Apple i is L+i-1, which can be negative. You can make an apple pie using one or more of the apples. The flavor of the apple pie will be the sum of the flavors of the apples used. You planned to make an apple pie using all of the apples...
['N, L = map(int, input().split())\n\ntaste = [i for i in range(N)]\n\nfor i in range(N):\n taste[i] = taste[i] + L\n \n \nsum_taste = sum(taste)\n\nresult = 10 ** 10\nfor i in range(N):\n if abs(sum_taste - taste[i]) < result:\n result = sum_taste - taste[i]\n \nprint(result)', 'N, L = map(int, input().split...
['Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Accepted']
['s300164575', 's482196824', 's723998091', 's838736522', 's000614201']
[3064.0, 3064.0, 3060.0, 2940.0, 3060.0]
[17.0, 17.0, 17.0, 17.0, 18.0]
[270, 270, 275, 191, 292]
p02994
u419963262
2,000
1,048,576
You have N apples, called Apple 1, Apple 2, Apple 3, ..., Apple N. The _flavor_ of Apple i is L+i-1, which can be negative. You can make an apple pie using one or more of the apples. The flavor of the apple pie will be the sum of the flavors of the apples used. You planned to make an apple pie using all of the apples...
['N,L=map(int,input().split())\nlis=[]\nfor i in range(N):\n lis.append(L+i)\nif 0 in lis:\n print(sum(lis))\nelse:\n lis2=sorted(lis)\n print(sum(lis2[1:-1])+min(lis2[0],lis2[-1]))', 'N,L=map(int,input().split())\nlis=[]\nfor i in range(N):\n lis.append(L+i)\nif 0 in lis:\n print(sum(lis))\nelse:\n ...
['Wrong Answer', 'Accepted']
['s233280394', 's544000207']
[3060.0, 3060.0]
[17.0, 17.0]
[183, 259]
p02994
u422994606
2,000
1,048,576
You have N apples, called Apple 1, Apple 2, Apple 3, ..., Apple N. The _flavor_ of Apple i is L+i-1, which can be negative. You can make an apple pie using one or more of the apples. The flavor of the apple pie will be the sum of the flavors of the apples used. You planned to make an apple pie using all of the apples...
['taste_all = 0\nlist1 = []\nN, L = map(int, input().split()) \nfor i in range(1,N+1):\n taste = L + i -1\n list1.append(taste)\n taste_all =taste_all + taste\nz = 10000000\nanser = 10000000\nb = 0\nc = 0\nfor j in range(N):\n a = list1.pop(j)\n b = sum(list1)\n z = abs(taste_all-b)\n anser = min(z...
['Wrong Answer', 'Accepted']
['s707143879', 's370179083']
[3064.0, 3064.0]
[17.0, 17.0]
[397, 319]
p02994
u425834921
2,000
1,048,576
You have N apples, called Apple 1, Apple 2, Apple 3, ..., Apple N. The _flavor_ of Apple i is L+i-1, which can be negative. You can make an apple pie using one or more of the apples. The flavor of the apple pie will be the sum of the flavors of the apples used. You planned to make an apple pie using all of the apples...
['i = list(map(int,input().split()))\nn = i[0]\nl = i[1]\n\nalist = []\ni = 1\n\nwhile i <= n:\n x = l + i - 1\n alist.append(x)\n i =+ 1\n \n \nj = 0\nabslist = []\nwhile j < n:\n abslist[j] = abs(alist[j])\n j =+ 1\n\n \n\nk = 0\nm = 0\nwhile k < n-1:\n if abslist[k] >= abslist[k+1]:\n m = k+1\n \n k =+...
['Time Limit Exceeded', 'Runtime Error', 'Time Limit Exceeded', 'Time Limit Exceeded', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted']
['s044452490', 's121374765', 's127545289', 's215337397', 's497466613', 's666413809', 's772192937', 's869450368']
[387096.0, 3060.0, 356888.0, 366872.0, 3060.0, 3060.0, 3060.0, 3060.0]
[2128.0, 20.0, 2128.0, 2128.0, 17.0, 17.0, 18.0, 17.0]
[340, 250, 273, 273, 252, 301, 264, 250]
p02994
u429003912
2,000
1,048,576
You have N apples, called Apple 1, Apple 2, Apple 3, ..., Apple N. The _flavor_ of Apple i is L+i-1, which can be negative. You can make an apple pie using one or more of the apples. The flavor of the apple pie will be the sum of the flavors of the apples used. You planned to make an apple pie using all of the apples...
['N, L = map(int, input().split())\n\nsum_N = N*((N+1)/2 + L - 1)\n\nif L >= 0 :\n print(sum_N - L)\nelif L + N - 1 < 0 :\n print(sum_N - (L + N - 1))\nelse :\n print(sum_N)\n', 'N, L = map(int, input().split())\n\nsum_N = N*((N+1)/2 + L - 1)\n\nif L >= 0 :\n print(sum_N - L)\nelse if L + N - 1 < 0 :\n print(sum_N...
['Wrong Answer', 'Runtime Error', 'Accepted']
['s232015610', 's909333131', 's644353150']
[2940.0, 2940.0, 2940.0]
[18.0, 17.0, 18.0]
[166, 168, 171]
p02994
u430414424
2,000
1,048,576
You have N apples, called Apple 1, Apple 2, Apple 3, ..., Apple N. The _flavor_ of Apple i is L+i-1, which can be negative. You can make an apple pie using one or more of the apples. The flavor of the apple pie will be the sum of the flavors of the apples used. You planned to make an apple pie using all of the apples...
['# -*- coding: utf-8 -*-\n\nN, L = map(int, input().split())\n\nA = [L+i-1 for i in range(1, N+1)]\n\nA_abs = [abs(x) for x in A]\nabs_min = min(A_abs)\nindex = A_abs.index(abs_min)\neat = A[index]\nprint(sum(A))\n\nans = sum(A) - eat\nprint(ans)', '# -*- coding: utf-8 -*-\n\nN, L = map(int, input().split())\n\nA = [L...
['Wrong Answer', 'Accepted']
['s694418737', 's910520531']
[3064.0, 3060.0]
[17.0, 17.0]
[232, 217]
p02994
u433532588
2,000
1,048,576
You have N apples, called Apple 1, Apple 2, Apple 3, ..., Apple N. The _flavor_ of Apple i is L+i-1, which can be negative. You can make an apple pie using one or more of the apples. The flavor of the apple pie will be the sum of the flavors of the apples used. You planned to make an apple pie using all of the apples...
['\ntastes = []\nfor i in range(n):\n tastes += [l+i]\n\n\nif 0 in tastes:\n print(sum(tastes))\nelse:\n \n tastes.sort(key=abs)\n print(sum(tastes[1:]))', '\nn, l = map(int, input().split())\n\n\ntastes = []\nfor i in range(n):\n tastes += [l+i]\n\n\nif 0 in tastes:\n print(sum(tastes))\nelse:\n ...
['Runtime Error', 'Accepted']
['s205351228', 's408289215']
[2940.0, 2940.0]
[17.0, 17.0]
[269, 304]
p02994
u437215432
2,000
1,048,576
You have N apples, called Apple 1, Apple 2, Apple 3, ..., Apple N. The _flavor_ of Apple i is L+i-1, which can be negative. You can make an apple pie using one or more of the apples. The flavor of the apple pie will be the sum of the flavors of the apples used. You planned to make an apple pie using all of the apples...
["# ABC131A\n\ns = input()\nif s[0] == s[1] or s[1] == s[2] or s[2] == s[3]:\n print('Bad')\nelse:\n print('Good')\n", '# ABC131B\n\nimport numpy as np\nn, l = map(int, input().split())\nx = l+np.arange(n)\nprint(sum(x) - x[np.argmin(abs(x))])\n']
['Runtime Error', 'Accepted']
['s148466663', 's019688377']
[2940.0, 12500.0]
[18.0, 152.0]
[113, 119]
p02994
u439676056
2,000
1,048,576
You have N apples, called Apple 1, Apple 2, Apple 3, ..., Apple N. The _flavor_ of Apple i is L+i-1, which can be negative. You can make an apple pie using one or more of the apples. The flavor of the apple pie will be the sum of the flavors of the apples used. You planned to make an apple pie using all of the apples...
['\nimport numpy as np\n\nN, L = map(int, input().input())\n\n\ndef taste(N, L):\n all = np.array([np.abs(L + i - 1) for i in range(1, N + 1)])\n return all\n\ntastes = taste(N, L)\nimport numpy as np\n\nN, L = map(int, input().input())\n\n\ndef taste(N, L):\n all = np.array([np.abs(L + i - 1) for i in range(1...
['Runtime Error', 'Runtime Error', 'Accepted']
['s246426050', 's935672092', 's410490663']
[12492.0, 12432.0, 13252.0]
[150.0, 149.0, 164.0]
[482, 346, 352]
p02994
u440478998
2,000
1,048,576
You have N apples, called Apple 1, Apple 2, Apple 3, ..., Apple N. The _flavor_ of Apple i is L+i-1, which can be negative. You can make an apple pie using one or more of the apples. The flavor of the apple pie will be the sum of the flavors of the apples used. You planned to make an apple pie using all of the apples...
['n,l = int(input())\ntastes = [(i + l) for i in range(n)]\nt = tastes.copy()\nfor j in range(n):\n t[j] = abs(t[j])\ndel tastes[t.index(min(t))]\nprint(sum(tastes))', 'n,l = map(int, input().split())\ntastes = [(i + l) for i in range(n)]\nt = tastes.copy()\nfor j in range(n):\n t[j] = abs(t[j])\ndel tastes[t.ind...
['Runtime Error', 'Accepted']
['s361115578', 's308554124']
[9084.0, 9048.0]
[25.0, 28.0]
[160, 173]
p02994
u443536265
2,000
1,048,576
You have N apples, called Apple 1, Apple 2, Apple 3, ..., Apple N. The _flavor_ of Apple i is L+i-1, which can be negative. You can make an apple pie using one or more of the apples. The flavor of the apple pie will be the sum of the flavors of the apples used. You planned to make an apple pie using all of the apples...
['N,L = map(int,input().split())\n eat = N - 1\n for m in range(N):\n if abs(L + m) < abs(L + eat):\n eat = m\naj = N*(N-1)//2\npie = (N-1)*L + aj - eat\nprint(pie)\n', 'N,L = map(int,input().split())\neat = N - 1\nfor m in range(N):\n if abs(L + m) < abs(L + eat):\n eat = m\naj = N*(N...
['Runtime Error', 'Accepted']
['s394438027', 's504496800']
[2940.0, 2940.0]
[17.0, 17.0]
[180, 164]
p02994
u443657910
2,000
1,048,576
You have N apples, called Apple 1, Apple 2, Apple 3, ..., Apple N. The _flavor_ of Apple i is L+i-1, which can be negative. You can make an apple pie using one or more of the apples. The flavor of the apple pie will be the sum of the flavors of the apples used. You planned to make an apple pie using all of the apples...
['n,l=map(int,input().split())\nt=[]\np=[]\nfor i in range(n):\n t.append(l+i)\n if l+i>=0:\n p.append(l+i)\nif p=[]:\n print(sum(t)-max(t))\nelse:\n print(sum(t)-min(p))\n', 'n,l=map(int,input().split())\nt=[]\np=[]\nfor i in range(n):\n t.append(l+i)\n if l+i>=0:\n p.append(l+i)\nif p=...
['Runtime Error', 'Accepted']
['s161854477', 's059123415']
[2940.0, 2940.0]
[17.0, 17.0]
[178, 179]
p02994
u447166124
2,000
1,048,576
You have N apples, called Apple 1, Apple 2, Apple 3, ..., Apple N. The _flavor_ of Apple i is L+i-1, which can be negative. You can make an apple pie using one or more of the apples. The flavor of the apple pie will be the sum of the flavors of the apples used. You planned to make an apple pie using all of the apples...
["N, L = map(int,input().split(' '))\n\narr = []\ntmp = L\nfor i in range(N):\n arr.append(tmp)\n tmp += 1\n\ntotal = 0\nif L + N < 0:\n arr.sort(reverse=True) \nprint(arr)\nif 0 in arr:\n arr.remove(0)\nelse:\n arr.pop(0)\n\nfor i in arr[:]:\n total += i\nprint(arr)\nprint(total)", "N, L = map(int,in...
['Wrong Answer', 'Accepted']
['s201040619', 's656243915']
[3064.0, 2940.0]
[17.0, 17.0]
[277, 185]
p02994
u448655578
2,000
1,048,576
You have N apples, called Apple 1, Apple 2, Apple 3, ..., Apple N. The _flavor_ of Apple i is L+i-1, which can be negative. You can make an apple pie using one or more of the apples. The flavor of the apple pie will be the sum of the flavors of the apples used. You planned to make an apple pie using all of the apples...
['num, t = map(int, input().split())\ntaste = []\nfindmin = []\n\nsum= 0\nfor i in range(len(num)):\n taste.append(t+i-1)\n sum += t+i-1\nfor j in range(len(taste)):\n findmin.append(j*j)\nm = findmin.index(min(findmin))\nprint(sum - taste[m])\n\n\n\n', 'num, t = map(int, input().split())\ntaste = []\nfindmin = []\n...
['Runtime Error', 'Runtime Error', 'Accepted']
['s276567272', 's411686741', 's073305138']
[2940.0, 3060.0, 3060.0]
[17.0, 17.0, 18.0]
[237, 241, 249]
p02994
u453623947
2,000
1,048,576
You have N apples, called Apple 1, Apple 2, Apple 3, ..., Apple N. The _flavor_ of Apple i is L+i-1, which can be negative. You can make an apple pie using one or more of the apples. The flavor of the apple pie will be the sum of the flavors of the apples used. You planned to make an apple pie using all of the apples...
['n, l = map(int, input().split())\n\naji = (l + l+n-1)*(n/2)\n\nif l >= 0 :\n ans = aji - l\n\nelif abs(l)-n >= 0 :\n ans = aji - (l+n-1)\nelse :\n ans = aji\n\nprint(ans)\n', 'n, l = map(int, input().split())\n\naji = (l + l+n-1)*(n/2)\n\nif l >= 0 :\n ans = aji - l\nelif l < 0 and l+n <= 0 :\n ans = a...
['Wrong Answer', 'Accepted']
['s593653953', 's208553986']
[2940.0, 2940.0]
[18.0, 17.0]
[168, 177]
p02994
u454632464
2,000
1,048,576
You have N apples, called Apple 1, Apple 2, Apple 3, ..., Apple N. The _flavor_ of Apple i is L+i-1, which can be negative. You can make an apple pie using one or more of the apples. The flavor of the apple pie will be the sum of the flavors of the apples used. You planned to make an apple pie using all of the apples...
["lst = input()\nlst = lst.split()\n\n\nfor i in range(len(lst)):\n lst[i]= int(lst[i])\nN = lst[0]\nL = lst[1]\nq = L\nl = 0\nlste = [abs(L)]\ntlst = []\nfor i in range(2,N+1):\n t = L+i-1\n q += t\n tlst.append(t)\n t = abs(t)\n lste.append(t)\n\n\nslst = sorted(lste)\nprint(slst)\nl = slst[0]\nif t...
['Wrong Answer', 'Wrong Answer', 'Accepted']
['s027771594', 's831577368', 's227702621']
[9208.0, 9156.0, 9160.0]
[27.0, 29.0, 28.0]
[365, 337, 337]
p02994
u455957070
2,000
1,048,576
You have N apples, called Apple 1, Apple 2, Apple 3, ..., Apple N. The _flavor_ of Apple i is L+i-1, which can be negative. You can make an apple pie using one or more of the apples. The flavor of the apple pie will be the sum of the flavors of the apples used. You planned to make an apple pie using all of the apples...
['n,l = map(int, input().split())\nL = [0]*n\n#l+i-1\nfor i in range(n):\n L[i] += l+i\n\nif(l < 0 and n + l < 0):\n print(sum(L) - L[n-1])\nelif(l =< 0 and n + l >= 0):\n print(sum(L))\nelse:\n print(sum(L) - L[0])\n', 'n , l = map(int, input().split())\nL = []\n\nfor i in range(n):\n L.append(i+l)\n\nif L[0] >...
['Runtime Error', 'Runtime Error', 'Accepted']
['s145382477', 's875315190', 's091143531']
[2940.0, 2940.0, 3064.0]
[17.0, 17.0, 17.0]
[207, 191, 191]
p02994
u460129720
2,000
1,048,576
You have N apples, called Apple 1, Apple 2, Apple 3, ..., Apple N. The _flavor_ of Apple i is L+i-1, which can be negative. You can make an apple pie using one or more of the apples. The flavor of the apple pie will be the sum of the flavors of the apples used. You planned to make an apple pie using all of the apples...
['N,L = map(int,input().split())\ncount = L\ntaste = []\nfor i in range(N):\n taste.append(count)\n count += 1\nif 0 in taste:\n taste.remove(0)\nelif N + L <= 0:\n taste.pop(-1)\nelse:\n taste.pop(0)\nprint(taste)', 'N,L = map(int,input().split())\ncount = L\ntaste = []\nfor i in range(N):\n taste.a...
['Wrong Answer', 'Accepted']
['s847423761', 's227654538']
[9124.0, 9180.0]
[25.0, 29.0]
[216, 221]
p02994
u460332457
2,000
1,048,576
You have N apples, called Apple 1, Apple 2, Apple 3, ..., Apple N. The _flavor_ of Apple i is L+i-1, which can be negative. You can make an apple pie using one or more of the apples. The flavor of the apple pie will be the sum of the flavors of the apples used. You planned to make an apple pie using all of the apples...
['n, l = map(int, input().split())\napples = [l+i-1 for i in range(n)]\napples.sort(key=lambda x: abs(x))\n\ndel apples[0]\nprint(sum(apples))', 'n, l = map(int, input().split())\napples = [l+i-1 for i in range(1, n+1)]\napples.sort(key=lambda x: abs(x))\n\ndel apples[0]\nprint(sum(apples))']
['Wrong Answer', 'Accepted']
['s125924689', 's074928468']
[2940.0, 3064.0]
[17.0, 17.0]
[135, 140]
p02994
u463950771
2,000
1,048,576
You have N apples, called Apple 1, Apple 2, Apple 3, ..., Apple N. The _flavor_ of Apple i is L+i-1, which can be negative. You can make an apple pie using one or more of the apples. The flavor of the apple pie will be the sum of the flavors of the apples used. You planned to make an apple pie using all of the apples...
['N, L = map(int,input().split())\ntaste = [ L + i for i in range(N) ]\n\nabs_min_taste = 9999\nmin_i = -1\nfor i in range(N):\n if abs_min_taste > abs(taste[i]):\n min_i = i\n abs_min_taste = abs(taste[i])\n\nsum_taste = sum(taste)\nans = sum_taste - taste[min_i]', 'N, L = map(int,input().split())\nta...
['Wrong Answer', 'Accepted']
['s687225523', 's325824249']
[3060.0, 3064.0]
[17.0, 18.0]
[268, 319]
p02994
u464912173
2,000
1,048,576
You have N apples, called Apple 1, Apple 2, Apple 3, ..., Apple N. The _flavor_ of Apple i is L+i-1, which can be negative. You can make an apple pie using one or more of the apples. The flavor of the apple pie will be the sum of the flavors of the apples used. You planned to make an apple pie using all of the apples...
['N, L = map(int,input().split())\n\nans == 0\nfor i in range(1,n+1):\n p = list[L+i-1]\n ans += p[i]\n\nprint(ans)', 'N, L = map(int,input().split())\n\ntotal = N*(2*L+N-1)\n\nif L>=0:\n\tsmall = L\nelif L<0 and L+N-1>=0:\n\tsmall = 0\nelse:\n\tsmall = L+N-1\nprint(total - small)\n\n', 'N, L = map(int,input().split(...
['Runtime Error', 'Wrong Answer', 'Accepted']
['s234646983', 's934978515', 's727916421']
[2940.0, 2940.0, 3060.0]
[17.0, 17.0, 17.0]
[108, 151, 152]
p02994
u468972478
2,000
1,048,576
You have N apples, called Apple 1, Apple 2, Apple 3, ..., Apple N. The _flavor_ of Apple i is L+i-1, which can be negative. You can make an apple pie using one or more of the apples. The flavor of the apple pie will be the sum of the flavors of the apples used. You planned to make an apple pie using all of the apples...
['n, l = map(int, input().split())\na = sorted([l + i for i in range(n)], key=abs)\nprint(sum(s[1:]))\n\n', 'n, l = map(int, input().split())\na = sorted([l + i - 1 for i in range(1, n-1)])\nprint(sum(a) - a[0] if abs(a[0]) > abs(a[-1]) else sum(a) - a[-1])\n', 'n, l = map(int, input().split())\na = sorted([l + i for i...
['Runtime Error', 'Runtime Error', 'Accepted']
['s304438157', 's426216991', 's574260388']
[9056.0, 9120.0, 9056.0]
[26.0, 30.0, 30.0]
[99, 147, 99]
p02994
u471212175
2,000
1,048,576
You have N apples, called Apple 1, Apple 2, Apple 3, ..., Apple N. The _flavor_ of Apple i is L+i-1, which can be negative. You can make an apple pie using one or more of the apples. The flavor of the apple pie will be the sum of the flavors of the apples used. You planned to make an apple pie using all of the apples...
['l = list(map(int,input().split()))\nN = l[0]\nL = l[1]\n\napple =[]\n\nfor i in range(N):\n apple.append(L + i)\n\nprint(apple)\npie = 0\nflag = 1\nmin = abs(L)\nfor i in range(N):\n pie = pie + apple[i]\n if abs(apple[i]) < min:\n min = abs(apple[i])\n if apple[i]<0:\n flag = -1\n ...
['Wrong Answer', 'Wrong Answer', 'Accepted']
['s433222825', 's508135065', 's145609820']
[3064.0, 3060.0, 3064.0]
[18.0, 17.0, 18.0]
[379, 265, 355]