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
u809819902
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())\naj=[l + i for i in range(n)]\najs = sum(aj)\nresl = []\nfor i in range(n):\n aj2 = aj\n del aj2[i]\n resl += [sum(aj2)]\nresl2 = [abs(ajs-resl[i]) for i in range(n)]\nx = resl2.index(min(resl2))\nprint(aj[x])', 'n,l = map(int,input().split())\naji = [l+i for i in range(n)]\nmn...
['Runtime Error', 'Accepted']
['s391433225', 's227932157']
[8960.0, 9092.0]
[25.0, 29.0]
[239, 196]
p02994
u811436126
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\napple = [i + l for i in range(n)]\naji = sum(apple)\nprint(apple, aji)\n\nif 0 in apple:\n print(aji)\nelif apple[0] > 0:\n print(aji - min(apple))\nelse:\n print(aji - max(apple))\n', 'n, l = map(int, input().split())\n\napple = [i + l for i in range(n)]\naji = sum(apple)...
['Wrong Answer', 'Accepted']
['s201740638', 's758554027']
[3060.0, 2940.0]
[17.0, 23.0]
[215, 197]
p02994
u813286880
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\napple = []\nzerochk = False\ntastes = 0\nfor i in range(N):\n taste = L + i\n apple.append(taste)\n tastes += taste\n if taste == 0: zerochk = True\n\nans = 0\nminval = 100\n\nif zerochk:\n\n print('{}'.format(tastes))\n\nelse if L > 0:\n\n for i in range(1, len(t...
['Runtime Error', 'Accepted']
['s912200960', 's453536873']
[2940.0, 3064.0]
[17.0, 17.0]
[529, 628]
p02994
u813569174
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 = int(a[0])\nL = int(a[1])\na = [0]*N\nfor i in range(N):\n a[i] = abs(L+i)\nfor i in range(N):\n if a[i] == min(a):\n c = (L-1)*N+N*((N+1)/2)-(L+i)\n print(c)\n break', 'a = input().split()\nN = int(a[0])\nL = int(a[1])\na = [0]*N\nfor i in range(N):\n a[i] = abs(L+i)\nfor i in ran...
['Wrong Answer', 'Wrong Answer', 'Accepted']
['s078200602', 's285101235', 's454901488']
[3060.0, 3060.0, 3064.0]
[17.0, 18.0, 17.0]
[191, 181, 196]
p02994
u814986259
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...
['(int,input().split())\nif L >= 0:\n print(int((N-1)/2*(L + L + N )))\nelse:\n if L + N - 1 >= 0: \n print(int(N / 2 * (L + L + N - 1)))\n else:\n print(int((N - 1)/ 2 * (L + L + N - 2)))\n', 'N,L=(int,input().split())\nif L >= 0:\n print(int((N-1)/2*(L + L + N - 1)))\nelse:\n if L + N - 1 >= 0: \n print...
['Runtime Error', 'Runtime Error', 'Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Accepted']
['s068250589', 's100014296', 's204373278', 's340595227', 's412745544', 's851247732', 's181581763']
[2940.0, 2940.0, 2940.0, 3060.0, 2940.0, 2940.0, 2940.0]
[17.0, 17.0, 18.0, 17.0, 17.0, 17.0, 18.0]
[189, 196, 176, 186, 199, 172, 182]
p02994
u815797488
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\nfor i in range(1,N+1):\n apple_pie = 0\n apple_pie += L + i - 1\n\nfor k in range(1,N+1):\n ab = []\n ab += abs(L + k - 1)\n\nif min(ab):\n print(apple_pie - (L + ab.index(min(ab)) - 1))', 'N, L = list(map(int, input().split()))\n\nfor i in range(1:N+1):\n ...
['Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Wrong Answer', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted']
['s143363731', 's143539315', 's156690541', 's237718834', 's401129078', 's407952814', 's464847437', 's482655775', 's712854484', 's722323905', 's796312602', 's241137471']
[3060.0, 2940.0, 2940.0, 3060.0, 2940.0, 2940.0, 3060.0, 3060.0, 3060.0, 3060.0, 2940.0, 3060.0]
[17.0, 17.0, 17.0, 17.0, 17.0, 17.0, 17.0, 17.0, 17.0, 17.0, 17.0, 17.0]
[233, 215, 203, 232, 205, 215, 257, 220, 272, 205, 195, 213]
p02994
u821712904
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 a=n*(2*l+n-1)//2\nif 1-n<=l<=0:\n print(a)\nelif l<=-n:\n print(a-l-n+1)\nelse :\n print(a-l)\n ', 'n,l=map(int,input().split())\nif 1-n<=l<=0:\n a=n*(2*l+n-1)//2\n print(a)\nelif l<=-n:\n print(a-l-n+1)\nelse :\n print(a-l)\n ', 'n,l=map(int,input().split())\na=n*(2*l+n-1)//2\...
['Runtime Error', 'Runtime Error', 'Accepted']
['s375895554', 's676491040', 's575937877']
[2940.0, 2940.0, 3060.0]
[18.0, 17.0, 19.0]
[123, 124, 123]
p02994
u825115925
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\ntot=N*L+(N-1)*N/2\nans=[]\n\n\nfor i in range(N):\n ans.append(abs(L+i))\n\na=ans.index(min(ans))\n\nprint(tot-(a+L))', 'N,L=map(int,input().split())\n\ntot=N*L+(N-1)*N/2\nans=[]\n\n\nfor i in range(N):\n ans.append(abs(tot-(L+i)))\n\nprint(max(ans))', 'N,L=map(int,input().split(...
['Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Accepted']
['s666884084', 's683094064', 's966088839', 's429185682']
[9172.0, 9032.0, 9172.0, 9120.0]
[27.0, 30.0, 32.0, 28.0]
[141, 123, 121, 147]
p02994
u827141374
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(x) for x in input().split())\nif L <= 0 <= (L + N - 1):\n print(0)\nelif N > L:\n s = 0\n for i in range(0, N-1):\n s += L + i\n print(s)\nelse:\n s = 0\n for i in range(1, N):\n s += L + i\n print(s)', 'N, L = (int(x) for x in input().split())\na = [0] * N\nfor i in ran...
['Wrong Answer', 'Accepted']
['s893085880', 's867162959']
[3060.0, 3064.0]
[17.0, 17.0]
[235, 209]
p02994
u827261928
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\nl=[]\nfor i in range(N):\n s+=L+i\n l.append(abs(L+i))\nl=sorted(l)\nif l[0]<L:\n s-=l[0]\nelse:\n s+=l[0]\nprint(s)', 'N,L=map(int,input().split())\ns=0\nl=[]\nfor i in range(N):\n s+=L+i\n l.append(abs(L+i))\nl=sorted(l)\nprint(l)\ns-=abs(l[0])\nprint(s)', 'N,L=m...
['Wrong Answer', 'Wrong Answer', 'Accepted']
['s429727803', 's497351875', 's485672267']
[9156.0, 9176.0, 9180.0]
[28.0, 28.0, 25.0]
[152, 133, 153]
p02994
u829249049
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,map(int,input().split())\nif L>=0:\n print((N-1)*(L-1)+int(N*(N+1)/2)-1)\nelse:\n if L+N>=0:\n print(N*(L-1)+int(N*(N+1)/2))\n else:\n print(N*(L-1)+int(N*(N+1)/2)-(L+N-1))', 'N,L=map(int,input().split())\nif L>=0:\n print((N-1)*(L-1)+int(N*(N+1)/2)-1)\nelse:\n if L+N>0:\n print(N*(L-1)+int(N*(N+1)/2)...
['Runtime Error', 'Accepted']
['s987550638', 's409019212']
[3060.0, 3060.0]
[17.0, 17.0]
[176, 177]
p02994
u829356061
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\nx = 3\ny = -1\nA = []\n\nfor i in range(x):\n A.append(y)\n y += 1\n\nB = np.abs(A)\n\nwe = min(B)\n\nA.remove(we)\ncnt = 0\nfor i in A:\n v = int(i)\n cnt += v\n\nprint(cnt)', 'import numpy as np\nx, y = map(int, input().split())\nA = []\n\nfor i in range(x):\n A.append(y)\n y +...
['Wrong Answer', 'Accepted']
['s463023195', 's350886819']
[12500.0, 12500.0]
[151.0, 149.0]
[187, 251]
p02994
u829908012
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())\nx=[]\nfor i in range(0,N):\n N=L+i-1\n if i==0:\n continue\n x.append(N)\nif sum(x)<0:\n sum(x)==0\n\nprint(sum(x))\n', 'N,L=map(int,input().split())\nans=[]\nfor i in range(1,N+1):\n ans.append(L+i-1)\n\nList=list(map(abs,ans))\n\nans.pop(List.index(min(List))...
['Wrong Answer', 'Accepted']
['s521060710', 's642659480']
[2940.0, 2940.0]
[17.0, 17.0]
[160, 160]
p02994
u836737505
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 = 0\nm = float("inf")\nfor i in range(1,n+1):\n a = l + i -1\n if abs(a)<abs(m):\n m = a\n ans += a\nprint(ans + (-m if m<0 else m))', 'n,l=map(int,input().split())\na =[]\nfor i in range(1,n+1):\n a.append(l+i-1)\nb =10**10\nfor i in range(n):\n d = abs(sum(a)...
['Wrong Answer', 'Wrong Answer', 'Accepted']
['s228739474', 's779222292', 's757994204']
[2940.0, 3060.0, 2940.0]
[18.0, 18.0, 17.0]
[177, 212, 159]
p02994
u842375327
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-1)*N/2)\nelif L>0:\n print((2*L+N)*(N-1)/2)\nelse:\n print((2*L+N-2)*(N-1)/2)', 'N, L= map(int, input().split())\nif L<0 and L+N-1>0:\n print(int((2*L+N-1)*N/2))\nelif L>=0:\n print(int((2*L+N)*(N-1)/2))\nelse:\n print(int((2*L+N-2)...
['Wrong Answer', 'Accepted']
['s435420032', 's861493917']
[3060.0, 3060.0]
[17.0, 17.0]
[148, 164]
p02994
u842388336
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())\ntast_list = [L + i for i in range(N)]\nprint(tast_list)\ndrop_iter = np.argmin(np.abs(tast_list))\ndel tast_list[drop_iter]\nprint(sum(tast_list))', 'import numpy as np\nN, L = map(int,input().split())\ntast_list = [L + i for i in range(N)]\ndrop_iter = np.argmin(n...
['Wrong Answer', 'Accepted']
['s548970040', 's009801528']
[12508.0, 12836.0]
[151.0, 161.0]
[193, 176]
p02994
u848654125
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 = sp.arange(L, L+N)\ns = sum(taste)\n\nif 0 <= L:\n print(s - taste[0])\nelif L+N < 1:\n print(s - taste[N-1])\nelse:\n print(s)', 'import scipy as sp\n\nN, L = map(int, input().split())\ntaste = sp.arange(L, L+N)\ns = sum(taste)\n\nif 0 <= L:\n print(s - taste[0])\...
['Runtime Error', 'Accepted']
['s366926404', 's120334292']
[3060.0, 20124.0]
[17.0, 306.0]
[168, 188]
p02994
u849433300
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# Your code here!\n\nN,L=map(int, input().split()) \n\nal_te = []\nfor i in range(N):\n T = L + i -1\n al_te.append(T)\n#print(al_te)\n\nab_te = []\nfor i in range(N):\n T = L + i -1\n ab_te.append(abs(T))\n#print(ab_te)\nx = ab_te.index(min(ab_te))\n#print(x)\n\nal_te.pop(x)\nprint(sum(a...
['Wrong Answer', 'Accepted']
['s639154310', 's255062933']
[3064.0, 3064.0]
[17.0, 17.0]
[304, 312]
p02994
u852068828
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...
['print("食べてしまった分、一緒にりんごを買いに行く")\n', 'N, L = map(int, input().split())\nlin = []\na = []\nfor i in range(N):\n lin.append(L)\n L += 1\nfor i in range(len(lin)):\n b = abs(lin[i])\n a.append(b)\nif sum(lin) < 0:\n print(sum(lin) + min(a))\nelse:\n print(sum(lin) - min(a))\n']
['Wrong Answer', 'Accepted']
['s494302531', 's505854525']
[2940.0, 3060.0]
[17.0, 18.0]
[73, 240]
p02994
u854239812
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())\n\nres = n * (l-1) + n * (n+1) / 2\nif 1-l >= 1 and 1-l <= n:\n pass\nelif 1-l > n:\n res -= (l+n-1)\nelse:\n res -= l\nprint(res)', 'n, l = map(int, input().split())\n \nres = n * (l-1) + n * (n+1) / 2\nif (0 >= l) and (1-l <= n):\n pass\nelif 1-l > n:\n res -= (l+n-1)\nelse:\n res -= ...
['Runtime Error', 'Wrong Answer', 'Wrong Answer', 'Accepted']
['s372482088', 's818258408', 's948077056', 's052592222']
[3060.0, 2940.0, 3060.0, 2940.0]
[17.0, 17.0, 17.0, 17.0]
[149, 161, 158, 166]
p02994
u855781168
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\ninp = input().split()\n\nn = int(inp[0])\nl = int(inp[1])\n\nmin_abs = abs(l)\nmin_num = 1\nfor i in range(n):\n if abs(l+i) < min_abs:\n min_abs = abs(l+i)\n min_num = i\n\nprint(min_num)\nprint(math.ceil(0.5*n*n + n*l - 0.5*n - l - min_num ))\n\n\n', 'import math\ninp = input().split()...
['Wrong Answer', 'Wrong Answer', 'Accepted']
['s707901391', 's894034924', 's557909056']
[3060.0, 3060.0, 3060.0]
[18.0, 17.0, 19.0]
[263, 248, 302]
p02994
u857330600
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=map(int,input().split())\nsum=k\ntmp=k\nfor i in range(1,n):\n sum+=k+i\n if abs(tmp)>abs(k+i):\n tmp=k+i\nprint(sumtmp)', 'n,k=map(int,input().split())\nsum=k\ntmp=abs(k)\nfor i in range(1,n):\n sum+=k+i\n if tmp>abs(k+i):\n tmp=abs(k+i)\nprint(sum+tmp)', 'n,k=map(int,input().split())\nsum=k\ntmp=abs(k...
['Runtime Error', 'Wrong Answer', 'Runtime Error', 'Accepted']
['s055453071', 's493867333', 's929596694', 's469287300']
[2940.0, 2940.0, 3060.0, 2940.0]
[17.0, 17.0, 17.0, 17.0]
[122, 128, 134, 123]
p02994
u858670323
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())\nA = list()\nfor i in range(N):\n A.append(L+i)\nA.sort()\nS = sum(A)\nif min(A)*max(A)<=0:\n print(S)\nelse:\n if L>=0:\n print(S-min(A))\n else:\n print(S-max(A))', 'N,L = map(int,input().split())\nA = list()\nfor i in range(N):\n A.append(L+i)\nA.sort()\nS = sum(A)\nif min(A)*max(...
['Runtime Error', 'Accepted']
['s238452450', 's781866642']
[9180.0, 9120.0]
[20.0, 28.0]
[185, 194]
p02994
u859773831
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(x) for x in input().split(' ')]\narr=sorted([x+l-1 for x in range(1,n+1)])\nt1=sum(arr)\n# arr2=[abs(x) for x in arr]\nprint(min([t1-x for x in arr]))", "n,l=[int(x) for x in input().split(' ')]\narr=sorted([x+l-1 for x in range(1,n+1)])\narr2=[abs(x) for x in arr]\nprint(sum(arr)-arr[arr2.index(min(arr2))])...
['Wrong Answer', 'Accepted']
['s918625914', 's272267698']
[2940.0, 2940.0]
[17.0, 17.0]
[155, 152]
p02994
u859897687
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=0\nb=1000\nfor i in range(l,l+n):\n a+=i\n b=min(1000,abs(i))\nprint(a-b)', 'n,l=map(int,input().split())\na=0\nb=1000\nfor i in range(l,l+n):\n a+=i\n if abs(b)>abs(i):\n b=i\nprint(a-b)']
['Wrong Answer', 'Accepted']
['s595115783', 's255603605']
[3060.0, 2940.0]
[17.0, 17.0]
[101, 108]
p02994
u864273141
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*(L+N-1)<=0:\n print((L-1)*N+N*(N+1)/2)\n \nelif L<0:\n print((L-1)*N+N*(N+1)/2-(L+N-1))\n\nelse:\n print((L-1)*N+N*(N+1)/2-L)', 'N,L=map(int,input().split())\nif L*(L+N-1)<=0:\n print(int((L-1)*N+N*(N+1)/2))\n \nelif L<0:\n print(int((L-1)*N+N*(N+1)/2-(L+N-1)))\n\nelse:\n pr...
['Wrong Answer', 'Accepted']
['s375546385', 's051094845']
[3060.0, 3064.0]
[17.0, 17.0]
[156, 171]
p02994
u865191802
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 = 0\n\nfor i in range(l,l+n):\n\tans += i\n\nif l-n <= 0:\n\tans -= l+n-1\n\nprint(ans)', 'n,l = map(int,input().split())\nleft = l\nright = n+l-1\neat = 0\naji = 0\n\nif right <=0:\n\teat = right\nelif left >=0:\n\teat = left\nelse:\n\teat = 0\n\nfor i in range(left,right+1):\n\ta...
['Wrong Answer', 'Accepted']
['s865456883', 's519882044']
[2940.0, 3060.0]
[17.0, 18.0]
[112, 203]
p02994
u867848444
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=[]\nfor i in range(n):\n aji+=[l+i]\nsu=sum(aji)\nc=[su]\nfor i in range(n):\n c=[abs(su-aji[i])]\nc.sort()\nprint(s)', 'n,l=map(int,input().split())\naji=[]\ns=0\nc=0\nfor i in range(n):\n aji+=[l+i]\nsu=sum(aji)\nfor i in range(n):\n s=su-aji[i]\n if su-c<su-s<su:\n ...
['Runtime Error', 'Wrong Answer', 'Accepted']
['s107173650', 's939192346', 's054383748']
[3060.0, 2940.0, 2940.0]
[18.0, 17.0, 18.0]
[148, 166, 94]
p02994
u868237899
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())\neatable_taste = L - 1\neatable_index = 0\n\nfor i in range(1, N):\n taste = L + i - 1\n if abs(taste) < abs(eatable_taste):\n eatable_index = i\n eatable_taste = taste\n\nprint(int(N*(N-1)/2 + (L-1)*N - ((eatable_index) + L - 1))) ', 'N, L = map(int, input().sp...
['Wrong Answer', 'Wrong Answer', 'Accepted']
['s274676724', 's640589704', 's830191369']
[3060.0, 3060.0, 2940.0]
[17.0, 17.0, 17.0]
[278, 231, 214]
p02994
u868418093
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 = []\nfor i in range(n):\n aji.append(l+i)\nsum_aji = sum(aji)\nmin_diff = float("inf")\nans = 0\nfor s in aji:\n if abs(s) < min_diff:\n ans = sum_aji-s\nprint(ans)', 'n,l = map(int,input().split())\naji = []\nfor i in range(n):\n aji.append(l+i)\nsum_aji = sum(aji...
['Wrong Answer', 'Accepted']
['s081519949', 's939556531']
[3060.0, 3060.0]
[19.0, 17.0]
[204, 230]
p02994
u870518235
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 = [0]*N\nfor i in range(N):\n A[i] = L + i - 1\n\nans = 0\nif 0 in A:\n ans = sum(A)\nelse:\n ans = sum(A) - A[0]\n\nprint(ans)', 'N, L = map(int, input().split())\nA = [0]*N\nfor i in range(N):\n A[i] = L + (i+1) - 1\n\nans = 0\nif 0 in A:\n ans = sum(A)\nelse:\n ...
['Wrong Answer', 'Accepted']
['s538155116', 's944750058']
[9000.0, 9104.0]
[27.0, 25.0]
[161, 222]
p02994
u873436985
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...
['string = input()\nsplit = string.split(" ")\nN = int(split[0])\nL = split[1]\n\nL = int(L)\n\ntaste = []\n\ntotal = 0\n\n\nfor i in range(N):\n taste.append(L + i)\n print(taste[i])\n total = total + taste[i]\n\nmini = min(taste, key=lambda x: -x if x < 0 else x)\ntotal = total - mini\nprint(total)', 'string = inp...
['Wrong Answer', 'Accepted']
['s190066968', 's737684488']
[3064.0, 3064.0]
[17.0, 17.0]
[283, 265]
p02994
u873680834
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 = 0\ntaste_sum = 0\neat = 0\ntemp_eat = 0\n\nfor i in range(1,N+1):\n taste = L+i-1\n taste_sum += taste\n if i == 1:\n temp_eat = abs(taste)\n elif abs(taste) < temp_eat:\n eat = taste\n\nprint(taste_sum - eat)', 'N,L = map(int,input().split())\n\ntaste = 0\ntaste_su...
['Wrong Answer', 'Accepted']
['s128783268', 's251648724']
[3060.0, 3064.0]
[17.0, 17.0]
[246, 296]
p02994
u877428733
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\ni = 0\ntaste = []\n\nwhile i <= N:\n taste.append(L + i - 1)\n i += 1\n \nif L <= 0:\n print(sum(taste))\nelif L > 0:\n print(sum(taste[1:N]))\n', 'N,L = list(map(int,input().split()))\n\n\ni = 1\ntaste = []\n\nwhile i <= N:\n taste.app...
['Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Accepted']
['s137206888', 's823816874', 's839884402', 's407074075']
[2940.0, 3060.0, 3064.0, 3064.0]
[17.0, 17.0, 17.0, 17.0]
[205, 290, 293, 345]
p02994
u897779585
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(i) for i in input().split()] \nbi=None\nif 2<=1-L and 1-L<=N:\n bi =1-L\nelif 1-L>=N:\n bi = N\nelif 2>=1-L:\n bi =1\najis = [L+i for i in range (N)]\norg_sum = sum(ajis)\nans = org_sum -(L+bi-1)\nprint(ans)', 'N,L = [int(i) for i in input().split()] \nbi=None\nif 2<=1-L and 1-L<=N:\n bi =1-L\n...
['Runtime Error', 'Accepted']
['s942091624', 's185498467']
[3064.0, 3064.0]
[17.0, 17.0]
[216, 216]
p02994
u901447859
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\nx=[l+i-1 for i in range(1,n+1)]\n\nmin_val=None\nidx=0\nfor i in x:\n if min_val is None or abs(l+i-1) < min_val:\n min_val=abs(l+i-1)\n idx=i-1\n\nx.pop(idx)\nprint(sum(x))', 'n,l=map(int,input().split())\n\nx=[l+i-1 for i in range(1,n+1)]\nx.remove(min(x, key=abs))\nprint(sum(...
['Runtime Error', 'Accepted']
['s439433170', 's322108753']
[3060.0, 2940.0]
[18.0, 20.0]
[200, 101]
p02994
u902151549
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\nimport re\nimport time\n\nN,L=map(int,input().split())\n\ntotal=(L-1)*N+((1+N)/2)*N\nmn=1e9\nfor a in range(N):\n l=L+(a+1)-1\n total2+=l\n mn=min([mn,abs(l)])\n\nprint(int(total-mn))', 'import math\nimport re\nimport time\n\nN,L=map(int,input().split())\n\ntotal=(L-1)*N+((1+N)/2)*N\nmn=1e9\nans...
['Runtime Error', 'Wrong Answer', 'Wrong Answer', 'Accepted']
['s037446504', 's469887575', 's648946918', 's856014916']
[3188.0, 3188.0, 3188.0, 3316.0]
[20.0, 19.0, 20.0, 19.0]
[245, 235, 235, 222]
p02994
u903005414
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\nr = l + n - 1\n\nif r <= 0:\n eat = r\nelif l >= 0:\n eat = l\nelse:\n eat = 0\nprint((R + L) * (R - L + 1) / 2 - eat)\n', 'import numpy as np\n\nN, L = map(int, input().split())\n\napple = np.array([L + i - 1 for i in range(1, N + 1)])\nabs_apple = np.abs(apple)\nidx = ab...
['Runtime Error', 'Accepted']
['s390641370', 's202218347']
[2940.0, 12448.0]
[17.0, 154.0]
[154, 192]
p02994
u905582793
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 i in range(n)]\ndif = 10**18\nfor i in range(n):\n if dif > abs(a[i]):\n dif = abs(a[i])\n difr= a[i]\nprint(sum(a)-difr)', 'n,l=map(int,input().split())\na=[l+i for i in range(n)]\ndif = 10**18\nfor i in range(n):\n if dif > abs(a[i]):\n dif = abs(a[i])\n difr= ...
['Wrong Answer', 'Accepted']
['s690027096', 's616107840']
[3060.0, 2940.0]
[18.0, 17.0]
[162, 163]
p02994
u906428167
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 if l > 0:\n print(int(n*(l-1)+n*(n+1)/2-l))\n elif l <= 0 and l +n-1 >=0:\n print(int(n*(l-1)+n*(n+1)/2))\n else:\n print(int(n*(l-1)+n*(n+1)/2-l-n+1))', 'def solve():\n n,l = map(int,input().split())\n if l > 0:\n print(int(n*(l-1)+n*(n+...
['Runtime Error', 'Accepted']
['s814743139', 's662085342']
[2940.0, 3060.0]
[17.0, 18.0]
[212, 247]
p02994
u908424816
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\na = input()\nn, l= a.split(" ")\napples = [i for i in range(n)]\nabs_app = np.abs(apples)\nm = abs_app.min()\nprint((np.array(apples)[abs_app == m]).sum())\n', 'import numpy as np\na = input()\nint(n), int(l) = a.split(" ")\napples = [i for i in range(n)]\nabs_app = np.abs(apples)\nm = abs_app.min...
['Runtime Error', 'Runtime Error', 'Accepted']
['s690196802', 's726527048', 's350760466']
[21284.0, 3056.0, 12452.0]
[306.0, 17.0, 150.0]
[170, 207, 255]
p02994
u908481359
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 >= 1:\n print((N-1)*(2*L+N)/2)\nelif L < 1 and N > -L:\n print(N*(2*L+N-1)/2)\nelse:\n print(N*(2*L+N-1)/2-N-L+1)', 'N,L = map(int,input().split())\n\nif L >= 1:\n print((N-1)*(2*L+N)//2)\nelif L < 1 and N > -L:\n print(N*(2*L+N-1)//2)\nelse:\n print(N*(2*L+N-1...
['Wrong Answer', 'Accepted']
['s791993472', 's241729538']
[3060.0, 2940.0]
[21.0, 18.0]
[154, 157]
p02994
u912179452
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\nlis = []\nfor n in range(1, N+1):\n azi = L + n - 1\n lis.append(azi)\n\nlis2 = [abs(l) for l in lis]\n\nmin = min(lis2)\ndel lis[min]\n\nprint(sum(lis))', 'N, L = map(int, input().split())\n\n\nlis = []\nfor n in range(1, N+1):\n azi = L + n - 1\n lis.append(azi)\n\n...
['Runtime Error', 'Accepted']
['s255576028', 's319598686']
[3060.0, 3064.0]
[18.0, 17.0]
[184, 196]
p02994
u917101497
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\napplePie = L*(N-1)\nfor i in range(N-1):\n applePie += i\n\nprint(applePie)', 'N,L = map( int, input().split() )\n\napplePie = L*N\nmin = 20000\n\nfor i in range(N):\n applePie += i\n if (L+i)*(L+i) < min*min:\n min = L+i\n\napplePie -= min\n\nprint(applePie)']
['Wrong Answer', 'Accepted']
['s694926412', 's046677504']
[2940.0, 3060.0]
[17.0, 17.0]
[109, 181]
p02994
u919734978
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((l + n-1+l) * n /2 - l)\nelif n <= abs(l):\n print((2 * l + n - 2) * (n-1) / 2)\nelse:\n print(l - 1 * abs(l) / 2 + l + n - 1 + 1 * (l + n - 1) / 2)', 'n, l = map(int, input().split())\n\n\nR = l + n - 1\n\n\nif R <= 0:\n eat = R\nelif l >= 0:\n eat = l\nelse...
['Wrong Answer', 'Accepted']
['s094124107', 's359874889']
[3060.0, 2940.0]
[17.0, 17.0]
[198, 289]
p02994
u921617614
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=range(l,n+l)\nif 0 in ls:\n x=0\nelif all(i>0 for i in ls):\n x=ls[0]\nelse:\n x=ls[n-1]\nprint(n*l+(n-1)*n/2-x)', 'n,l=map(int,input().split())\nls=range(l,n+l)\nif 0 in ls:\n x=0\nelif all(i>0 for i in ls):\n x=ls[0]\nelse:\n x=ls[n-1]\nprint(int((n*l+(n-1)*n/2-x))...
['Wrong Answer', 'Accepted']
['s868902945', 's599482429']
[9188.0, 9132.0]
[30.0, 27.0]
[146, 153]
p02994
u932868243
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(1,n+1):\n ls.append(abs(l-1+i))\nmi=l.index(min(ls))\nprint(n*(l-1)+sum(range(1,n+1))-l-mi)', 'n,l=map(int,input().split())\ns=0\nlist=[]\nfor i in range(1,n+1):\n s+=i\n list.append(abs(l+i-1))\nsum=n*(l-i)+s\nif l-1<-n:\n print(sum+min(list))\nelse:\n print(s...
['Runtime Error', 'Wrong Answer', 'Runtime Error', 'Wrong Answer', 'Runtime Error', 'Runtime Error', 'Wrong Answer', 'Accepted']
['s290042232', 's358157392', 's386013989', 's468358959', 's505290004', 's711658142', 's756543254', 's362015218']
[9136.0, 3060.0, 8884.0, 3064.0, 9036.0, 2940.0, 3060.0, 9172.0]
[23.0, 17.0, 22.0, 17.0, 23.0, 17.0, 17.0, 24.0]
[139, 173, 106, 206, 107, 172, 149, 140]
p02994
u934868410
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 = int(n*(l+n-1)/2)\nif l >= 0:\n print(ans - l)\nelif n-1 >= -l:\n print(ans)\nelse:\n print(ans - (l+n-1))', 'n, l = map(int, input().split())\nans = int(n*(l+(n-1)/2))\nif l >= 0:\n print(ans - l)\nelif l+n-1 >= 0:\n print(ans)\nelse:\n print(ans - (l+n-1))']
['Wrong Answer', 'Accepted']
['s114169487', 's634408271']
[2940.0, 3064.0]
[17.0, 17.0]
[141, 144]
p02994
u937706062
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\tprint(N * ((N - 1) / 2 + L))\nelif L > 0:\n\tprint(N * ((N - 1) / 2 + L) - L)\nelse:\n\tprint(N * ((N - 1) / 2 + L) - L - N + 1)', 'N, L = map(int, input().split())\nif L <= 0 and L + N - 1 >= 0:\n\tprint(int(N * ((N - 1) / 2 + L)))\nelif L > 0:\n\tpr...
['Wrong Answer', 'Accepted']
['s915046805', 's534798315']
[3060.0, 3060.0]
[17.0, 17.0]
[186, 201]
p02994
u942051624
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#L+i-1,i>=1\nnin=10**6\nfor i in range(N):\n if abs(L+i)<nin:\n nin=abs(L+i)\n nn=L+i\n\nans=N*(L-1)+N*(N+1)*0.5-(nn)\n\nprint(ans)', 'N,L=map(int,input().split())\n#L+i-1,i>=1\nnin=10**6\nfor i in range(N):\n if abs(L+i)<nin:\n nin=abs(L+i)\n nn=L+i\n...
['Wrong Answer', 'Accepted']
['s739963825', 's001022503']
[9124.0, 9096.0]
[28.0, 27.0]
[169, 174]
p02994
u943057856
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(N):\n diff = abs(((L-1)*(N-1)-i))\n a_list.append(diff)\n \nprint(sum(list(N+1))-((L-1)*(N-1) - min(a_list)))', 'N,L = map(int,input().split())\nl = list(map(lambda x : L+x+1 , range(1,N+1)))\nprint(sum(l)-min(l,key=min))', 'N,L = map(int,input().sp...
['Runtime Error', 'Runtime Error', 'Wrong Answer', 'Accepted']
['s113346192', 's535530760', 's955277254', 's272692014']
[3060.0, 3316.0, 3316.0, 2940.0]
[17.0, 19.0, 19.0, 17.0]
[172, 106, 106, 134]
p02994
u952467214
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(j) for j in input().split()) \n\ntaste = [L+i-1 for i in range(1,N)]\n\nif L > 0:\n print(sum(taste)-taste[0])\nelse:\n print(sum(taste))', 'N, L = (int(j) for j in input().split()) \n\ntaste = [L+i-1 for i in range(1,N+1)]\n\nif L > 0:\n print(sum(taste)-taste[0])\nelif L + N - 1 <= 0:\n print(su...
['Wrong Answer', 'Accepted']
['s883669144', 's928057416']
[2940.0, 3060.0]
[17.0, 17.0]
[146, 201]
p02994
u952669998
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 = list(range(L,L+N))\n\nm = max(taste)\nfor e in taste:\n if abs(e) < m:\n m = abs(e)\nprint(m,sum(taste) - m)', 'N,L = list(map(int,input().split()))\ntaste = list(range(L,L+N))\n\nm = max(taste)\nfor e in taste:\n if abs(e) < m:\n m = abs(e)\nprint(sum(taste) - m)...
['Wrong Answer', 'Accepted']
['s322753704', 's149099868']
[2940.0, 2940.0]
[17.0, 20.0]
[151, 149]
p02994
u953868469
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...
['apples =str(input())\napples_list = apples.split(" ")\nN = int(apples_list[0])\nL = int(apples_list[-1])\npai_values = []\n\nfor i in range(1,N+1):\n pai_value = i + L -1\n pai_values.append(pai_value)\n\nmin_pai = abs(pai_values[0])\n\nfor j in range(N):\n if min_pai > abs(pai_values[j]):\n min_pai =...
['Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted']
['s212994822', 's278971691', 's639056642', 's112912341']
[3064.0, 3064.0, 3064.0, 3064.0]
[17.0, 17.0, 17.0, 18.0]
[427, 404, 442, 460]
p02994
u957338785
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 = 0\nnum_min = L + 1 - 1\nnum_max = L + N - 1\nif 0 < num_min:\n s = sum([L + i - 1 for i in range(1, N+1)] ) - num_min\nelif num_max < 0:\n s = sum([L + i - 1 for i in range(1, N+1)] ) - num_max\nelse:\n s = sum([L + i - 1 for i in range(1, N+1)] )\nprint(s)', 'N, L = map(int, input().split())\nnum_min = ...
['Runtime Error', 'Accepted']
['s010772089', 's408679358']
[3060.0, 3060.0]
[17.0, 17.0]
[261, 288]
p02994
u957872856
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())\nnum = 0\nl1 = []\nfor i in range(n):\n num += l + i\n print(num)\n if l + n-1 < 0:\n l1.append(num-(l+n-1))\n elif l > 0:\n l1.append(num-(l))\n else:\n l1.append(num)\nif l + n-1 > 0:\n print(max(l1))\nelse:\n print(min(l1))', 'n, l = map(int,input().split())\nsum1 = ...
['Wrong Answer', 'Accepted']
['s329379979', 's916914628']
[3064.0, 3060.0]
[17.0, 17.0]
[259, 205]
p02994
u963963908
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...
['#ABC131 B\n\nN,L = map(int,input().split())\naji = []\ndelta = []\nfor i in range(N):\n aji.append(L + i)\nfor j in range(N):\n delta.append(abs(aji[i]))\nprint(min(delta))', '#ABC131 B\n\nN,L = map(int,input().split())\naji = []\ndelta = []\nfor i in range(N):\n aji.append(L + i)\nfor j in range(N):\n de...
['Wrong Answer', 'Wrong Answer', 'Accepted']
['s209693900', 's234793755', 's659658118']
[9052.0, 8964.0, 9128.0]
[30.0, 25.0, 30.0]
[169, 180, 217]
p02994
u965840662
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\nR=[0]*N\n\nfor kai in range(N):\n R[kai]=L+kai-1\n print(R[kai])\n\n\nkotoae=0\nkotae=0\nif(R[kai]>0):\n for kai1 in range(N):\n kotoae=kotoae+R[kai]\n print(kotae-R[0])\nelse:\n for kai1 in range(N):\n kotae=kotae+R[kai]\n print(kotoae)', 'N,L=map(int,i...
['Wrong Answer', 'Accepted']
['s720867330', 's003405771']
[3064.0, 3064.0]
[18.0, 17.0]
[283, 355]
p02994
u967062796
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-1 for i in range(1, n+1)]\n\napple1 = 10 ** 8\napple2 = -(10 ** 8)\nfor i in taste:\n if i == 0:\n apple = i\n break\n elif (apple2 < i < 0) or (0 < i < apple1):\n apple = i\n \npie = abs(sum(taste) - apple)\n \nprint(pie)', "n, l = m...
['Wrong Answer', 'Accepted']
['s353307771', 's183952380']
[3064.0, 3064.0]
[17.0, 17.0]
[292, 488]
p02994
u968846084
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, X = map(int, input().split())\nL = list(map(int, input().split()))\nB=sum(L)\ncount=1\nif X>=B:\n print(len(L)+1)\nelse:\n i=0\n H=0\n while H<=X:\n H=H+L[i]\n i=i+1\n print(i)', 'N,L=map(int, input().split())\nif N+L-1<=0:\n print(int(L*(N-1)+N*(N-1)/2-N+1))\nelif L>=0:\n print(int(L*(N-1)+N*(N+1)/2-...
['Runtime Error', 'Accepted']
['s502036520', 's841192943']
[3060.0, 3060.0]
[17.0, 17.0]
[178, 164]
p02994
u969848070
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 = []\nfor i in N:\n s.append(i+L)\nt = abs(s)\ndel s[t.index(min(s))]\nprint(sum(s))', 'N, L = map(int, input().split())\ns = []\nfor i in range(N):\n s.append(i+L)\nt = list(map(abs, s))\ndel s[t.index(min(t))]\nprint(sum(s))']
['Runtime Error', 'Accepted']
['s218908576', 's914440952']
[9168.0, 9148.0]
[25.0, 28.0]
[115, 133]
p02994
u970713174
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().strip().split())\n\nringo=[]\n\nfor i in range(n):\n\tringo.append(l+i)\nprint(ringo,sum(ringo))\nmin = abs(ringo[0])\nmin_num = 0\nfor i in range(len(ringo)):\n\tif min > abs(ringo[i]):\n\t\tmin = abs(ringo[i])\n\t\tmin_num = i\nout = 0\nfor i in range(len(ringo)):\n\tif i != min_num:\n\t\tout ...
['Wrong Answer', 'Runtime Error', 'Accepted']
['s540423772', 's671843573', 's511267671']
[3064.0, 3064.0, 3060.0]
[18.0, 17.0, 17.0]
[324, 324, 321]
p02994
u970809473
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())\ntmp = []\nfor i in range(a):\n tmp.append(b+i)\nif b < 0 and a <= abs(b):\n tmp = tmp[:-1]\nelif b >= 0:\n tmp = tmp[1:]\nprint(tmp)', 'a,b = map(int, input().split())\ntmp = []\nfor i in range(a):\n tmp.append(b+i)\nif b < 0 and a <= abs(b):\n tmp = tmp[:-1]\nelif b >= 0:\n tmp...
['Wrong Answer', 'Accepted']
['s192853766', 's566536811']
[3060.0, 3060.0]
[17.0, 18.0]
[160, 165]
p02994
u971237642
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\n\n\n\n\nspline = input().split()\nN = int(spline[0])\nL = int(spline[1])\n\n\ntaste = []\nfor i in range(0+1,N+1): \n taste.append(L+i-1) \n#print(taste)\n\n\ntaste_max = sum(taste)\n#print("max"+str(taste_max))\n\n\nopt_coef = int()\n\n\nfor k in range(0,len(taste)):\n \n taste_a...
['Wrong Answer', 'Accepted']
['s610032921', 's436731868']
[3060.0, 12508.0]
[17.0, 150.0]
[840, 930]
p02994
u973240207
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 collections import defaultdict,deque, Counter\nimport sys,heapq,bisect,math,itertools,string,queue,copy,time\nimport numpy as np\nsys.setrecursionlimit(10**8)\nINF = float('inf')\nmod = 10**9+7\neps = 10**-7\ndef inp(): return int(sys.stdin.readline())\ndef inpl(): return list(map(int, sys.stdin.readline().split...
['Wrong Answer', 'Accepted']
['s979447447', 's070246154']
[12528.0, 12472.0]
[155.0, 152.0]
[551, 597]
p02994
u977661421
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())\n\ntaste = []\nfor i in range(1,N + 1):\n taste.append(L + i - 1)\n\nSUM = sum(taste)\n\nDIF = abs(SUM - (SUM - taste[0]))\nans = SUM - taste[0]\nfor i in range(1,N + 1):\n x = SUM - taste[i]\n if abs(SUM - x) < DIF:\n DIF = abs(SUM - x)\n ...
['Runtime Error', 'Accepted']
['s356931447', 's829363855']
[3060.0, 2940.0]
[17.0, 17.0]
[324, 208]
p02994
u978252828
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 = list(input())\n\nif (S[0]==S[1])or(S[1]==S[2])or(S[2]==S[3]):\n print('Bad')\nelse:\n print('Good')\n", 'N,L = map(int,input().split())\nimport math\nT = []\nfor i in range(N):\n T.append(L+i)\ncnt = 0\nmcnt = sum(T)\nk = 1000000\nfor i in range(0,N):\n if abs(T[i])<k:\n mcnt = sum(T)-T[i]\n cnt = i+1\n...
['Runtime Error', 'Accepted']
['s086582210', 's420413654']
[2940.0, 3060.0]
[17.0, 18.0]
[101, 223]
p02994
u985648232
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\napples = [0] * N\n\nate_apple = 100\napple_pie = 0\n\nfor i in range(N):\n apples[i] = L + i\n apple_pie += apples[i]\n if ate_apple > apples[i]:\n ate_apple = apples[i]\n\nprint(apple_pie - (ate_apple * 2))', 'N, L = list(map(int, input().split()))\n\napples = [0] * N\...
['Wrong Answer', 'Accepted']
['s878707727', 's028751457']
[3060.0, 2940.0]
[17.0, 18.0]
[242, 247]
p02994
u986884213
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]\nif l >= 0:\n print((n-1)*(2*l+n)/2)\nelif l+n-1 <= 0:\n print((n-1)*(2*l+n-2)/2)\nelse:\n print(n*(2*l+n-1)/2)', 'i = list(map(int, input().split()))\nn = i[0]\nl = i[1]\nif l >= 0:\n print(round((n-1)*(2*l+n)/2))\nelif l+n-1 <= 0:\n print(round(...
['Wrong Answer', 'Accepted']
['s608952949', 's871151139']
[3060.0, 3064.0]
[17.0, 18.0]
[168, 189]
p02994
u988957245
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 = 30\n# L = -50\nT_N = (N**2 + (2*L -1)*N)/2\n# print(T_N)\narray = []\nnum = 0\nfor i in range(1,N+1):\n T_i = L + i -1\n T_Ni = T_N - T_i\n# print(T_i)\n T_abs = abs(T_N - T_Ni)\n array.append(T_abs)\n if (min(array) == T_abs):\n num = T_Ni\n# print(ar...
['Wrong Answer', 'Accepted']
['s417691259', 's661639791']
[3060.0, 3060.0]
[18.0, 17.0]
[318, 323]
p02994
u991269553
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.5 * n * (2 * l + n -1)\n\ns = list(l+i-1 for i in range(n+1))\na = list(sum - int(abs(s[j])) for j in range(1,n+1))\n\nif max(a) > 0:\n print(max(a))\nelse:\n print(sum - max(s))', 'n,l = map(int,input().split())\nsum = 0.5 * n * (2 * l + n -1)\n\ns = list(l+i-1 f...
['Wrong Answer', 'Wrong Answer', 'Accepted']
['s061558393', 's923472144', 's236327271']
[3064.0, 3060.0, 3188.0]
[17.0, 18.0, 18.0]
[223, 166, 272]
p02994
u992910889
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())\ntaste=list(range(L,L+N))\nmin_abs=10**5\nfor i in range(N):\n if abs(sum(taste)-taste[i])<min_abs:\n min_abs=abs(sum(taste)-taste[i])\n rec=taste[i]\n \n \nprint(sum(taste)-taste[i])', 'import numpy as np\n\nN,L=map(int,input().split())\ntaste=list(range(...
['Wrong Answer', 'Accepted']
['s125176738', 's005229536']
[3060.0, 12508.0]
[17.0, 151.0]
[235, 290]
p02994
u995193964
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(input())\nL = int(input())\n\naji = [(i+1)+L-1 for i in range(N)]\nmin = min(list(map(abs, aji)))\nprint(sum(aji)-min)', 'N = int(input())\nL = int(input())\n\naji = [(i+1)+L-1 for i in range(N)]\nabs = list(map(abs, aji))\nindex = abs.index(min(abs))\n\nprint(sum(aji)-aji[index])', 'N = int(input())\nL = int...
['Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted']
['s407232380', 's418186557', 's786963663', 's745753935']
[2940.0, 3064.0, 3060.0, 2940.0]
[18.0, 18.0, 17.0, 17.0]
[121, 152, 121, 150]
p02994
u998082063
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())\nL = a\nR = a + n - 1\nprint(L)\nprint(R)\neat = 0\nif R <= 0:\n eat = R\nelif L >= 0:\n eat = L\n\nans = (R+L) * (R-L+1) / 2 - eat\nprint(int(ans))', 'n, a = map(int, input().split())\nL = a\nR = a + n - 1\neat = 0\nif R <= 0:\n eat = R\nelif L >= 0:\n eat = L\n\nans = (R...
['Wrong Answer', 'Accepted']
['s662876787', 's226720508']
[3060.0, 3060.0]
[17.0, 17.0]
[175, 157]
p02995
u007991836
2,000
1,048,576
You are given four integers A, B, C, and D. Find the number of integers between A and B (inclusive) that can be evenly divided by neither C nor D.
['from fractions import gcd\nA,B,C,D = map(int,input().split())\n\nC_mod0 = B//C - (A-1)//C\nD_mod0 = B//D - (A-1)//D\nCD_mod0 = B*math.gcd(C,D)//(C*D) -(A-1)*math.gcd(C,D)//(C*D)\nTotal = B - A + 1\nans = Total - C_mod0 - D_mod0 + CD_mod0\n\nprint(ans)\n', 'A,B,C,D = map(int,input().split())\n\nC_mod0 = B//C - (A-1)//...
['Runtime Error', 'Accepted']
['s825936875', 's233854961']
[5052.0, 3060.0]
[35.0, 17.0]
[243, 262]
p02995
u008582165
2,000
1,048,576
You are given four integers A, B, C, and D. Find the number of integers between A and B (inclusive) that can be evenly divided by neither C nor D.
['def gcd(m, n):\n x = max(m,n)\n y = min(m,n)\n if x%y == 0:\n return y\n else:\n while x %y != 0:\n z = x % y\n x = y\n y = z\n else:\n return z\n\ndef lcm(x, y):\n return (x * y) // gcd(x, y)\na,b,c,d = map(int,input().split())\ncount = ...
['Wrong Answer', 'Runtime Error', 'Wrong Answer', 'Wrong Answer', 'Accepted']
['s409211337', 's645783328', 's846853403', 's956484339', 's960216750']
[3060.0, 3056.0, 3064.0, 3064.0, 3064.0]
[17.0, 17.0, 17.0, 17.0, 19.0]
[408, 213, 467, 463, 475]
p02995
u017415492
2,000
1,048,576
You are given four integers A, B, C, and D. Find the number of integers between A and B (inclusive) that can be evenly divided by neither C nor D.
['import fractions\na,b,c,d=map(int,input().split())\ncount=0\ne=(c*d)//fractions.gcd(c,d)\nD=[c,d,e]\nf=[]\n\nfor i in D:\n f.append((b//i)-(a//i))\nprint(b-a+1-f[0]-f[1]+f[2])', 'import math\na,b,c,d=map(int,input().split())\nlcm=(c*d)//math.gcd(c,d)\nprint((b-(b//c+b//d-b//lcm))-(a-1-((a-1)//d+(a-1)//c-(a-1)//lcm))...
['Wrong Answer', 'Accepted']
['s230526078', 's004100980']
[5564.0, 9120.0]
[41.0, 25.0]
[167, 136]
p02995
u023141436
2,000
1,048,576
You are given four integers A, B, C, and D. Find the number of integers between A and B (inclusive) that can be evenly divided by neither C nor D.
['def gcd(a,b):\n\tif b == 0:\n\t\treturn a\n\telse:\n\t\treturn gcd(b , a%b)\t\n\na,b,c,d = map(int,input().split())\nt = 0\nl = b-a+1\n\nc_count = (b // c) - ((a-1) // c)\n\nd_count = (b // d) - ((a-1) // d)\n\nlc = gcd(c,d)\nlc_count = (b // lc) - ((a-1) // lc)\n\nprint(l-c_count-d_count+lc_count)', 'def lcm(x, y):\...
['Wrong Answer', 'Runtime Error', 'Runtime Error', 'Accepted']
['s430345922', 's454024916', 's992376348', 's395505558']
[3064.0, 3064.0, 3064.0, 3064.0]
[17.0, 17.0, 18.0, 18.0]
[275, 313, 326, 284]
p02995
u023229441
2,000
1,048,576
You are given four integers A, B, C, and D. Find the number of integers between A and B (inclusive) that can be evenly divided by neither C nor D.
['a,b,c,d=map(int,input().split())\ndef gcd(a,b):\n if b==0: return a\n else:\n return gcd(b,a%b)\ndef lcm(a,b):\n return a*b//gcd(a,b)\n\nans=0\nans+=b//c-(a-1)//c\nans+=b//d-(a-1)//d\nq=lcm(c,d)\nans+=b//q-(a-1)//q\nprint(ans)', 'a,b,c,d=map(int,input().split())\na-=1\ndef gcd(a,b):\n if b==0: retu...
['Wrong Answer', 'Accepted']
['s519493368', 's034341949']
[3064.0, 9060.0]
[17.0, 27.0]
[229, 229]
p02995
u027002244
2,000
1,048,576
You are given four integers A, B, C, and D. Find the number of integers between A and B (inclusive) that can be evenly divided by neither C nor D.
['\na, b, c, d = map(int, input().split())\n\ncc = (b // c)- ((a - 1) // c)\ndd = (b // d)- ((a - 1) // d)\n\nf = [c]\nx = 10000000\nk = [c, d]\n\nwhile x != 0:\n x = max(k) % min(k)\n\n if x != 0:\n f.append(x)\n k.sort()\n k[1] = x\n# $print(min(f))\n\n\ncd =(b // (c * d / min(f)))- ((a - 1) // (c ...
['Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Accepted']
['s210363427', 's480012768', 's880397010', 's868250197']
[3064.0, 3064.0, 3064.0, 3064.0]
[18.0, 17.0, 17.0, 18.0]
[345, 345, 361, 396]
p02995
u028620830
2,000
1,048,576
You are given four integers A, B, C, and D. Find the number of integers between A and B (inclusive) that can be evenly divided by neither C nor D.
['import math\n\ntemp = input().split(" ")\nmin = int(temp[0])\nmax = int(temp[1])\ndivisor1 = int(temp[2])\ndivisor2 = int(temp[3])\ndivisors = [divisor1,divisor2] if divisor1 > divisor2 else [divisor2, divisor1]\n\ndef gcd(a,b):\n x = a\n y = b\n mod = b\n while x % y != 0:\n mod = x % y\n x...
['Wrong Answer', 'Wrong Answer', 'Accepted']
['s827875864', 's918413734', 's061216270']
[3064.0, 3064.0, 3064.0]
[18.0, 17.0, 18.0]
[723, 772, 699]
p02995
u029452384
2,000
1,048,576
You are given four integers A, B, C, and D. Find the number of integers between A and B (inclusive) that can be evenly divided by neither C nor D.
['import numpy as np\nimport math\n\nA,B,C,D = map(int, input().split())\n\nc = (B - B%C) / B - ((A-1) - (A-1)%C)/C\nd = (B - B%D) / B - ((A-1) - (A-1)%D)/D\n\nCD = (C * D - (C * D % math.gcd(C, D))) / math.gcd(C, D)\ncd = (B - B%CD) / B - ((A-1) - (A-1)%CD)/CD\n\nans = B - (A-1) - (c + d - cd)\nans = int(ans)\n...
['Runtime Error', 'Accepted']
['s849662823', 's358528674']
[21136.0, 3064.0]
[288.0, 18.0]
[316, 233]
p02995
u031132940
2,000
1,048,576
You are given four integers A, B, C, and D. Find the number of integers between A and B (inclusive) that can be evenly divided by neither C nor D.
['import math\n\nA,B,C,D = map(int,input().split())\n\nn_c = B//C - (A-1)//C\nn_d = B//D - (A-1)//D\nlcm_cd = C*D // math.gcd(C,D)\nprint(lcm_cd)\nn_cd = B//lcm_cd - (A-1)//lcm_cd\n\nprint(B-A+1 - (n_c+n_d-n_cd))\n', 'A,B,C,D = map(int,input().split())\n\ndef gcd(a,b):\n while b:\n a,b = b,a%b\n return a\n...
['Runtime Error', 'Accepted']
['s983371700', 's742144611']
[3060.0, 3060.0]
[17.0, 17.0]
[201, 231]
p02995
u032798323
2,000
1,048,576
You are given four integers A, B, C, and D. Find the number of integers between A and B (inclusive) that can be evenly divided by neither C nor D.
['import math\nA,B,C,D = list(map(int,input().split()))\n\ndef lcm(x, y):\n return (x * y) // math.gcd(x, y)\n \n\nCD = lcm(C,D)\n\nCD1 = (A//CD +1)*CD\n\nkyoutuu = (B-CD1)//CD\n\nC1 = (A//C + 1)*C\nCnum = (B - C1)//C\n\nD1 =(A//D +1)*D\nDnum = (B - D1)//D\n\nprint(B-A-Cnum-Dnum+kyoutuu)', 'import math\nl = list(...
['Wrong Answer', 'Accepted']
['s487221479', 's794182109']
[9104.0, 9148.0]
[27.0, 31.0]
[273, 257]
p02995
u038887660
2,000
1,048,576
You are given four integers A, B, C, and D. Find the number of integers between A and B (inclusive) that can be evenly divided by neither C nor D.
['A, B, C, D = map(int, input().split())\ndef div_num(a, b, c):\n if (a%c)==0:\n return (b//c)-(a//c)+1\n else:\n return (b//c)-(a//c)\ndef gcd(a, b):\n while b:\n a, b = b, a % b\n return a\nXC = div_num(A, B, C)\nXD = div_num(A, B, D)\nprint("XC==={}, XD==={}, XCD==={}".format(XC,XD...
['Runtime Error', 'Accepted']
['s419600391', 's985602218']
[3064.0, 3064.0]
[17.0, 18.0]
[337, 320]
p02995
u042385277
2,000
1,048,576
You are given four integers A, B, C, and D. Find the number of integers between A and B (inclusive) that can be evenly divided by neither C nor D.
['A, B, C, D = map(int, input().split())\nnum = 0\nfor i in range(A, B+1):\n if i % C = 0:\n num += 1\n elif i % D = 0:\n num += 1\nx_num = B - A + 1 - num\nprint(x_num)\n', 'A, B, C, D = map(int, input().split())\ndef gcd(a, b):\n if a < b:\n a, b = b, a\n a, b = b, a % b\n if b == ...
['Runtime Error', 'Accepted']
['s394873561', 's430589167']
[2940.0, 3060.0]
[17.0, 18.0]
[180, 288]
p02995
u042764503
2,000
1,048,576
You are given four integers A, B, C, and D. Find the number of integers between A and B (inclusive) that can be evenly divided by neither C nor D.
["nums = input()\nintNums = []\n\ndef saidaiKouYaku(a, b):\n if a < b:\n tmp = a\n a = b\n b = tmp\n\n r = a % b\n while(r != 0):\n a = b\n b = r\n r = a % b\n return b\n\n\nfor n in nums.split():\n intNums.append(int(n))\n \nif len(intNums) == 4 and intNums[0...
['Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Accepted']
['s027792736', 's110369498', 's768773186', 's504686438']
[3064.0, 3064.0, 3064.0, 3064.0]
[18.0, 17.0, 18.0, 18.0]
[1204, 748, 1225, 1217]
p02995
u047393579
2,000
1,048,576
You are given four integers A, B, C, and D. Find the number of integers between A and B (inclusive) that can be evenly divided by neither C nor D.
['import fractions\nA, B, C, D = map(int, input().split())\ndiff = B - A + 1\ncount_c = int(B/C) - int((A-1)/C)\ncount_d = int(B/D) - int((A-1)/D)\ncd = int(C*D / fractions.gcd(C,D))\ncount_cd = int(B/cd) - int((A-1)/cd)\nprint(diff - count_c - count_d + count_cd)', 'import fractions\nA, B, C, D = map(int, input().spli...
['Wrong Answer', 'Wrong Answer', 'Accepted']
['s305172030', 's837923286', 's948026858']
[5048.0, 5048.0, 3064.0]
[35.0, 35.0, 18.0]
[255, 253, 289]
p02995
u054825571
2,000
1,048,576
You are given four integers A, B, C, and D. Find the number of integers between A and B (inclusive) that can be evenly divided by neither C nor D.
['import math\n\nA,B,C,D = map(int, input().split())\na = B//C - A//C\nb = B//D - A//D\nc = B//math.gcd(C,D) - A//math.gcd(C,D)\nprint(a+b-c)', 'import math\n \nA,B,C,D = map(int, input().split())\na = B//C - (A-1)//C\nb = B//D - (A-1)//D\nlcm = C*D//math.gcd(C,D)\nc = B//lcm - (A-1)//lcm\nprint(B-(A-1)-(a+b-c))']
['Wrong Answer', 'Accepted']
['s485908981', 's327979364']
[9076.0, 9088.0]
[26.0, 28.0]
[133, 161]
p02995
u056277698
2,000
1,048,576
You are given four integers A, B, C, and D. Find the number of integers between A and B (inclusive) that can be evenly divided by neither C nor D.
['# -*- coding: utf-8 -*-\ndef gcd(a, b):\n while b != 0:\n a, b = b, a%b\n return a\n\ndef lcm(a, b):\n return a*b // gcd(a, b)\n\ndef anti_division_iter(a, b, r):\n n = b // r\n m = (a-1) // r\n return n - m\n\na, b, c, d = map(int, input().split())\n\ndiv_c = anti_division_iter(a, b, c)\ndiv...
['Wrong Answer', 'Accepted']
['s938771920', 's264083611']
[3064.0, 3064.0]
[17.0, 18.0]
[450, 422]
p02995
u057079894
2,000
1,048,576
You are given four integers A, B, C, and D. Find the number of integers between A and B (inclusive) that can be evenly divided by neither C nor D.
['import math\na,b,c,d=map(int,input().split())\nans=b-a+1\nans-=b//c-(a-1)//c\nans-=b//d-(a-1)//d\ne=math.gcd(a,b)\nans+=b//e-(a-1)//e\nprint(ans)', 'a,b,c,d=map(int,input(),split())\nans=b-a+1\nans-=b//c-(a-1)//c\nans-=b//d-(a-1)//d\ne=c*d\nans+=b//e-(a-1)//e\nprint(ans)\n', 'a,b,c,d=map(int,input().funcsplit())\nans...
['Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted']
['s076108003', 's185662892', 's462110839', 's983997167', 's933419903']
[3060.0, 2940.0, 3064.0, 2940.0, 3064.0]
[17.0, 17.0, 17.0, 17.0, 17.0]
[138, 117, 120, 112, 247]
p02995
u060793972
2,000
1,048,576
You are given four integers A, B, C, and D. Find the number of integers between A and B (inclusive) that can be evenly divided by neither C nor D.
['a,b,c,d=map(int, input().split())\nfor i in range(c,1,-1):\n if c % i == 0 and d % i == 0:\n s = i\n break\ns = (c // s) * (d // s) * s\nprint(b - a + 1 - b//c + a//c - b//d + a//d + b//s - a//s)', 'a,b,c,d=map(int, input().split())\nfor i in range(c,1,-1):\n if c % i == 0 and d % i == 0:\n ...
['Runtime Error', 'Runtime Error', 'Accepted']
['s656755958', 's770829978', 's072440048']
[3060.0, 3060.0, 3060.0]
[2104.0, 2104.0, 18.0]
[221, 231, 286]
p02995
u061982241
2,000
1,048,576
You are given four integers A, B, C, and D. Find the number of integers between A and B (inclusive) that can be evenly divided by neither C nor D.
['#3\n\na,b,c,d = map(int,input().split())\nx,y = c,d\n\nwhile y != 0:\n\tx,y =y,x%y\nx = (c*d)//x\n\ncount1 = b - (b//c + b//d -b//x)\ncount2 = (a - 1) - (a//c + a//d -a//x) \n\nprint(count1 - count2)', 'a,b,c,d = map(int,input().split())\nx,y = c,d\n\nwhile y != 0:\n\tx,y =y,x%y\nx = (c*d)//x\n\ncount1 = b - (b//c + ...
['Wrong Answer', 'Accepted']
['s282056051', 's190309709']
[3060.0, 3060.0]
[17.0, 17.0]
[186, 193]
p02995
u073852194
2,000
1,048,576
You are given four integers A, B, C, and D. Find the number of integers between A and B (inclusive) that can be evenly divided by neither C nor D.
['import fractions\na,b,c,d = map(int, input().split())\n\np = b//c - a//c\nq = b//d - a//d\nr = b*fractions.gcd(c,d)//(c*d)\nprint(b-a+1-p-q+r)', 'import fractions\na,b,c,d = map(int, input().split())\n\np = b//c - a//c\nq = b//d - a//d\nr = b*fractions.gcd(c,d)//(c*d) - a*fractions.gcd(c,d)//(c*d)\nprint(b-a+1-p-q+r)...
['Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Accepted']
['s408850264', 's759805935', 's956498465', 's743591350']
[5052.0, 5304.0, 5048.0, 3064.0]
[36.0, 39.0, 37.0, 17.0]
[136, 166, 139, 216]
p02995
u076664746
2,000
1,048,576
You are given four integers A, B, C, and D. Find the number of integers between A and B (inclusive) that can be evenly divided by neither C nor D.
['a,b,c,d = map(int, input().split())\nres = 0\nfor i in range(a,b+1):\n if i % c == 0 and i % d == 0:\n if a % (c*d) == 0 or b % (c*d) == 0:\n res -= 1\n res -= (b-i)//(c*d)\n elif i % c == 0:\n if a % c == 0 or b % c == 0:\n res += 1\n res += (b-i)//c\n else:\n if a % d == 0 or b % d == 0:...
['Wrong Answer', 'Accepted']
['s026020210', 's700975473']
[3064.0, 3064.0]
[2104.0, 18.0]
[361, 466]
p02995
u085054341
2,000
1,048,576
You are given four integers A, B, C, and D. Find the number of integers between A and B (inclusive) that can be evenly divided by neither C nor D.
['def gcd(a,b):\n while b != 0:\n temp = b\n b = a%b\n a = temp\n return a\nA,B,C,D = map(int,input().split())\nif C >=D ;\n lc = int(C*D/gcd(C,D))\nelse: lc = int(C*D/gcd(D,C))\nA = A-1\nA_n = A - (A//C + A//D - A//lc)\nB_n = B - (B//C + B//D - B//lc)\nprint(int(B_n-A_n))', 'def gcd(a,b):...
['Runtime Error', 'Accepted']
['s275025410', 's064311360']
[2940.0, 3064.0]
[17.0, 17.0]
[288, 287]
p02995
u085717502
2,000
1,048,576
You are given four integers A, B, C, and D. Find the number of integers between A and B (inclusive) that can be evenly divided by neither C nor D.
['#!/usr/bin/env python\n# coding: utf-8\n\n# In[129]:\n\n\nimport fractions\n\n\n# In[124]:\n\n\nA, B, C, D = map(int, input().split())\n\n\n# In[137]:\n\n\nlcm = int(C*D / fractions.gcd(C, D))\n\n\n# In[138]:\n\n\nc_part_a = int((A - 1) / C)\nd_part_a = int((A - 1) / D)\ncd_part_a = int((A - 1) / lcm)\n\nc_part_b = i...
['Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Accepted']
['s029400046', 's683078721', 's884140512', 's877054117']
[5048.0, 5176.0, 5048.0, 9076.0]
[35.0, 38.0, 35.0, 30.0]
[507, 487, 505, 311]
p02995
u091051505
2,000
1,048,576
You are given four integers A, B, C, and D. Find the number of integers between A and B (inclusive) that can be evenly divided by neither C nor D.
['a, b, c, d = map(int, input().split())\nl = lcm(c, d)\nbad = (b // c) - ((a-1) // c) + (b // d) - ((a-1) // d) - (b // l) + ((a-1) // l)\nans = b - a + 1 - bad\nprint(ans)', 'def gcd(a,b):\n while b!=0:\n a,b=b,a%b\n return a\ndef lcm(x, y):\n return (x * y) // gcd(x, y)\n\na, b, c, d = map(int, input().split...
['Runtime Error', 'Accepted']
['s163041589', 's323032430']
[3060.0, 3064.0]
[18.0, 17.0]
[167, 268]
p02995
u092278825
2,000
1,048,576
You are given four integers A, B, C, and D. Find the number of integers between A and B (inclusive) that can be evenly divided by neither C nor D.
['import math\na,b,c,d = map(int, input().split())\n \n\nfirst = [c,d%c]\nfirst.sort()\nif d%c==0:\n cd = c\nelif first[0]==1:\n cd = 1\nelse:\n while first[0]>=2:\n first[1] = first[1]%first[0]\n first.sort()\n if first[0]==0:\n cd = first[1]\n elif first[0]==1:\n cd = 1\nlcm = c*d/cd\n \...
['Wrong Answer', 'Wrong Answer', 'Accepted']
['s392489695', 's585754110', 's305086020']
[3316.0, 3064.0, 3064.0]
[21.0, 17.0, 17.0]
[489, 489, 681]
p02995
u093384595
2,000
1,048,576
You are given four integers A, B, C, and D. Find the number of integers between A and B (inclusive) that can be evenly divided by neither C nor D.
['import math\n\ndef ceil(x, y):\n res = int(math.ceil(x/y))\n return res if x//y!=0 else 0\n\nA,B,C,D = list(map(int, input().split()))\nlow = ceil(A,C) + ceil(A,D) + ceil(A, C*D)\nhigh = B//C + B//D + B//(C*D)\nprint(B - A - (high - low))', 'def calc_gcd(x,y):\n amari = max(x,y)%min(x,y)\n if amari == 0:\...
['Wrong Answer', 'Accepted']
['s568565305', 's393618212']
[3060.0, 3064.0]
[17.0, 17.0]
[235, 347]