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
u473092610
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=888\nSUM=0\ns=0\nfor i in range(l,l+n):\n SUM+=i\n s=i\n if i<0:\n s=1\n i*=-1\n else:\n s=-1\n if ans>i:\n ans=i\n print(i,ans)\ny=range(l,l+n)\nANS=SUM+s*ans\nprint(ANS)', 'n,l=map...
['Wrong Answer', 'Accepted']
['s558130650', 's455277961']
[3064.0, 3064.0]
[17.0, 18.0]
[290, 277]
p02994
u475675023
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(((l+n-1)*(l+n)-l*(l+1))//2-l if l>=0 else (((l+n-1)*(l+n)-l*(l+1))//2 if l<0 and l+n>0 ((l+n-1)*(l+n)-l*(l+1))//2-(l+n-1)))', 'n,l=map(int,input().split())\nm=[l+i for i in range(n)]\ns=sum(m)\nt=101\nd=0\nfor i in range(n):\n if t>abs(m[i]):\n t=abs(m[i])\n d=m[i]\nprint(s-...
['Runtime Error', 'Accepted']
['s110369023', 's122457187']
[3060.0, 3064.0]
[17.0, 18.0]
[158, 148]
p02994
u476494383
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\n\nif __name__ == '__main__':\n N, A = sys.argv[1:]\n assert 2<=int(N)<=200\n assert -100<=int(A)<=100\n\n L = int(A)\n R = int(A)+int(N)-1\n\n if R <= 0:\n eat = R\n elif L >= 0:\n eat = L\n else:\n eat = 0\n\n ans = (R+L)*(R-L+1)//2-eat\n print(ans)\n", ...
['Runtime Error', 'Accepted']
['s435127461', 's621016605']
[3060.0, 3060.0]
[17.0, 18.0]
[296, 291]
p02994
u494379309
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\napple = list(range(L,L+N))\n\ns = sum(apple)\n\nm = 1000000000000000000\nfor x in apple:\n if abs(m) > abs(x):\n m = abs(x)\n\nprint(s-x)', 'N,L = list(map(int,input().split(" ")))\n\napple = list(range(L,L+N))\n\ns = sum(apple)\n\nm = 10000000000000\nfor x in apple:\n ...
['Wrong Answer', 'Accepted']
['s876105361', 's201903577']
[3060.0, 3060.0]
[18.0, 17.0]
[173, 163]
p02994
u502011586
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())\naji = [abs(L+i-1) for i in range(1,N+1)]\nminaji = max(aji)\nno = 0\nfor i in range(N):\n if aji[i] < minaji:\n no = i + 1\n minaji = aji[i]\nprint(no)', 'N,L = map(int,input().split())\naji1 = [L+i-1 for i in range(1,N+1)]\naji = [abs(L+i-1) for i in range(1,N+1)]\n\n...
['Wrong Answer', 'Accepted']
['s227257062', 's497449795']
[3060.0, 3064.0]
[17.0, 17.0]
[192, 264]
p02994
u502389123
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\nsums = 0\nfor i in range(N):\n sums += L + i\n\nans = 10 ** 9\nfor i in range(N):\n num = L + i\n if cnt >= abs(num):\n cnt = abs(num)\n ans = sums - num\n\nprint(ans)\n', 'N, L = map(int, input().split())\n\nsums = 0\nfor i in range(N):\n sums += L + i\n\nans = 10 ** 9\n...
['Runtime Error', 'Wrong Answer', 'Accepted']
['s371761800', 's432696904', 's437661355']
[2940.0, 2940.0, 3060.0]
[22.0, 17.0, 17.0]
[200, 164, 214]
p02994
u502731482
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())\ndata = [l] * n\nans = 0\n\nfor i in range(n):\n data[i] += i\n ans += data[i]\n\nmini = abs(data[0])\ntemp = data[0]\nprint(ans)\nprint(data)\nfor i in range(n):\n if mini > abs(data[i]):\n mini = abs(data[i])\n temp = data[i]\n\nprint(ans - temp)\n', 'n, l =...
['Wrong Answer', 'Accepted']
['s893564591', 's581991602']
[3060.0, 9172.0]
[17.0, 28.0]
[289, 160]
p02994
u507613674
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, bisect, math, heapq\n\nstdin = sys.stdin\nread_int = lambda : list(map(int,stdin.readline().split()))\n\nN, L = read_int()\n\napples = [L + i for i in range(N)]\nprint(apples)\ntasteN = sum(apples)\nprint(tasteN)\nINF = float(\'INF\')\ndef solve():\n res = INF\n for a in apples:\n res = min(r...
['Wrong Answer', 'Accepted']
['s298112617', 's847836342']
[3064.0, 3060.0]
[18.0, 18.0]
[441, 394]
p02994
u508273185
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_list = []\nfor i in range(1,n+1):\n #print(i)\n a_list.append(l+i-1)\nif int(a_list[0])>0:\n a_list.remove(a_list[0])\nif 0 in a_list:\n a_list.remove(0)\nif int(a_list[n-1])<0:\n a_list.remove(a_list[n-1])\nprint(sum(a_list))', 'n,l = map(int,input().split())\na_list ...
['Runtime Error', 'Accepted']
['s482768356', 's480062721']
[3064.0, 3064.0]
[17.0, 17.0]
[264, 423]
p02994
u511449169
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())\ndic = []\nall_sum = sum([j + l -1 for j in range(1, n+1)])\nfor i in range(1, n+1):\n item = [j + l -1 for j in range(1, n+1) if j != i]\n dic.append(sum(item))\ndist = abs(all_sum - dic[0])\nfor j in dic:\n tmp = abs(all_sum - j)\n if j < dist:\n dist = j\nprint(dist)', 'n, l...
['Wrong Answer', 'Accepted']
['s112069141', 's261739440']
[3064.0, 3064.0]
[19.0, 18.0]
[299, 327]
p02994
u519604525
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...
['30 -50', 'N, L=map(int, input().split())\nif L>0:\n A=(N-1)*L+N*(N-1)/2\nelif N+L<=0:\n A=(N-1)*L+(N-1)*(N-2)/2\nelse:\n A=(L*2+N-1)*N/2\nprint(int(A))']
['Wrong Answer', 'Accepted']
['s568911597', 's746338879']
[3068.0, 3060.0]
[17.0, 17.0]
[6, 143]
p02994
u519939795
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=[l+i for i in range(n)]\nans=min(t)\nprint(ans)\nfor i in t:\n if abs(i)<abs(ans):\n ans=i\nt.remove(ans)\nprint(sum(t))', 'n,l=list(map(int,input().split()))\nt=[l+i-1 for i in range(1,n+1)]\nif t[0]>=0:\n print(sum(t[1:]))\nelif t[-1]<=0:\n print(sum(t[:-1]))\nelse:\n...
['Wrong Answer', 'Accepted']
['s690167380', 's344989149']
[3060.0, 3064.0]
[17.0, 17.0]
[154, 162]
p02994
u527261492
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())\nd=114514\nnum=114514\nfor j in range(n):\n if abs(l+j)<d:\n d=abs(l+j)\n num=j\ns=0\nfor i in range(n-1):\n s+=1\nprint(s+(n-1)*l-num)\n', 'n,l=map(int,input().split())\nd=114514\nnum=114514\nfor j in range(n):\n if abs(l+j)<d:\n d=abs(l+j)\n num=j\ns=0\nfor i in range(n):...
['Wrong Answer', 'Wrong Answer', 'Runtime Error', 'Accepted']
['s139343453', 's328504256', 's928274281', 's613926796']
[3060.0, 2940.0, 2940.0, 2940.0]
[17.0, 18.0, 17.0, 17.0]
[163, 161, 159, 161]
p02994
u538956308
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 Aji = list(range(L+1,L+N))\n ans = sum(Aji)\n print(Aji)\n print(ans)\nelif L<0 and L+N >= 1:\n Aji = list(range(L,L+N))\n ans = sum(Aji)\n print(Aji)\n print(ans)\nelse:\n Aji = list(range(L,L+N-1))\n ans = sum(Aji)\n print(Aji)\n print(...
['Wrong Answer', 'Accepted']
['s692070521', 's678932126']
[3064.0, 3064.0]
[17.0, 17.0]
[307, 262]
p02994
u546686251
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())\nflavor = []\nimport numpy as np\nfor i in range(1, N + 1):\n flavor.append(L + i - 1)\nfor j in flavor:\n if abs(j) == min(np.abs(flavor)):\n eat = j\nprint(sum(flavor) - j)\n\n', 'N, L = map(int, input().split())\nflavor = []\nfor i in range(1, N + 1):\n flavor.appen...
['Wrong Answer', 'Runtime Error', 'Wrong Answer', 'Accepted']
['s459364905', 's767032658', 's924127289', 's797603122']
[12508.0, 2940.0, 12504.0, 12508.0]
[150.0, 18.0, 149.0, 150.0]
[214, 139, 166, 216]
p02994
u546853743
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())\ns = N*L+sum(1,N+1)-N\nK=[]\nfor i in range(1,N+1): \n K.append(L+i-1)\nif 0 <= K[0]:\n s -= K[0]\nelif K[0]<0 and K[N-1]>0:\n s = s\nelse:\n s -= K[N-1]\nprint(s)', "N,L=map(int,input().split())\ns = N*L+sum(1,N+1)-N\nK=''\nfor i in range(1,N+1): \n K.append(L+i-1)\nif 0...
['Runtime Error', 'Runtime Error', 'Accepted']
['s009648967', 's722611773', 's881761382']
[9112.0, 9120.0, 9012.0]
[27.0, 24.0, 29.0]
[194, 194, 221]
p02994
u548303713
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=[0] \nsum1=0\nfor i in range(1,N+1): \n a=L+i-1\n sum1+=a\n taste.append(a)\n\n#print(sum1)\n#print(taste)\n\nans=0\nbest=100000\nfor i in range(1,N+1):\n sum2=sum1-taste[i]\n dif=abs(sum1-sum2)\n if dif<best:\n best=dif\n ans=sum2\nprint(sum2)', 'N,...
['Wrong Answer', 'Accepted']
['s405628034', 's799902041']
[3064.0, 3064.0]
[17.0, 17.0]
[316, 384]
p02994
u548545174
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 = float("inf")\n\nfor i in range(1, N+1):\n before = sum([L+k-1 for k in range(1, N+1)])\n after = sum([L+j-1 for j in range(1, N+1) if j != i])\n\n ans = min(ans, abs(before-after))\n \nprint(ans)\n', 'N, L = map(int, input().split())\n\ndiff = float("inf")\nans = ...
['Wrong Answer', 'Accepted']
['s003065806', 's541533804']
[3060.0, 3060.0]
[19.0, 20.0]
[240, 287]
p02994
u551692187
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())\nallsum = N/2*(2*L+(N-1))\neat = 0\nif L >= 0:\n eat = L\nelif L + N >= 1:\n eat = 0\nelse:\n eat = L + N - 1\nprint(allsum - eat)', 'N,L = map(int, input().split())\nallsum = N//2*(2*L+(N-1))\neat = 0\nif L >= 0:\n eat = L\nelif L + N >= 1:\n eat = 0...
['Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Accepted']
['s161422360', 's259825430', 's895523369', 's356607984']
[3060.0, 3060.0, 3060.0, 3060.0]
[17.0, 17.0, 17.0, 17.0]
[174, 175, 175, 179]
p02994
u551901148
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 = input().split()\n\ndef apple_aji(i):\n return int(l) + int(i) - 1\n\ndef apple_pie(n):\n ajis = [apple_aji(x) for x in n]\n ajis.sort()\n mini = min([abs(x) for x in ajis])\n ajis.remove(mini)\n return sum(ajis)\n\nprint(apple_pie(range(1, int(n))))\n', 'n, l = input().split()\n\ndef apple_aji(i):\n ret...
['Runtime Error', 'Wrong Answer', 'Runtime Error', 'Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Accepted']
['s196217711', 's324595795', 's330389739', 's346538939', 's692252684', 's759455612', 's858899813', 's989155099', 's982915867']
[2940.0, 2940.0, 3060.0, 2940.0, 2940.0, 2940.0, 3060.0, 3064.0, 3060.0]
[17.0, 17.0, 17.0, 17.0, 17.0, 17.0, 19.0, 17.0, 17.0]
[251, 200, 234, 183, 203, 180, 291, 338, 329]
p02994
u554784585
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())\nli=[]\nfor i in range(N):\n li.append(L+i+1-1)\n\nli.sort()\nS=sum(li)\nfor j in range(N-1):\n if abs(li[j])<=abs(li[j+1]):\n S-=li[j]\n print(li[j])\n break\n\nif j==N-2:\n S-=li[N-1]\n\nprint(S)\n', 'N,L=map(int,input().split())\nli=[]\nfor i in range(N):\...
['Wrong Answer', 'Runtime Error', 'Accepted']
['s291969473', 's533526318', 's470390888']
[8992.0, 8916.0, 9192.0]
[31.0, 27.0, 26.0]
[241, 233, 243]
p02994
u562550538
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...
['a,b=map(int,input().split())\nans=0\nif b<0:\n\tans=(b+a+b-1)*a/2\nelse:\n\tans=(b+1+a+b-1)*(a-1)/2\n\nprint(ans)', 'a,b=map(int,input().split())\nans=0\nlist=[i+b-1 for i in range(1,a+1)]\nlist.sort(key=lambda i:abs(i))\nans=sum(list[1:])\nprint(ans)']
['Wrong Answer', 'Accepted']
['s316196489', 's388541797']
[2940.0, 2940.0]
[17.0, 17.0]
[104, 129]
p02994
u565711859
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 = [x+L for x in range(N)]\nprint(sum(a) - min(a, map(abs, a)))\n', 'N, L = map(int, input().split())\na = [x+L for x in range(N)]\nprint(sum(a) - min(a, key=lambda x:abs(x)))\n']
['Runtime Error', 'Accepted']
['s813995453', 's537650572']
[3188.0, 2940.0]
[18.0, 17.0]
[97, 105]
p02994
u572193732
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_all = 0\nfor i in range(N):\n sum_all += L + i\n\nif L >= 0:\n ans = sum_all - L\nelif N <= abs(L):\n ans = sum_all - (L + N - 1)\nelse:\n ans = sum_all\n\nprint(ans)\nprint(sum_all)', 'N, L = map(int, input().split())\n\nsum_all = 0\nfor i in range(N):\n sum_all...
['Wrong Answer', 'Accepted']
['s291445371', 's066688265']
[3060.0, 3060.0]
[18.0, 19.0]
[220, 205]
p02994
u572940434
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())\nsumL = 0\nmainasu = 0\nplus = 0\naji = []\nfor i in range(N):\n aji.append(L + i)\n sumL += L + i\n if L + i == 0:\n count = 1\n elif L + i < 0:\n mainasu += 1\n elif L + i > 0:\n plus += 1\nif count == 1:\n print(sumL)\nelif mainasu > plus :\n print(sumL-max((aji)))\n...
['Runtime Error', 'Accepted']
['s113047451', 's932148108']
[3064.0, 3064.0]
[17.0, 18.0]
[333, 340]
p02994
u588085553
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...
["from sys import stdin\n\n# N, L = stdin.readline().rstrip()\nN, L = map(int, input().split(' '))\nprint(N, L)\n# N, L = 5, 2\n# N, L = 3, -1\n# N, L = 30, -50\n\nmin_value = L\nmax_value = L + N - 1\n\nsummation = L * N + sum(range(N))\n\nif (min_value < 0) and (0 < max_value):\n pass\nelif (min_value > 0):\n s...
['Wrong Answer', 'Runtime Error', 'Runtime Error', 'Accepted']
['s055619809', 's373655828', 's577196677', 's904700403']
[3064.0, 3060.0, 3060.0, 3060.0]
[17.0, 17.0, 17.0, 17.0]
[393, 348, 322, 395]
p02994
u589578850
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_int = n * (n +1) / 2 + ( l - 1 ) * n\n\nif 0 < l :\n\tresult = taste_int - l\nelif l < -1 * n :\n\tresult = taste_int - (n + l -1 )\nelse:\n\tresult = taste_int\n\nprint( result)', 'n,l = map(int,input().split())\n\ntaste_int = int(n * (n +1) / 2 + ( l - 1 ) * n)\n\nif 0 <=...
['Wrong Answer', 'Accepted']
['s315908353', 's913152123']
[3060.0, 3060.0]
[19.0, 17.0]
[206, 213]
p02994
u596101798
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 \ntotal = 0\nmin_taste = 1000000000\n \nfor i in range(n):\n taste = l + i\n total += taste\n if abs(taste) < abs(min_taste):\n min_taste = taste\n \nprint(total - dis_min)', 'n, l = map(int, input().split())\n \ntotal = 0\nmin_taste = 1000000000\n \nfor i in range(n...
['Runtime Error', 'Accepted']
['s896942952', 's094013685']
[3060.0, 3060.0]
[17.0, 17.0]
[212, 214]
p02994
u596331001
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\nNazi=[]\n\nfor i in range(N+1):\n azi=L+i-1\n Nazi.append(azi)\ndel Nazi[0]\n\nsum=0\nif L>0:\n del Nazi[0]\n print(sum(Nazi))\nelse:\n for i in Nazi:\n sum+=i\n sum=(sum-Nazi[-1])\n print(sum)', 'N,L=input().split()\n\n\nApplesTaste=[]\nfor i in range(int(...
['Runtime Error', 'Accepted']
['s238163773', 's832282183']
[3064.0, 3064.0]
[17.0, 17.0]
[237, 519]
p02994
u600402037
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())\nlist1 = []\nfor i in range(1, n+1):\n list1.append(l + i - 1)\nsum(list1) - min(filter(abs, list1))', 'import sys\n\nsr = lambda: sys.stdin.readline().rstrip()\nir = lambda: int(sr())\nlr = lambda: list(map(int, sr().split()))\n\nN, L = lr()\ntotal = sum(range(L, L+N))\nsub = min(...
['Wrong Answer', 'Accepted']
['s040460721', 's794089628']
[2940.0, 3060.0]
[17.0, 17.0]
[132, 211]
p02994
u609061751
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=input().split()\nN=int(N)\nL=int(L)\nA=0\nB=[]\nC=[]\nfor j in range(1,N+1):\n A+=L+j-1\nfor i in range(1,N+1):\n if L+i-1>=0:\n B.append(L+i-1)\n else:\n C.append(L+i-1)\nif min(B)<=abs(max(C)):\n print(A-min(B))\nelse:\n print(A-max(C))', 'N,L=input().split()\nN=int(N)\nL=int(L)\nA=...
['Runtime Error', 'Runtime Error', 'Accepted']
['s442703775', 's835474795', 's280455382']
[3064.0, 2940.0, 3060.0]
[17.0, 18.0, 17.0]
[255, 161, 170]
p02994
u611090896
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 =[]\nfor i in range(1,N+1):\n LL.append(L+i-1)\nLLL=[]\nfor j in LL:\n LLL.append(abs(sum(LL)-j))\nLLLL=sorted(LLL)\nprint(sum(LL)-LLLL[0])', 'N,L = map(int,input().split())\nl = []\nll = []\nfor i in range(1,N+1):\n l.append(L+i-1)\n ll.append(abs(L+i-1))\na = l.index(min(ll))\...
['Wrong Answer', 'Runtime Error', 'Accepted']
['s602248299', 's620784256', 's268656127']
[9136.0, 9116.0, 9060.0]
[30.0, 26.0, 28.0]
[168, 147, 154]
p02994
u620846115
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(1,N+1):\n a.append(L+i-1)\nb = []\nfor i in a:\n b.append(abs(i))\nfor i in range(1,N+!):\n if abs(L+i-1) == min(b):\n print(sum(a)-L-i+1)', 'N,L = map(int,input().split())\na = []\nfor i in range(N):\n a.append(L+i-1)\nb = []\nfor i in a:\n b.append(abs(...
['Runtime Error', 'Wrong Answer', 'Runtime Error', 'Runtime Error', 'Accepted']
['s414713006', 's438671441', 's449481372', 's688435509', 's542280178']
[8924.0, 9132.0, 8872.0, 8920.0, 9072.0]
[24.0, 26.0, 25.0, 25.0, 28.0]
[190, 182, 180, 181, 190]
p02994
u623065116
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())\npie = 0\ncomp = 300\n\nfor i in range(1, n+1):\n pie = pie + l + i - 1\n if abs(l + i -1) < comp:\n comp = l + i -1\n print(comp)\n\nprint(pie - comp)\n', 'n, l = map(int, input().split())\npie = 0\ncomp = 300\n\nfor i in range(1, n+1):\n pie = pie + l + i - 1\...
['Wrong Answer', 'Accepted']
['s826685941', 's008632906']
[2940.0, 2940.0]
[18.0, 18.0]
[195, 180]
p02994
u626228246
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 = []\ntmp = []\nfor i in range(1,N+1):\n\ttmp.append(abs(L + i -1))\n\ttaste.append((L + i -1))\nnum = tmp.index(min(tmp)) \ntaste[num] = 0\nprint(taste)\nprint(sum(taste))', 'N,L = map(int,input().split())\ntaste = tmp = []\nfor i in range(1,N):\n tmp.append(abs(L + i -1))\n t...
['Wrong Answer', 'Runtime Error', 'Accepted']
['s073580531', 's513529691', 's754382292']
[3060.0, 2940.0, 3060.0]
[17.0, 17.0, 17.0]
[199, 189, 186]
p02994
u627234757
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)]\nprint(taste)\ntmp = 9999\nfor t in taste:\n if abs(t) < tmp:\n tmp = t\nres = sum(taste) - tmp\nprint(res)\n', 'n, l = map(int, input().split())\ntaste = [l+i-1 for i in range(n)]\neaten = 9999\nfor t in taste:\n if abs(t) < eaten:\n eaten = t...
['Wrong Answer', 'Wrong Answer', 'Runtime Error', 'Accepted']
['s352814520', 's380054656', 's776265015', 's731394265']
[9168.0, 9116.0, 2940.0, 9044.0]
[24.0, 27.0, 18.0, 27.0]
[170, 166, 253, 211]
p02994
u628707847
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())\ntast = list(range(1,n+1))\ntast = list(map(lambda x: l+x-1,tast))\ns = sum(tast)\nans = 10**12\n\nfor i in range(n):\n tmp = sum([y if tast[i]!=y else 0 for y in tast])\n if ans >= abs(s -tmp):\n ans = abs(s -tmp)\n\nprint(ans)\n', 'n,l = map(int,input().split())\ntastes =...
['Wrong Answer', 'Accepted']
['s463134273', 's328978027']
[3060.0, 3064.0]
[19.0, 18.0]
[262, 270]
p02994
u629540524
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,a = map(int,input().split())\nprint(int(a*(n-1)+n/2*(n-1)-1-n))', 'n,a = map(int,input().split())\nprint(a*(n-1)+n/2*(n-1)-1-n)', 'n,a = map(int,input().split())\nx = [a+i-1+1 for i in range(n)]\ny = sorted(x, key=lambda i: abs(i))\ndel y[0]\nprint(sum(y))']
['Wrong Answer', 'Wrong Answer', 'Accepted']
['s264688128', 's714791638', 's757243041']
[9136.0, 9052.0, 9080.0]
[30.0, 28.0, 28.0]
[64, 59, 121]
p02994
u632413369
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\nn, l = map(int, input().split())\na_l = [l + i for i in range(n)]\n\nmin1 = 100\nmin2 = 10000\n\nfor j in a_l:\n if j ** 2 <= min2:\n min2 = j **2\n min1 = j\nprint(sum(a_l) - j)\n ', 'import math\nn, l = map(int, input().split())\na_l = [l + i for i in range(n)]\n\nmin1 = 100\nmin2 =...
['Wrong Answer', 'Accepted']
['s936076163', 's794256799']
[3060.0, 3060.0]
[18.0, 18.0]
[202, 200]
p02994
u632423548
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 = input().split()\napples = [x + int(L) for x in list(range(int(N)))]\nabs_min_index = [abs(x) for x in apples].index(min(abs_apples))\nprint(sum(apples) - apples[abs_min_index])', 'N, L = input().split()\napples = [x + int(L) for x in list(range(int(N))\nabs_apples = [abs(x) for x in apples]\nabs_min_index = ab...
['Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted']
['s081840696', 's443782496', 's453014826', 's687217562', 's668481427']
[3060.0, 2940.0, 2940.0, 2940.0, 2940.0]
[17.0, 17.0, 17.0, 17.0, 18.0]
[180, 202, 144, 203, 204]
p02994
u635538726
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...
['# 190622_sat_B\n\nN, L = map(int,input().split())\n\na = []\nb = []\n\nfor i in range(1, N+1):\n a.append(L+i-1)\n b.append(abs(L+i-1))\n\n# print("a: ", a)\n\n\nprint("answer:", sum(a) - a[b.index(min(b))])', '# 190622_sat_B\n\nN, L = map(int,input().split())\n\na = []\nb = []\n\nfor i in range(1, N+1):\n a...
['Wrong Answer', 'Accepted']
['s738315550', 's769032445']
[3060.0, 2940.0]
[17.0, 18.0]
[221, 258]
p02994
u635540732
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-1)*(2*l+n)/2)\nelif n > abs(l):\n print(n*(2*l+n-1)/2)\nelse:\n print((n-1)*(2*l+n-2)/2)', 'n,l = map(int,input().split())\nif l >= 0:\n print(int((n-1)*(2*l+n)/2))\nelif n > abs(l):\n print(int(n*(2*l+n-1)/2))\nelse:\n print(int((n-1)*(2*l+n-2)/2))']
['Wrong Answer', 'Accepted']
['s475806086', 's886279697']
[3060.0, 3060.0]
[17.0, 18.0]
[139, 154]
p02994
u636775911
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=[int(i) for i in input().split()]\narray=[]\nabs_array=[]\nfor i in range(n[0]):\n array.append(n[1]+i-1)\n abs_array.append(abs(n[1]+i-1))\nabs_array=abs_array.sort()\nif(abs_array[0] in array == True):\n print(sum(array)-abs_array[0])\nelse:\n print(sum(array)+abs_array[0])', 'n=[int(i) for i in input().split...
['Runtime Error', 'Accepted']
['s770056835', 's793278637']
[3060.0, 3060.0]
[18.0, 17.0]
[272, 258]
p02994
u645250356
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())\nmin_abs = 10**9\ntmp = 10**9\nfor i in range(n):\n if abs(l + i) < min_abs:\n min_abs = abs(l+i)\n tmp = i\nprint(min_abs)\nans = 0\nfor i in range(n):\n if i == tmp:\n continue\n else:\n ans += l + i\n\nprint(ans)', 'n,l = map(int,input().split())\...
['Wrong Answer', 'Accepted']
['s545634636', 's416234621']
[3064.0, 3060.0]
[18.0, 18.0]
[268, 253]
p02994
u651803486
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 copy\n\nN, L = map(int, input().split())\n\napple_taste = [L+i for i in range(N)]\nprint(apple_taste)\n\npie_taste = sum(apple_taste)\n\nmin_diff = 100000\nfor i in range(N):\n ap = copy.deepcopy(apple_taste)\n ap[i] = 0\n\n pie_taste2 = sum(ap)\n diff = abs(pie_taste - pie_taste2)\n\n min_diff ...
['Wrong Answer', 'Accepted']
['s505603806', 's962959738']
[3444.0, 2940.0]
[29.0, 17.0]
[351, 230]
p02994
u652656291
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)]\nA.sort(a: abs(a))\n\nprint(sum(A)-A[0])\n', 'N, L = map(int, input().split())\n\nA = [L + i for i in range(N)]\nA.sort(key=lambda a: abs(a))\n\nprint(sum(A) - A[0])\n']
['Runtime Error', 'Accepted']
['s375718312', 's325407797']
[2940.0, 3064.0]
[17.0, 17.0]
[97, 115]
p02994
u653807637
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()))\nts = [l + i - 1 for i in range(1, n + 1)]\nprint(sum(ts) + min([abs(x) for x in ts]))', 'n, l = list(map(int, input().split()))\n\ntastes = [l + i - 1 for i in range(1, n + 1)]\nsum_tastes = sum(tastes)\nsum_tastes_eat = [sum_tastes - tastes[i] for i in range(n)]\ndif_tastes = ...
['Wrong Answer', 'Accepted']
['s447632401', 's102404851']
[3060.0, 3064.0]
[17.0, 18.0]
[123, 315]
p02994
u656917242
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 = input().split()\nN = int(N)\nL = int(L)\n\nNsum=0\nsum=0\nfor i in range(N):\n Nsum+=L+i\n\nsa=1000000000\nfor i in range(N):\n a = (L+i-1)\n if(a<0):\n a=-a\n if(sa > a):\n sa=a\n\nprint(Nsum-sa)', 'N, L = input().split()\nN = int(N)\nL = int(L)\n\nNsum=0\nsum=0\nfor i in range(N):\n ...
['Wrong Answer', 'Accepted']
['s424439276', 's068331066']
[3064.0, 3064.0]
[17.0, 18.0]
[210, 245]
p02994
u657329920
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...
['a = input().split()\nN, L = [int(i) for i in a]\nfor i in range(N):\n dif = abs(L+i-1)\n m = 0\n if dif < abs(L+m):\n m = i\n else:\n continue\nsol = (N-1)*L + (N-1)*N/2 - (L+m-1)\nprint(int(sol))', 'a = input().split()\nN, L = [int(i) for i in a]\nl = []\nfor i in range(1,N+1):\n dif = abs(L+i-1)\n l.app...
['Wrong Answer', 'Accepted']
['s919698789', 's807886224']
[3060.0, 3060.0]
[17.0, 18.0]
[196, 183]
p02994
u661977789
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())\nsum = 0\nfor i in range(N+1):\n sum += L\n L += 1\nprint(sum)', 'N, L = map(int,input().split())\nsum = 0\nfor i in range(N):\n sum += L\n L += 1\nprint(sum - L)', 'N, L = map(int,input().split())\nsum = 0\nfor i in range(N + 1):\n sum += L\n L += 1\nprint(sum)', 'N, L = map(int...
['Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Accepted']
['s012472897', 's259505245', 's674502295', 's685114074', 's794521919', 's092302694']
[3064.0, 2940.0, 2940.0, 2940.0, 2940.0, 3064.0]
[17.0, 17.0, 18.0, 18.0, 17.0, 18.0]
[91, 93, 93, 89, 97, 250]
p02994
u662430503
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 = list(map(int,input().split()))\n ans=0\n if l>0:\n for i in range(2,n+1):\n print(l+i-1)\n ans+= l+i-1\n else:\n for i in range(1,n+1):\n ans+=l+i-1\n print(ans) \nmain()', 'def main():\n n,l = list(map(int,input().split()))\n ans=0\n if l>0:\n for i in range(2,n+1...
['Wrong Answer', 'Wrong Answer', 'Accepted']
['s736073982', 's811303320', 's920812291']
[9080.0, 9144.0, 9056.0]
[29.0, 30.0, 28.0]
[206, 262, 246]
p02994
u663014688
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())\naji_list = []\n\nfor i in range(N):\n aji = L + i - 1\n aji_list.append(aji)\n\naji_list = sorted(aji_list)\naji_list = set(aji_list)\n\naji_list.remove(min(aji_list))\n\nprint(sum(aji_list))', 'N,L = map(int, input().split())\naji_list = []\n\nfor i in range(N):\n aji = L + ...
['Wrong Answer', 'Wrong Answer', 'Accepted']
['s186372117', 's729606915', 's894410931']
[3060.0, 3060.0, 3064.0]
[17.0, 18.0, 17.0]
[218, 250, 430]
p02994
u663146637
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())\neat = L + N - 1\nif eat > 0:\n eat = L\n if not eat > 0:\n eat = 0\n\nprint(1/2*N*(N-1)+(L-1)*N-eat)', 'N, L = map(int, input().split())\neat = L + N - 1\nif eat > 0:\n eat = L\n if eat < 0:\n eat = 0\n\nprint("%d" % (1/2*N*(N+1)+(L-1)*N-eat))']
['Wrong Answer', 'Accepted']
['s849659238', 's053065890']
[2940.0, 2940.0]
[17.0, 17.0]
[132, 137]
p02994
u677400065
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...
['a,b = map(int,input().split())\nmx = 100000000\nsum = 0\nfor i in range(n):\n mx = min(mx,abs(b+i-1))\n sum+=b+i-1\nprint(sum-mx)\n ', 'a,b = map(int,input().split())\nmx = 100000000\nsum = 0\nflag = False\nfor i in range(1,a+1):\n if mx > abs(b+i-1):\n mx = abs(b+i-1)\n if b+i-1 < 0 :\n flag =...
['Runtime Error', 'Accepted']
['s890797399', 's006391049']
[2940.0, 3316.0]
[17.0, 21.0]
[128, 246]
p02994
u681110193
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 print((2*L+N)*(N-1)/2)\n \nelif L+N-1 < 0:\n print((2*L+N-2)*(N-1)/2)\n\nelse:\n print((2*L+N-1)*(N-1)/2)\n ', 'N,L = map(int,input().split())\n\nif L >= 0:\n print(int((2*L+N)*(N-1)/2))\n \nelif L+N-1 < 0:\n print(int((2*L+N-2)*(N-1)/2))\n\nelse:\n print(int((2...
['Wrong Answer', 'Accepted']
['s797493740', 's537766624']
[2940.0, 2940.0]
[17.0, 17.0]
[150, 161]
p02994
u686230543
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())\nsummation = (n - 2) * l + n * (n - 1) // 2\nminimum = abs(summation)\napplepie = summation + l\nfor i in range(1, n):\n diff = abs(summation - 2 * i)\n if diff < minimum:\n minimum = diff\n applepie = summation + l + i\nprint(applepie)', 'n, l = map(int, input().split())\n\nt...
['Wrong Answer', 'Accepted']
['s005479567', 's078037845']
[3060.0, 3060.0]
[17.0, 17.0]
[268, 264]
p02994
u687044304
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\ndef solve():\n N, L = list(map(int, input().split()))\n all_taste = 0\n eat_taste = float("inf")\n for i in range(1, N+1):\n all_taste += L+i-1\n eat_taste = min(eat_taste, abs(L+i-1))\n print(eat_taste)\n \n if all_taste > 0:\n ans = all_taste - eat...
['Wrong Answer', 'Accepted']
['s255517978', 's855989317']
[3060.0, 3060.0]
[17.0, 17.0]
[416, 395]
p02994
u687929074
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 = N*L + N*(N+1)/2 - N\nif L <= 0:\n print(taste)\nelse:\n print(taste-L)\n', 'N, L = map(int,input().split())\ntaste = N*L + N*(N+1)/2 - N\nif L <= 0:\n print(taste)\nelse:\n print(taste-L)\n', 'N, L = map(int,input().split())\ntaste = (N-1)*L + N*(N-1)/2 - N + 1\nif L <= 0:...
['Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Accepted']
['s014241277', 's067846407', 's236224915', 's971994802', 's277004139']
[2940.0, 2940.0, 2940.0, 2940.0, 3064.0]
[17.0, 17.0, 17.0, 17.0, 18.0]
[109, 109, 117, 108, 178]
p02994
u692054751
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 LI():\n return [int(s) for s in input().split()]\n\nN,L = LI()\nringo = np.array(list(range(1,N+1))) + L - 1\n\ntaste_all = sum(ringo)\n\nmin_index = 0\nmin_abs = abs(ringo[0])\n\nfor i in range(1,N):\n if min_abs < abs(ringo[i]):\n min_index = i\n min_abs = abs(ringo[i])\n\nprint(ta...
['Wrong Answer', 'Wrong Answer', 'Accepted']
['s163480184', 's227729523', 's508891307']
[14484.0, 3060.0, 2940.0]
[154.0, 17.0, 18.0]
[327, 142, 131]
p02994
u694864742
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())\ni = 0\napple_taste = []\npi_taste = 0\nwhile N > i:\n apple_taste.append(L + i)\n if(L>0):\n if i>0:\n pi_taste += apple_taste[i]\n elif(L+(N-1)>=0):\n pi_taste += apple_taste[i]\n elif(L<0):\n if i>0:\n pi_taste += apple_tast...
['Wrong Answer', 'Accepted']
['s307721895', 's219620026']
[3064.0, 3064.0]
[17.0, 17.0]
[358, 339]
p02994
u696919316
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()))\narr = []\nfor k in range(1, n+1):\n arr.append(l + k - 1)\nprint(arr)\narr.remove(min(arr))\nprint(arr)\nprint(sum(arr))', 'n, l =list(map(int, input().split()))\narr = []\narr2 = []\nfor k in range(1, n+1):\n arr.append(abs(l + k - 1))\nfor k in range(1, n+1):\n arr2.append(...
['Wrong Answer', 'Accepted']
['s621074422', 's897544962']
[9148.0, 9180.0]
[28.0, 27.0]
[153, 205]
p02994
u697696097
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\n# l ~ l+n-1\n\nmin_abs=99999999999\nmin_abs_i=-1\nn_aji=0\nfor i in range(1,n+1):\n aji=l+i-1\n aji_abs=abs(aji)\n if aji_abs < min_abs:\n min_abs = aji_abs\n aji_abs_i = i\n n_aji+=aji\n\nprint(n_aji-(l+aji_abs_i-1))', 'n,l=map(int,input().split())\n \nmin_abs=99999999999\nm...
['Runtime Error', 'Accepted']
['s744796285', 's669397201']
[9024.0, 9064.0]
[23.0, 31.0]
[244, 233]
p02994
u698416089
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()))\napple = []\nfor i in range(n): apple.append(l+i)\nif 0 in apple:\n print(sum(apple))\nelif apple[n] < 0:\n print(sum(apple)-apple[len(apple)-1])\nelse:\n print(sum(apple[1:len(apple)+1]))', 'n,l = list(map(int,input().split()))\napple = []\nfor i in ra...
['Runtime Error', 'Wrong Answer', 'Accepted']
['s280012295', 's901954727', 's540849345']
[3060.0, 3060.0, 3060.0]
[17.0, 17.0, 18.0]
[245, 253, 247]
p02994
u698868214
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\napples = [i+L-1 for i in range(1,N+1)]\n\nans = float("inf")\n\nfor j in range(N):\n ans = min(ans,abs(apples))\n \nprint(ans)', 'N,L = map(int,input().split())\n\napples = [i+L-1 for i in range(1,N+1)]\n\nans = float("inf")\n\nfor apple in apples:\n ans = min(ans,abs(apples))\n ...
['Runtime Error', 'Runtime Error', 'Accepted']
['s733768694', 's777766838', 's201813425']
[9116.0, 9072.0, 9088.0]
[26.0, 26.0, 27.0]
[153, 155, 228]
p02994
u699752889
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...
["from heapq import heappush, heappop, heapify, heapreplace\nfrom collections import defaultdict\nfrom bisect import bisect_left\n\nclass Solution:\n def main(self):\n N, L = map(int, input().split())\n print(list(range(L, L+N)))\n if L <= 0 < L+N:\n print(sum(list(range(L, L+N))))\n ...
['Wrong Answer', 'Accepted']
['s645090766', 's224690756']
[3444.0, 3444.0]
[27.0, 26.0]
[490, 492]
p02994
u699944218
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 = list(map(int,input().split()))\nA = [None for _ in range(N)]\n\nm = float('inf')\nM = 0\nfor i in range(N):\n A[i] = L + i\n if m > abs(A[i]):\n m = abs(A[i])\n M = A[i]\nprint(M) \n\nprint(sum(A) - M)", "\nN, L = list(map(int,input().split()))\nA = [None for _ in range(N)]\n\nm = float('inf')\nM ...
['Wrong Answer', 'Wrong Answer', 'Accepted']
['s390822788', 's599600504', 's202969131']
[3064.0, 3188.0, 3060.0]
[17.0, 18.0, 18.0]
[359, 328, 347]
p02994
u702144572
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+n-1 <=0:\n minL = l+n-1\nelif l<=0 and l+n-1 >=0:\n minL = 0\nelif l>=0:\n minL = 0\n\ntaste = n*(2*l+n-1)/2-minL\n\nprint(int(taste))', 'n,l = map(int,input().split())\n\nif l+n-1 <=0:\n minL = l+n-1\nelif l<=0 and l+n-1 >=0:\n minL = 0\nelif l>=0:\n minL = ...
['Wrong Answer', 'Accepted']
['s162210658', 's332116305']
[3060.0, 3060.0]
[17.0, 17.0]
[172, 172]
p02994
u705418271
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())\nc=0\nm=100000\nfor i in range(1,n+1):\n c+=l+i-1\n m=min(m,abs(l+i-1))\nif l<0 and a-n<=0:\n print(c+d)\nelse:\n print(c-d)', 'n,l=map(int,input().split())\nc=0\nm=100000\nfor i in range(1,n+1):\n c+=l+i-1\n m=min(m,abs(l+i-1))\nif l<0 and l-n<=0:\n print(c+m)\nelse:\n print(c-m)...
['Runtime Error', 'Accepted']
['s911724554', 's682056457']
[9120.0, 9096.0]
[28.0, 27.0]
[148, 148]
p02994
u706414019
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()))\napp_taste = list(range(L,L+N))\nbite_apple=200\nfor i in app_taste:\n if abs(bite_apple) > abs(i):\n bite_apple = i\nprint(sum(app_taste) - i)\n', 'N,L = list(map(int,input().split()))\napp_taste = list(range(L,L+N))\nbite_apple=L\nfor i in app_taste:\n if abs(bite_a...
['Wrong Answer', 'Accepted']
['s848544457', 's546752933']
[8980.0, 9000.0]
[29.0, 28.0]
[185, 193]
p02994
u707030679
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\nD=[]\nfor i in range(n):\n d = l+i\n D.append(d)\n\nif l>-1 :\n mind = D[0]\nelif l+n<0:\n mind = D[n-1]\nelse:\n mind = 0\n\n\nans = sum(D)-mind\nprint(ans', 'n,l = map(int,input().split())\n\nD=[]\nfor i in range(n):\n d = l+i\n D.append(d)\n\nif l+1>0 :\n m...
['Runtime Error', 'Accepted']
['s939386509', 's944401444']
[9004.0, 9136.0]
[25.0, 28.0]
[189, 196]
p02994
u716530146
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())\nlists = []\nfor i in range(1,n+1):\n\ttaste += l+i-1\n\tlists.append(abs(l+i-1))\nlists.sort()\nprint(taste-lists[0])\n\n\n\n', 'n, l=map(int,input().split())\nlists = []\ntaste = 0\nfor i in range(1,n+1):\n\ttaste += l+i-1\n\tlists.append(l+i-1)\nprint(taste-min(lists, key=abs))']
['Runtime Error', 'Accepted']
['s555559937', 's438823085']
[2940.0, 2940.0]
[17.0, 17.0]
[136, 143]
p02994
u719886494
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().solit())\nans = 0\nflg = 0\nmin = 1000\nfor i in range(n) :\n sum = l + (i + 1) - 1\n if sum == 0 :\n flg = 1\n elif min > sum :\n min = sum\n ans += sum\nif flg == 1 :\n print(ans)\nelse :\n print(ans - sum)', 'n, l = (int(i) for i in input().split())\nans = 0\nflg = 0\nt...
['Runtime Error', 'Accepted']
['s551263985', 's003068573']
[3060.0, 3060.0]
[17.0, 18.0]
[239, 267]
p02994
u723444827
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_list = []\naji = 0\n\nfor i in range(N):\n A_list.append(L + i -1)\n aji += (L + i - 1)\n\n#print(A_list)\n\n\nx = min(A_list,key= lambda A_list:abs(A_list))\n#print(x)\n\naji -= x\nprint(aji)\n\n', 'N, L = map(int,input().split())\n\nA_list = []\naji = 0\n\nfor i in range(N...
['Wrong Answer', 'Accepted']
['s536064304', 's255800786']
[2940.0, 2940.0]
[17.0, 17.0]
[271, 264]
p02994
u729707098
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())\nd = (l-1)*n+(n+1)*n//2\nif l<1: print(d+1-l-min(n,1-l))\nelse: print(d-l)', 'n,l = (int(i) for i in input().split())\nd = (l-1)*n+(n+1)*n//2\nif l<1: print(d+1-l-min(n,1-l))\nelse: print(d-l)']
['Runtime Error', 'Accepted']
['s325781317', 's123021622']
[3056.0, 2940.0]
[17.0, 18.0]
[111, 111]
p02994
u733734110
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...
['a,b=map(int, input().split())\n\ns=b-1\nm=0\n\nr=0\n\nif b < 1:\n if a + b > 0:\n m = 0\n else:\n m = b + a -1\nelse:\n m = b\n\nprint(s,m)\n\nfor i in range(a):\n s += 1\n r = r + s\n #print(r)\n\nprint(r-m)', 'a,b=map(int, input().split())\n\ns=b-1\nm=0\n\nr=0\n\nif b < 1:\n if a ...
['Wrong Answer', 'Accepted']
['s545650148', 's512057097']
[3064.0, 3064.0]
[18.0, 17.0]
[218, 206]
p02994
u739843002
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, L+1, L+2, ..., L+N-1\nN, L = list(map(lambda x: int(x), input().split(" ")))\n\nS = int(N * (N-1) / 2) + L * N\n\nif L >= 0:\n print(S - L)\nelif L + N - 1 <= 0:\n print(S - L - N + 1)\nelse:\n print(S)', 'N, L = list(map(lambda x: int(x), input().split(" ")))\n \nS = int(N * (N-1) / 2) + L * N\n \nif L >= 0:\n...
['Runtime Error', 'Accepted']
['s279442376', 's949959687']
[8948.0, 9160.0]
[26.0, 26.0]
[198, 176]
p02994
u739959951
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,a=map(int,input().split())\n\nl=[a+i-1 for i in range(1,n+1)]\n\nimport numpy as np\nb=min(np.abs(l))\n\nif b==0:\n l.remove(0)\nelse:\n l.remove([b,-b],1)\n \nprint(sum(l))', 'n,a=map(int,input().split())\n\nl=[a+i-1 for i in range(1,n+1)]\n\nimport numpy as np\nb=min(np.abs(l))\n\nif b==0:\n l.remove(0)\nelse...
['Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted']
['s225314797', 's321253234', 's693813321', 's841869967', 's556555369']
[12436.0, 12504.0, 3060.0, 2940.0, 2940.0]
[148.0, 148.0, 17.0, 17.0, 17.0]
[166, 164, 141, 128, 128]
p02994
u740047492
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_list=[]\nfor i in range(1,n+1):\n taste_list.append(l+i-1)\nif taste_list[0]>0:\n print(taste-taste_list[0])\nelif taste_list[0]<0:\n print(taste-taste_list[n-1])', 'n,l=map(int,input().split())\ntaste_list=[]\nfor i in range(1,n+1):\n taste_list.append(l+i-1)\ntaste=su...
['Runtime Error', 'Wrong Answer', 'Runtime Error', 'Accepted']
['s055056967', 's081056209', 's993015376', 's626503444']
[2940.0, 3060.0, 3060.0, 3064.0]
[19.0, 17.0, 17.0, 18.0]
[200, 240, 207, 245]
p02994
u755313517
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=list(range(l,l+n,1))\nx=sum(a)\nif(a in 0):\n a.remove(0)\n print(sum(a))\nelif(x<0):\n a.remove(max(a))\n print(sum(a))\nelif(x>0):\n a.remove(min(a))\n print(sum(a))', 'n,l=map(int,input().split())\na=list(range(l,l+n,1))\nx=sum(a)\nif(0 in a):\n a.remove(0)\n print(sum(a))\n...
['Runtime Error', 'Accepted']
['s738180140', 's639351776']
[9200.0, 9216.0]
[24.0, 26.0]
[194, 194]
p02994
u756693875
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\nt = list((l + i - 1) for i in range(1,n))\n\np = sum(t)\n\nprint(p - l)', 'n,l = map(int,input().split())\nt = list(l + i - 1) for i in range(1,n)\n\nif min(t) > 0:\n p = sum(t) - l\nelif max(t) > 0:\n p = sum(t)\nelse:\n p = sum(t) - max(t)\nprint(p)', 'n,l = map(int,input()...
['Wrong Answer', 'Runtime Error', 'Accepted']
['s621987396', 's872103573', 's556775856']
[3064.0, 2940.0, 3060.0]
[17.0, 17.0, 18.0]
[98, 176, 177]
p02994
u757578286
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...
['a = list(map(int,input().split()))\nN = a[0]\nL = a[1]\n\ntaste = 0\n\ndef if_test(N,L):\n if L > 0:\n for i in range(N):\n taste = taste + L + i\n \n taste = taste - L\n print(taste)\n \n elif L+N-1 < 0:\n for i in range(N):\n taste = taste + L + i \n \n taste ...
['Runtime Error', 'Accepted']
['s470617470', 's135848392']
[3064.0, 3064.0]
[17.0, 17.0]
[457, 527]
p02994
u766393261
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())\nTaste=list(int(i) for i in range(L+1-1,L+N-1+1) )\nMaxTaste=[sum(Taste)]*N\nprint(Taste)\nprint(MaxTaste)\nprint(sum(Taste)-Taste[np.argmax(np.abs(np.array(Taste)-np.array(MaxTaste)))])', 'import numpy as np\nN,L=map(int,input().split())\nTaste=list(int(i) for i in ra...
['Wrong Answer', 'Accepted']
['s111374232', 's954059560']
[21288.0, 21676.0]
[315.0, 310.0]
[229, 181]
p02994
u766510304
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=input().split(" ")\nN=int(n)\nL=int(l)\ndef sum(l,n):\n a=0\n for i in range (l,n+1):\n a+=i\n return a\ndef x(N,L):\n a=abs(L)\n b=1\n for i in range (1, N+1):\n if a>abs(L+i-1):\n b=i\n print(b)\n a=abs(L+i-1)\n else:\n print (b)...
['Wrong Answer', 'Accepted']
['s381809644', 's533031950']
[3064.0, 3064.0]
[18.0, 18.0]
[366, 296]
p02994
u766566560
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\ninput = sys.stdin.readline\nN, L = map(int,input().split())\nA = [0] * N\nfor i in range(N):\n A[i] = L + i\n\nans = 0\ndiff = 10 ** 10\nfor j in range(N):\n diff = min(diff, sum(A)-A[j])\n if diff != diff:\n ans = A[j]\n\nprint(ans)', 'import sys\ninput = sys.stdin.readline\nN, L = map(int,input()....
['Wrong Answer', 'Wrong Answer', 'Accepted']
['s583897001', 's619362027', 's001718652']
[3064.0, 3060.0, 3064.0]
[18.0, 17.0, 18.0]
[237, 196, 296]
p02994
u767948584
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 = int(N * (L-1) + N * (N+1) / 2)\n\nif L + N -1 < 0:\n print(S- (L + N - 1))\nelif L - 1 > 0:\n print(S - (L-1))\nelse:\n print(S)\n', 'N, L = map(int, input().split())\n\nS = int(N * (L-1) + N * (N+1) / 2)\n\nif L + N -1 < 0:\n print(S- (L + N - 1))\nelif L > 0:\n print(S -...
['Wrong Answer', 'Accepted']
['s395978182', 's628890609']
[2940.0, 2940.0]
[17.0, 17.0]
[163, 155]
p02994
u768256617
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=float('inf')\nfor i in range(1,n+1):\n ans=min(ans,abs(l+i-1))\n \n#print(ans)\nprint((l*n+n*(n-1)//2)+1*ans)", "n,l=map(int,input().split())\nans=float('inf')\nfor i in range(1,n+1):\n ans=min(ans,abs(l+i-1))\n \n#print(ans)\n\ns=(l*n+n*(n-1)//2)\nif s<=0:\n print(s+ans)\n \ne...
['Wrong Answer', 'Accepted']
['s541564935', 's255395738']
[2940.0, 3060.0]
[17.0, 17.0]
[139, 177]
p02994
u771420313
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...
['#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n\nN, L = map(int, input().split())\n\n\n\ntotal = N*(2*L + N-1)/2\n\n\naji_list = range(L, L+N, 1)\naji_abs_list = list(map(abs, aji_list))\naji_abs_list.sort()\nmin = aji_abs_list[0]\n\nif not (L < min < L+N):\n min = min * -1\n\n\nprint(int(total - min))\n', '#!/us...
['Wrong Answer', 'Accepted']
['s898452199', 's165566236']
[3060.0, 3060.0]
[17.0, 17.0]
[502, 546]
p02994
u771804983
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())\nval=val=L*N+0.5*N*(N+1)-N\nif L>0:\n val-=(L-1)\nelif L+N-1<0:\n val-=(L+N-1)\n\nprint(int(val))', 'N,L=map(int,input().split())\nval=L*N+0.5*N*(N+1)-N\nif L>0:\n val-=L\nelif L+N-1<0:\n val-=(L+N-1)\nprint(int(val))']
['Wrong Answer', 'Accepted']
['s964783473', 's923658819']
[2940.0, 3060.0]
[19.0, 17.0]
[125, 116]
p02994
u776338097
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())\ns = 0\nfor i in range(1, n + 1):\n s += l + i - 1\n\nx = 1 - l\nif x <= n and x >= i:\n print(s)\nelse:\n a = L\n b = L + n - 1\n if abs(a) < abs(b):\n print(s - a)\n else:\n print(s - b)', 'n, l = map(int, input().split())\ns = 0\nfor i in range(1, n ...
['Runtime Error', 'Runtime Error', 'Accepted']
['s184355084', 's890909760', 's817665485']
[3064.0, 3060.0, 3060.0]
[17.0, 17.0, 18.0]
[239, 231, 240]
p02994
u776871252
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 - 1) * (int(n / 2) + l - 1))\nelse:\n print((n - 1) * (int(n / 2) + l))\n', 'n, l = map(int, input().split())\nif l <= 0 and abs(l) < n:\n a = int((n * (2 * l + n - 1)) / 2)\n print(a)\nelif l <= 0 and abs(l) >= n:\n a = int((n - 1) * (2 * l + n - ...
['Runtime Error', 'Accepted']
['s063418206', 's595725714']
[2940.0, 3060.0]
[17.0, 18.0]
[129, 254]
p02994
u778700306
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())\n\nt = map(lambda i: L + i, range(N))\n\ntarg = sum(t)\nres = 0\nfor c in t:\n now = targ - c\n if m > abs(targ - now):\n m = abs(targ - now)\n res = now\n\nprint(res)', '\nN, L = map(int, input())\n\nt = map(lambda i: L + i, range(N))\n\ntarg = sum(t)\nres = 0\n...
['Wrong Answer', 'Runtime Error', 'Accepted']
['s036136739', 's648016641', 's153688856']
[3060.0, 3060.0, 3060.0]
[18.0, 17.0, 18.0]
[209, 201, 235]
p02994
u779728630
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#L, L+N-1 => sum: (2L+N-1)*N // 2\nA = (2L+N-1)*N // 2\nif L*(L+N-1) <= 0:\n print( A )\nelif L+N-1 < 0:\n print( A - (L+N-1) )\nelse:\n print( A - L )', 'N, L = map(int, input().split())\n#L, L+N-1 => sum: (2L+N-1)*N // 2\nA = (2 * L + N - 1)*N // 2\nif L*(L+N-1) <= 0:\n print( ...
['Runtime Error', 'Accepted']
['s904486773', 's500738968']
[8944.0, 9100.0]
[25.0, 27.0]
[180, 188]
p02994
u780420070
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())\ns=n*l+n*(n+1)/2-n\nd2=n**2\nx=0\nfor i in range(n):\n s1=s-i-l\n d=abs(s-s1)\n if d<d2:\n d2=d\n x=i\nprint(s-l-x)', 'n,l=map(int,input().split())\ns=n*l+n*(n+1)/2-n\nd2=100000000000000000\nx=0\nfor i in range(n):\n s1=s-i-l\n d=abs(s-s1)\n if d<d2:\n ...
['Wrong Answer', 'Accepted']
['s308651858', 's164374602']
[3060.0, 3060.0]
[17.0, 17.0]
[157, 176]
p02994
u781535828
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()]\n\napples = []\n\nm = abs(L)\nind = 0\n\nfor i in range(N):\n apples.append(L+i)\n if m > abs(L+i):\n m = abs(L+i)\n ind = i\n \napples.remove(apples[i])\n\nprint(sum(apples))\n', '[N, L] = [int(i) for i in input().split()]\n\napples = []\n\nm = ab...
['Wrong Answer', 'Accepted']
['s010797764', 's551218147']
[3060.0, 3060.0]
[17.0, 17.0]
[231, 233]
p02994
u787873596
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 = input().split(' ')\nn = int(nl[0])\nl = int(nl[1])\n\ntaste = 0\njudge = True\nfor i in range(n):\n\ttaste_i = l + (i + 1) - 1 \n\tprint(taste_i)\n\tif taste_i == 0:\n\t\tjudge = False\n\ttaste += l + (i + 1) - 1\n\nif judge:\n\tif taste_i < 0:\n\t\ttaste = taste - taste_i\n\telse:\n\t\ttaste = taste - (l + 1 - ...
['Wrong Answer', 'Accepted']
['s230287183', 's056306171']
[3064.0, 3064.0]
[17.0, 17.0]
[307, 289]
p02994
u790812284
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\nsumaji = (2*L+N-1)*N/2\n\nif L > 0:\n print(sumaji-L)\nelif L+N-1 < 0:\n print(sumaji-(L+N-1))\nelse:\n print(sumaji)', 'N, L = map(int, input().split())\n\nsumaji = (2*L+N-1)*N/2\n\nif L > 0:\n print(sumaji-L)\nelif L+N-1 < 0:\n print(sumaji-(L+N-1))\nelse:\n pri...
['Wrong Answer', 'Wrong Answer', 'Accepted']
['s567748302', 's954660237', 's654380907']
[3060.0, 3064.0, 3068.0]
[18.0, 18.0, 19.0]
[153, 153, 158]
p02994
u793225530
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\nl, n = [int(i) for i in input().split(' ')]\n\nnl = np.array([i for i in range(n)]) + 1\nll = nl + l - 1\n\nmini = ll.index(np.min(np.absolute(ll)))\nlll = ll.pop(mini)\n\nprint(sum(lll))", "import numpy as np\nfrom math import abs, min\n\nl, n = [i for i in input().split(' ')]\n\nnl = np.array(...
['Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted']
['s209850226', 's436459280', 's442467982', 's597653972', 's719656774', 's909114436', 's623188336']
[12448.0, 12404.0, 18492.0, 20392.0, 20396.0, 12448.0, 12408.0]
[148.0, 149.0, 294.0, 280.0, 281.0, 150.0, 149.0]
[199, 209, 204, 189, 210, 203, 234]
p02994
u800704240
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())\nimport statistics\nS = []\nfor i in range(L,N+L):\n S.append(i)\nans = []\np = []\nfor j in S:\n ans.append(abs(sum(S) - sum(S) - j))\n p.append(sum(S)-j)\nprint(ans)\nprint(p[ans.index(min(ans))])', 'N, L = map(int,input().split())\nimport statistics\nS = []\nfor i in range(...
['Wrong Answer', 'Accepted']
['s770055158', 's496431563']
[5148.0, 5140.0]
[36.0, 37.0]
[228, 218]
p02994
u804924310
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 = input()\nN = int(NL[0])\nL = int(NL[2])\napple = []\napple_abs = []\nsum = 0\nfor i in range(1,N+1):\n apple.append(L+i-1)\n apple_abs.append(abs(L+i-1))\n\napple_min = min(apple_abs)\n\nfor i in apple:\n if abs(i) = apple_min:\n continue\n sum += i\nprint(sum)', 'NL = input().split()\nN = int(NL[0])\nL =...
['Runtime Error', 'Accepted']
['s767038946', 's902109370']
[2940.0, 3060.0]
[17.0, 17.0]
[257, 267]
p02994
u806403461
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 copy\nN, L = map(int, input().split())\n\ntaste = list(range(1, N+1))\nfor a in range(0, N):\n taste[a] = taste[a] + L - 1\n\nabs_taste = copy.deepcopy(taste)\n\nfor a in range(0, N):\n abs_taste[a] = abs(abs_taste[a])\n\nprint(sum(taste))\n', 'import copy\nN, L = map(int, input().split())\n\ntaste = lis...
['Wrong Answer', 'Accepted']
['s346505334', 's567182402']
[3444.0, 3444.0]
[22.0, 22.0]
[241, 286]