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
p02983
u891422384
2,000
1,048,576
You are given two non-negative integers L and R. We will choose two integers i and j such that L \leq i < j \leq R. Find the minimum possible value of (i \times j) \mbox{ mod } 2019.
["L,R = map(int,input().split())\n\nif (R//2019-L//2019)>0: \n print(0)\n exit(0)\n \nif (R//673-L//673)>0:\n print(0)\n exit(0)\n \nll, rr = L//2019, R//2019\nfor i in range(1, 2018):\n for j in range(ll,rr+1):\n l_, r_ = j*2019+i,j*2019+i+1\n print('%d %d'%(l_,r_))\n if L<=l_ and r_<=R:\n print((...
['Wrong Answer', 'Accepted']
['s605012808', 's623752796']
[3188.0, 2940.0]
[20.0, 761.0]
[346, 172]
p02983
u892687772
2,000
1,048,576
You are given two non-negative integers L and R. We will choose two integers i and j such that L \leq i < j \leq R. Find the minimum possible value of (i \times j) \mbox{ mod } 2019.
['import sys\nL,R = map(int,input().split())\nfor i in range(L,R+1):\n if i%2019 = 0:\n print(0)\n sys.exit()\nfor i in range(l,r):\n for j in range(i+1,r+1):\n a = (i*j)%2019\n c.append(a)\nprint(min(c))\n', 'L,R = map(int,input().split())\nl = L%2019\nr = R%2019\nprint(l,r)\n...
['Runtime Error', 'Wrong Answer', 'Accepted']
['s632185081', 's689743960', 's297052009']
[2940.0, 75416.0, 75412.0]
[17.0, 586.0, 596.0]
[235, 228, 265]
p02983
u893063840
2,000
1,048,576
You are given two non-negative integers L and R. We will choose two integers i and j such that L \leq i < j \leq R. Find the minimum possible value of (i \times j) \mbox{ mod } 2019.
['l, r = map(int, input().split())\n\ni_max =\tmin(r, l+2019)\nmod_min = 2019\nfor i in range(l, i_max):\n j_max = min(r, i+2019)\n for\tj in range(i+1, j_max+1):\n\tmod = (i*j) % 2019\n if mod < mod_min:\n mod_min = mod\n\nprint(mod_min)', 'l, r = map(int, input().split())\n\ni_max = min(r, l+2...
['Runtime Error', 'Accepted']
['s089763260', 's782503503']
[2940.0, 2940.0]
[17.0, 1071.0]
[246, 254]
p02983
u896206464
2,000
1,048,576
You are given two non-negative integers L and R. We will choose two integers i and j such that L \leq i < j \leq R. Find the minimum possible value of (i \times j) \mbox{ mod } 2019.
['L, R = [int(_) for _ in input().split()]\n\n# L, R = [2019 * 2 - 2014, 2019 * 2 + 1]\nLR_res = [L % 2019, R % 2019]\nLR_res.sort()\nl, r = LR_res\nprint(l, r)\nans = 2018\nfor i in range(l, r + 1):\n for j in range(i + 1, r + 1):\n ans = min(ans, (i * j) % 2019)\n # print(i,j)\n if ans == 0:\n...
['Wrong Answer', 'Accepted']
['s170253061', 's440960868']
[3064.0, 3060.0]
[54.0, 60.0]
[358, 336]
p02983
u896741788
2,000
1,048,576
You are given two non-negative integers L and R. We will choose two integers i and j such that L \leq i < j \leq R. Find the minimum possible value of (i \times j) \mbox{ mod } 2019.
['a,s=map(int,input().split())\nif s-a<2019:\n a=0\n for i in range(a,s):\n for f in range(i+1,s+1):\n a=max(a,((i%2019)*(f%2019))%2019)\n print(a)\nelse:\n print(2018)', 'a,s=map(int,input().split())\nif s-a<2019:\n ans=0\n for i in range(a,s):\n for f in range(i+1,s+1):\n ans=max(ans,((i...
['Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Accepted']
['s155101177', 's262954760', 's491321587', 's545376343', 's534526304']
[3060.0, 3060.0, 3060.0, 3060.0, 3064.0]
[2104.0, 951.0, 978.0, 983.0, 685.0]
[174, 182, 179, 181, 185]
p02983
u899975427
2,000
1,048,576
You are given two non-negative integers L and R. We will choose two integers i and j such that L \leq i < j \leq R. Find the minimum possible value of (i \times j) \mbox{ mod } 2019.
['l,r = map(int,input().split())\nans = 2019\nmod = 2019\n\nif r//mod - l//mod >= 1:\n print(0)\n exit()\n \nl = l%mod\nr = r%mod\n\nif r < l:\n print(0)\n exit()\n\nfor i in range(l,r):\n for j in range(i,r+1):\n ans = min(ans,i*j%mod)\nprint(ans)', 'l,r = map(int,input().split())\nans = 2019\nmod = 2019\n\nf...
['Wrong Answer', 'Accepted']
['s451046580', 's997054924']
[3064.0, 3060.0]
[674.0, 58.0]
[237, 186]
p02983
u904331908
2,000
1,048,576
You are given two non-negative integers L and R. We will choose two integers i and j such that L \leq i < j \leq R. Find the minimum possible value of (i \times j) \mbox{ mod } 2019.
['l.r = map(int,input().split())\n\nmod = 2019\na = l%2019\nb = l%2019\n\nif r-l >= 2018:\n print(0)\n\nelse:\n if a < b:\n print(a*a+1)\n else:\n print(0)', 'l,r = map(int,input().split())\nmod = 2019\na = l%mod\nb = r%mod\n\nif r-l >= 2018:\n print(0)\n\nelse:\n if a > b:\n print(0)\n else:\n...
['Runtime Error', 'Accepted']
['s472768311', 's750708737']
[8988.0, 9148.0]
[30.0, 298.0]
[149, 316]
p02983
u904804404
2,000
1,048,576
You are given two non-negative integers L and R. We will choose two integers i and j such that L \leq i < j \leq R. Find the minimum possible value of (i \times j) \mbox{ mod } 2019.
['L,R = list(map(int,input().split()))\n\nfrom collections import defaultdict\n\nd = defaultdict(int)\n\nfor i in range(L,R+1):\n d[i%2019] += 1\n if d[0]>0 and len(d)>1:\n break\n\nprint(d)\ncnt = 0\nans = list()\n\nfor k,v in sorted(d.items()):\n _v = v\n \n while _v > 0:\n cnt +=1\n ans += [k]\n _v ...
['Wrong Answer', 'Accepted']
['s011148986', 's139245949']
[3700.0, 3060.0]
[22.0, 517.0]
[392, 253]
p02983
u905248616
2,000
1,048,576
You are given two non-negative integers L and R. We will choose two integers i and j such that L \leq i < j \leq R. Find the minimum possible value of (i \times j) \mbox{ mod } 2019.
['#%%\nimport sys\ndef input():\n return sys.stdin.readline().rstrip()\n\ndef main():\n L, R = map(int, input().split())\n\n R_r = R%2019\n if (R - L) >= R_r :\n print(0)\n else:\n L_r = L%2019\n ans = (L_r*(L_r+1))%2019\n for l in range(L_r, R_r):\n for r in range(...
['Wrong Answer', 'Accepted']
['s691883951', 's016953080']
[13012.0, 3060.0]
[2104.0, 525.0]
[527, 490]
p02983
u905582793
2,000
1,048,576
You are given two non-negative integers L and R. We will choose two integers i and j such that L \leq i < j \leq R. Find the minimum possible value of (i \times j) \mbox{ mod } 2019.
['l,r = map(int,input().split())\nif r-l>=2019:\n print(0)\n exit()\nl = l%2019\nr = r%2019\nans = 2018\nfor i in range(l):\n for j in range(r):\n ans = min(ans,i*j%2019)\nprint(ans) ', 'l,r = map(int,input().split())\nif r-l>=2019:\n print(0)\n exit()\nl = l%2019\nr = r%2019\nans = 2018\nfor i in range(l,r)...
['Wrong Answer', 'Accepted']
['s785932297', 's973090934']
[3060.0, 3060.0]
[980.0, 649.0]
[180, 184]
p02983
u908383794
2,000
1,048,576
You are given two non-negative integers L and R. We will choose two integers i and j such that L \leq i < j \leq R. Find the minimum possible value of (i \times j) \mbox{ mod } 2019.
["import itertools\n\nL, R = map(int, input().split())\ncomb = itertools.combinations(range(L, R + 1), 2)\nresult = float('inf')\nfor a, b in comb:\n mod = a * b % 2019\n if mod == 0:\n result = 0\n break\n else mod < result:\n result = mod\nprint(result)", "L, R = map(int, input().split()...
['Runtime Error', 'Accepted']
['s730106448', 's523523474']
[3064.0, 3060.0]
[17.0, 439.0]
[271, 344]
p02983
u912147518
2,000
1,048,576
You are given two non-negative integers L and R. We will choose two integers i and j such that L \leq i < j \leq R. Find the minimum possible value of (i \times j) \mbox{ mod } 2019.
['L, R = map(int, input().split())\nL %= 2019\nR %= 2019\nif L > R:\n R += 2019\n\nval = 2019\nfor i in range(L, R):\n for j in range(i + 1, R+1):\n tmp = (i*j) % 2019\n print(tmp)\n val = tmp if val > tmp else val\n\nprint(val)\n', 'L, R = map(int, input().split())\nif L >= 2019 or R >= 2019...
['Wrong Answer', 'Wrong Answer', 'Accepted']
['s162934455', 's726110513', 's606085244']
[12240.0, 3060.0, 3060.0]
[1886.0, 18.0, 60.0]
[241, 351, 335]
p02983
u912179452
2,000
1,048,576
You are given two non-negative integers L and R. We will choose two integers i and j such that L \leq i < j \leq R. Find the minimum possible value of (i \times j) \mbox{ mod } 2019.
['L, R = map(int, input().split())\n\nmodule = []\nfor i in range(L, R):\n for j in range(i+1, R+1):\n print("({} * {}) mod 2019 = {}".format(i, j, (i * j) % 2019))\n if (i * j) % 2019 == 0:\n print("0")\n exit()\n else:\n module.append((i * j) % 2019)\n\nif not ...
['Wrong Answer', 'Accepted']
['s811968885', 's306497506']
[11132.0, 6800.0]
[210.0, 66.0]
[358, 359]
p02983
u912650255
2,000
1,048,576
You are given two non-negative integers L and R. We will choose two integers i and j such that L \leq i < j \leq R. Find the minimum possible value of (i \times j) \mbox{ mod } 2019.
['L ,R = map(int,input().split())\n\nans =[]\nif R - L <= 2019:\n for i in range(L,R+1):\n for j in range(i+1,R+1):\n ans.append(i*j%2019)\n if i*j% == 0 :\n exit()\n\nprint(min(ans))\n', 'L ,R = map(int,input().split())\n\nans =[]\n for i in range(L,R+1):\n for ...
['Runtime Error', 'Runtime Error', 'Accepted']
['s268990350', 's277237819', 's358904585']
[2940.0, 2940.0, 6888.0]
[17.0, 17.0, 67.0]
[219, 205, 225]
p02983
u917872021
2,000
1,048,576
You are given two non-negative integers L and R. We will choose two integers i and j such that L \leq i < j \leq R. Find the minimum possible value of (i \times j) \mbox{ mod } 2019.
['l,r = input().split()\nl = int(l)\nr = int(r)\n\nl_mod = l % 2019\nr_mod = r % 2019\n\nif l_mod >= r_mod:\n print(0)\nelse:\n min_val = 2020\n for i in range(r_mod - l_mod + 1):\n for j in range(r_mod - l_mod + 1):\n \n\n# continue\n# print([l_mod+i,l_mod+j])\n ...
['Wrong Answer', 'Wrong Answer', 'Accepted']
['s095668487', 's218845934', 's964726597']
[3060.0, 3060.0, 3060.0]
[1958.0, 1994.0, 1265.0]
[465, 462, 373]
p02983
u918935103
2,000
1,048,576
You are given two non-negative integers L and R. We will choose two integers i and j such that L \leq i < j \leq R. Find the minimum possible value of (i \times j) \mbox{ mod } 2019.
['l,r = map(int,input().split())\na = l % 2019\nb = r % 2019\nif r - l >= 2019:\n print(0)\nelse:\n if a > b:\n print(0)\n else:\n ml = []\n for i in range(a,b):\n for j in range(a,b+1):\n ml.append((a*b)%2019)\n print(min(ml))', 'l,r = map(int,input().sp...
['Wrong Answer', 'Accepted']
['s215972004', 's626740525']
[165784.0, 75412.0]
[876.0, 541.0]
[276, 278]
p02983
u920473284
2,000
1,048,576
You are given two non-negative integers L and R. We will choose two integers i and j such that L \leq i < j \leq R. Find the minimum possible value of (i \times j) \mbox{ mod } 2019.
['list1 = [int(i) for i in input().split()]\nl = list1[0]\nr = list1[1]\nif (l// 2019 != r//2019):\n\tprint(0)\nelse:\n\tmax1 = 0 \n\tfor i in range(l,l+2020):\n\t\tfor j in range(i,l+2020):\n\t\t\ttemp = (i%2019)*(j%2019)\n\t\t\tif temp > max1 :\n\t\t\t\tmax1 = temp \n\tprint(max1)\t\t\t', 'z = [int(i) for i in input(...
['Wrong Answer', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted']
['s157743019', 's408474370', 's433169472', 's865532966', 's315855638']
[3060.0, 3064.0, 3060.0, 2940.0, 3064.0]
[633.0, 17.0, 17.0, 17.0, 668.0]
[256, 459, 544, 599, 439]
p02983
u921773161
2,000
1,048,576
You are given two non-negative integers L and R. We will choose two integers i and j such that L \leq i < j \leq R. Find the minimum possible value of (i \times j) \mbox{ mod } 2019.
['L = 2*(10**2)\nR = 2*(10**5)\n\nif L >= 2019:\n L = L%2019\nif R >= 2019:\n R = R%2019\n\nprint(L)\nprint(R)\n\nlist = []\nif L < R :\n for i in range(L,R):\n for j in range(i+1,R+1):\n list.append(i*j%2019)\n\nelse :\n for i in range(0,2018):\n for j in range(i+1,2019):\n list.append(...
['Wrong Answer', 'Accepted']
['s761883470', 's075397486']
[75416.0, 75416.0]
[552.0, 507.0]
[327, 414]
p02983
u921811474
2,000
1,048,576
You are given two non-negative integers L and R. We will choose two integers i and j such that L \leq i < j \leq R. Find the minimum possible value of (i \times j) \mbox{ mod } 2019.
['L, R = map(int, input().split())\nl = []\nif R - L >= 2018:\n print(0)\nelse:\n for i in range(L,R+1):\n l.append(i%2019)\n print(sorted(l))', 'L, R = map(int, input().split())\nl = []\nif R - L >= 672:\n print(0)\nelse:\n for i in range(L,R):\n for j in range(i+1,R+1):\n l.app...
['Wrong Answer', 'Accepted']
['s517025797', 's283198789']
[3060.0, 6804.0]
[18.0, 48.0]
[149, 182]
p02983
u923341003
2,000
1,048,576
You are given two non-negative integers L and R. We will choose two integers i and j such that L \leq i < j \leq R. Find the minimum possible value of (i \times j) \mbox{ mod } 2019.
['L, R = map(int, input().split())\n\nif L <= 2019 and 2019 <= R:\n ans = 0\n\nelse:\n ans = R * (R + 1)\n for i in range(R-L):\n for j in range(i+1, R-L+1):\n# print(L+i, L+j)\n tmp = ((L + i)*(R - j)) % 2019\n if tmp <= ans:\n ans = tmp\n# e...
['Wrong Answer', 'Accepted']
['s808043296', 's280828199']
[3060.0, 3060.0]
[2104.0, 1881.0]
[370, 391]
p02983
u924467864
2,000
1,048,576
You are given two non-negative integers L and R. We will choose two integers i and j such that L \leq i < j \leq R. Find the minimum possible value of (i \times j) \mbox{ mod } 2019.
['import numpy as np\n\nL, R = map(int, input().split())\n\nmin_ = np.inf\nfor i in range(L, 4040):\n for j in range(i + 1, 4040 + 1):\n if (i * j) % 2019 <= min_:\n min_ = (i * j) % 2019\n if min_ == 0:\n print(min_)\n exit()\n\nprint(min_)\n', 'import nump...
['Wrong Answer', 'Accepted']
['s448466368', 's720454702']
[12488.0, 14308.0]
[161.0, 173.0]
[289, 283]
p02983
u925836726
2,000
1,048,576
You are given two non-negative integers L and R. We will choose two integers i and j such that L \leq i < j \leq R. Find the minimum possible value of (i \times j) \mbox{ mod } 2019.
["l, r = map(int,input().split())\n\nif((r*(r-1))<2019): # ok\n min = (l*(l+1)) % 2019\n print('a')\n\nelif(int(((r-1)*r)/2019) == int((l*(l+1))/2019)): # ok\n min = (l * (l+1)) % 2019\n print('b')\n\nelif((r-l)>2 and (int(l/673) != int(r/673))):\n min = 0\n print('c')\n\nelse:\n min = (l * (l+1)) ...
['Wrong Answer', 'Accepted']
['s094930434', 's093356763']
[3064.0, 3060.0]
[17.0, 847.0]
[338, 268]
p02983
u927534107
2,000
1,048,576
You are given two non-negative integers L and R. We will choose two integers i and j such that L \leq i < j \leq R. Find the minimum possible value of (i \times j) \mbox{ mod } 2019.
['l,r=map(int,input().split())\nlst=[]\nfor i in range(l,l+min(4038,r-l+1)):\n lst.append(i%2019)\nans=0\nfor i in range(len(lst)-1):\n for j in range(i+1,len(lst)):\n tmp=i*j%2019\n if tmp>ans:ans=tmp\nprint(ans)', 'l,r=map(int,input().split())\nlst=[]\nfor i in range(l,l+min(4038,r-l+1)):\n lst...
['Wrong Answer', 'Wrong Answer', 'Accepted']
['s204575937', 's864147983', 's707750632']
[3060.0, 3060.0, 3064.0]
[1739.0, 2107.0, 583.0]
[222, 232, 272]
p02983
u931489673
2,000
1,048,576
You are given two non-negative integers L and R. We will choose two integers i and j such that L \leq i < j \leq R. Find the minimum possible value of (i \times j) \mbox{ mod } 2019.
['L,R=map(int,input().split())\n\n\nM=[]\nfor i in range(L, R):\n for j in range(i+1, R+1):\n #print(i,j)\n M.append((i*j)%20119)\n if M[-1]==0:\n\t\t\tprint(0)\n\t\texit()\nprint(min(M))\n', 'L,R=map(int,input().split())\n\n\nM=[]\nfor i in range(L, R):\n for j in range(i+1, R+1):\n #...
['Runtime Error', 'Wrong Answer', 'Accepted']
['s015539919', 's319787514', 's600245585']
[2940.0, 3444.0, 6788.0]
[17.0, 21.0, 50.0]
[236, 255, 254]
p02983
u934099192
2,000
1,048,576
You are given two non-negative integers L and R. We will choose two integers i and j such that L \leq i < j \leq R. Find the minimum possible value of (i \times j) \mbox{ mod } 2019.
['l, r = map(int, input().split())\nmod = 2019\nmod_min = 2100\n\ns = l % mod\ne = r % mod\n\nprint(s,e)\n\nfor i in range(s,e):\n for j in range(i+1,e+1):\n #m = ((i % mod) * (j % mod)) % mod\n #m = (i * j) % mod\n m = i * j\n #print(i,j,m)\n\n if m < mod_min:\n mod_min...
['Wrong Answer', 'Wrong Answer', 'Accepted']
['s428055570', 's465833111', 's466629245']
[3060.0, 3060.0, 2940.0]
[290.0, 47.0, 46.0]
[321, 276, 279]
p02983
u935424675
2,000
1,048,576
You are given two non-negative integers L and R. We will choose two integers i and j such that L \leq i < j \leq R. Find the minimum possible value of (i \times j) \mbox{ mod } 2019.
['import sys\nl,r=map(int,sys.stdin.readline().split())\nr=min(r,l+673)\nans=2019\nfor i in range(l,r+1):\n for j in range(i,r+1):\n ans=min(ans,i*j&2019)\nprint(min)\n', 'import sys\nl,r=map(int,sys.stdin.readline().split())\nr_m=r%2019\nl_m=l%2019\nmin=2019\nretu=range(l_m,r_m+1)\n\nfor i in range(len(retu)...
['Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Accepted']
['s091762935', 's190992087', 's335231429', 's498290992', 's878177229', 's623802890']
[2940.0, 15188.0, 3060.0, 14804.0, 3408.0, 2940.0]
[90.0, 2104.0, 22.0, 2104.0, 32.0, 100.0]
[168, 267, 314, 331, 335, 172]
p02983
u936985471
2,000
1,048,576
You are given two non-negative integers L and R. We will choose two integers i and j such that L \leq i < j \leq R. Find the minimum possible value of (i \times j) \mbox{ mod } 2019.
['import sys\nreadline = sys.stdin.readline\n\nL,R = map(int,readline().split())\n\nL %= 2019\nR %= 2019\nR += 2019\n\nans = 2019\nfor i in range(L, R):\n for j in range(i + 1, R + 1):\n if (i * j) % 2019 < ans:\n ans = (i * j) % 2019\n \nprint(ans)', 'import sys\nreadline = sys.stdin.readline\n\nL,R = ma...
['Wrong Answer', 'Accepted']
['s601485523', 's774642764']
[9196.0, 9200.0]
[937.0, 255.0]
[246, 339]
p02983
u948911484
2,000
1,048,576
You are given two non-negative integers L and R. We will choose two integers i and j such that L \leq i < j \leq R. Find the minimum possible value of (i \times j) \mbox{ mod } 2019.
['l,r = map(int,input().split())\nmod = 2019\nr = (r%mod) + 2019*(r-l>=2019)\nl = l%mod\nans = float("inf")\nfor i in range(l,r):\n for j in range(i+1,r+1):\n ans = (i*j)%mod\nprint(ans)', 'l,r = map(int,input().split())\nmod = 2019\nr = (r%mod) + 2019*(r-l>=2019)\nl = l%mod\nans = float("inf")\nfor i in range(l,r+...
['Wrong Answer', 'Wrong Answer', 'Accepted']
['s019355849', 's560748454', 's204014007']
[3060.0, 3060.0, 3060.0]
[767.0, 763.0, 1394.0]
[180, 180, 189]
p02983
u952656646
2,000
1,048,576
You are given two non-negative integers L and R. We will choose two integers i and j such that L \leq i < j \leq R. Find the minimum possible value of (i \times j) \mbox{ mod } 2019.
['L, R = map(int, input().split())\np = 2019\nif (R-L+1)//p>=0:\n print(0)\nelse:\n c = L%p\n d = c+1\n print(c*d)', 'L, R = map(int, input().split())\np = 2019\nret = p-1\nif (R-L+1)//p<=0:\n for i in range(L, R):\n for j in range(i+1, R+1):\n ret = min(i*j%p, ret)\n if ret=...
['Wrong Answer', 'Accepted']
['s818211815', 's398055143']
[2940.0, 3060.0]
[17.0, 58.0]
[117, 330]
p02983
u952669998
2,000
1,048,576
You are given two non-negative integers L and R. We will choose two integers i and j such that L \leq i < j \leq R. Find the minimum possible value of (i \times j) \mbox{ mod } 2019.
['L,R = list(map(int,input().split()))\n\ndif = R - L\n_L, _R = L%2019,R%2019\n\nprint(L,R,_L,_R)\nif _R < _L:\n print(0)\nelif _L < _R and dif >= 2018: \n print(0)\nelif _L < _R and dif < 2018:\n print(_L*(_L+1)%2019)', 'L,R = list(map(int,input().split()))\n\ndif = R - L\n_L, _R = L%2019,R%2019\n\nif _R < _L:\n p...
['Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Accepted']
['s261595987', 's537567267', 's985527377', 's763022696']
[3064.0, 3064.0, 3064.0, 3064.0]
[17.0, 777.0, 766.0, 753.0]
[208, 279, 283, 285]
p02983
u957167787
2,000
1,048,576
You are given two non-negative integers L and R. We will choose two integers i and j such that L \leq i < j \leq R. Find the minimum possible value of (i \times j) \mbox{ mod } 2019.
['L, R = map(int, input().split())\n\nMOD = 2019\nans = 2018\n\nif R - L + 1 >= 2019:\n print(0)\nelse:\n for i in range(L, R):\n for j in range(i+1, R+1):\n n = (i*j)%MOD\n ans = min(n, ans)\n print(ans)\n\n"""\n\nR = min(R, L+(2019)) \nMOD = 2019\nans = 2018\n\nfor i in range(L, ...
['Runtime Error', 'Accepted']
['s004865618', 's429436387']
[3064.0, 3060.0]
[17.0, 850.0]
[532, 534]
p02983
u959225525
2,000
1,048,576
You are given two non-negative integers L and R. We will choose two integers i and j such that L \leq i < j \leq R. Find the minimum possible value of (i \times j) \mbox{ mod } 2019.
['l,r=map(int,input().split())\nan=(l*(l+1))%2019\n\nfor i in range(l,r):\n for j in range(i+1,r+1):\n print(i,j)\n if (i*j)%2019 < an:\n an=(i*j)%2019\n\nprint(an)', 'l,r=map(int,input().split())\nan=(l*(l+1))%2019\n\nfor i in range(l,r):\n for j in range(i+1,r+1):\n if (i*j)%2019...
['Wrong Answer', 'Accepted']
['s859019686', 's348719002']
[38908.0, 3060.0]
[2103.0, 42.0]
[181, 222]
p02983
u959682820
2,000
1,048,576
You are given two non-negative integers L and R. We will choose two integers i and j such that L \leq i < j \leq R. Find the minimum possible value of (i \times j) \mbox{ mod } 2019.
['l, r = map(int, input().split())\n\nmod = 2019\nl %= mod\nr %= mod\nans = 2019*2019\nfor i in range(l, r):\n for j in range(i+1, r+1):\n ans = min(ans, i*j % mod)\n print(i, j, i*j%mod)\n\nprint(ans)', 'l, r = map(int, input().split())\n\nmod = 2019\nans = mod\nfor i in range(l, r):\n for j in ran...
['Wrong Answer', 'Accepted']
['s934554414', 's926797716']
[17512.0, 3060.0]
[2104.0, 62.0]
[205, 235]
p02983
u960227987
2,000
1,048,576
You are given two non-negative integers L and R. We will choose two integers i and j such that L \leq i < j \leq R. Find the minimum possible value of (i \times j) \mbox{ mod } 2019.
['L,R = list(map(int, input().split()))\nif R-L >= 2019:\n print(0)\nelif:\n M=2019\n for i in range(L,R):\n for j in range(i+1,R+1):\n L=(i * j) % 2019\n if L<M:\n M=L\nprint(M)', 'L,R = list(map(int, input().split()))\nif R - L >= 2019:\n print(0)\nelse:\n M=2019\n for i in range(L,R):\n ...
['Runtime Error', 'Accepted']
['s217635564', 's019481634']
[2940.0, 3060.0]
[17.0, 559.0]
[189, 195]
p02983
u962479059
2,000
1,048,576
You are given two non-negative integers L and R. We will choose two integers i and j such that L \leq i < j \leq R. Find the minimum possible value of (i \times j) \mbox{ mod } 2019.
['A,B=map(int,input().split())\nmod = 2018\nflag =0\nfor i in range(A,B):\n x = i % 2019\n for j in range(i+1,B+1):\n j = j % 2019\n mod = min(mod, (x*j)%2019)\n if mod = 0:\n flag = 1\n break\n if flag:\n break\n\nprint(mod)', 'A,B=map(int,input().split())\nmod = 2018\nflag =0\nfor i in range(...
['Runtime Error', 'Accepted']
['s068715084', 's511808906']
[2940.0, 3060.0]
[18.0, 63.0]
[234, 235]
p02983
u962718741
2,000
1,048,576
You are given two non-negative integers L and R. We will choose two integers i and j such that L \leq i < j \leq R. Find the minimum possible value of (i \times j) \mbox{ mod } 2019.
['#!/usr/bin/env python3\n\ndef main():\n l, r = map(int, input().split())\n for i in range(l, r):\n for j in range(l, r + 1):\n ans = (i * j) % 2019\n if ans == 0:\n break\n print(ans)\n\n\nif __name__ == "__main__":\n main()\n', '#!/usr/bin/env python3\n\ndef ma...
['Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Accepted']
['s097640328', 's348125866', 's706812803', 's542122955']
[9152.0, 9076.0, 9024.0, 9036.0]
[2205.0, 2205.0, 2205.0, 58.0]
[268, 307, 272, 334]
p02983
u963963908
2,000
1,048,576
You are given two non-negative integers L and R. We will choose two integers i and j such that L \leq i < j \leq R. Find the minimum possible value of (i \times j) \mbox{ mod } 2019.
['#ABC133 C\n\nL,R = map(int,input().split())\nA = []\nif R - L > 2019:\n print(0)\nelif 2 <= R - L and R - L <= 2019:\n for i in range(L,R):\n for j in range(i+1,R+1):\n A.append((i*j)%2019)\n print(min(A))\nelif R - L = 1:\n print((R*L)%2019)', 'print(1)', '#ABC133 C\n\nL,R = map(int,inp...
['Runtime Error', 'Wrong Answer', 'Runtime Error', 'Accepted']
['s076870914', 's226849067', 's970331691', 's267175297']
[8984.0, 8964.0, 8964.0, 81172.0]
[28.0, 26.0, 30.0, 556.0]
[260, 8, 268, 261]
p02983
u967594789
2,000
1,048,576
You are given two non-negative integers L and R. We will choose two integers i and j such that L \leq i < j \leq R. Find the minimum possible value of (i \times j) \mbox{ mod } 2019.
['L,R = list(map(int, input().split()))\n\n\nMOD=[0] * (2019*2019)\n\ndef myidx(i,j):\n return i * 2019 + j\n\nfor i in range(2019):\n for j in range(2019):\n idx = myidx(i,j)\n MOD[idx] = (i*j) % 2019\n\nfor i in range(2019):\n idx = myidx(i,i)\n MOD[idx] = 2019\n\nMMM = []\nLmod = L % 2019\n...
['Time Limit Exceeded', 'Time Limit Exceeded', 'Runtime Error', 'Time Limit Exceeded', 'Time Limit Exceeded', 'Time Limit Exceeded', 'Accepted']
['s456026522', 's520674196', 's532608732', 's550725832', 's575863478', 's929717922', 's649206326']
[156488.0, 147712.0, 158792.0, 158640.0, 159048.0, 156932.0, 92932.0]
[2112.0, 2111.0, 2112.0, 2111.0, 2111.0, 2113.0, 1979.0]
[738, 1014, 861, 875, 846, 735, 1020]
p02983
u968404618
2,000
1,048,576
You are given two non-negative integers L and R. We will choose two integers i and j such that L \leq i < j \leq R. Find the minimum possible value of (i \times j) \mbox{ mod } 2019.
['l, r = map(int, input().split())\nr = min(r, l+(2019*2))\nans = 2018\n\nfor i in range(1, r):\n for j in range(i+1, r):\n x = (i * j) % 2019\n ans = min(ans, x)\n\nprint(ans)', 'L, R = map(int, input().split())\n\nans = 2019\nfor i in range(L, L+2020-1):\n for j in range(i+1, i+2020):\n if j > R: bre...
['Wrong Answer', 'Accepted']
['s651736092', 's433619737']
[2940.0, 9176.0]
[2104.0, 1431.0]
[172, 176]
p02983
u968846084
2,000
1,048,576
You are given two non-negative integers L and R. We will choose two integers i and j such that L \leq i < j \leq R. Find the minimum possible value of (i \times j) \mbox{ mod } 2019.
['L,R=map(int,input().split())\na=L-1//2019\nb=L%2019\nc=R//2019\nd=R%2019\nif a!=c:\n print("0")\nelse:\n if b>=d:\n d=d+2019\n f=(b*d)%2019\n for i in range(b,d):\n for j in range(i+1,d+1):\n e=(i*j)%2019\n if e<f:\n f=e\n j=j+1\n i=i+1\n print(f)\n ', 'L,R=map(int,input().spl...
['Wrong Answer', 'Wrong Answer', 'Accepted']
['s399759661', 's483207142', 's076221296']
[3060.0, 3064.0, 3060.0]
[17.0, 17.0, 596.0]
[272, 241, 267]
p02983
u969236097
2,000
1,048,576
You are given two non-negative integers L and R. We will choose two integers i and j such that L \leq i < j \leq R. Find the minimum possible value of (i \times j) \mbox{ mod } 2019.
['L, R = list(map(int, input().split()))\nprint(L, R)\na = (L * (L + 1)) % 2019\nfor i in range(L, R + 1):\n for j in range(i + 1, R + 1):\n #print((i * j) % 2019)\n if (i * j) % 2019 < a:\n a = (i * j) % 2019\nprint(a)', 'L, R = list(map(int, input().split()))\na = (L * (L + 1)) % 2019\nfor...
['Wrong Answer', 'Accepted']
['s000275213', 's389214162']
[2940.0, 3060.0]
[2104.0, 854.0]
[237, 225]
p02983
u969850098
2,000
1,048,576
You are given two non-negative integers L and R. We will choose two integers i and j such that L \leq i < j \leq R. Find the minimum possible value of (i \times j) \mbox{ mod } 2019.
["def main():\n L, R = map(int, input().split())\n start = time.time()\n if R // 2019 > L // 2019:\n print(0)\n return\n retval = 2019\n for i in range(L, R):\n for j in range(i+1, R+1):\n retval = min(retval, (i % 2019 * j % 2019) % 2019)\n if retval == 0:\n ...
['Runtime Error', 'Accepted']
['s187315656', 's384653290']
[3060.0, 3064.0]
[17.0, 513.0]
[436, 387]
p02983
u970002663
2,000
1,048,576
You are given two non-negative integers L and R. We will choose two integers i and j such that L \leq i < j \leq R. Find the minimum possible value of (i \times j) \mbox{ mod } 2019.
['L, R = map(int, input().split())\n\nif R-L > 2018:\n print(0)\nelse:\n if (L//2019) < (R//2019):\n print(0)\n else:\n c = 2019\n for i in range(L, R):\n for j in range(i, R+1):\n c = min((i*j)%2019, c)\n print(c)', 'L, R = map(int, input().split())\n\nif R-...
['Wrong Answer', 'Accepted']
['s846561206', 's713368677']
[3060.0, 3060.0]
[771.0, 807.0]
[261, 263]
p02983
u971091945
2,000
1,048,576
You are given two non-negative integers L and R. We will choose two integers i and j such that L \leq i < j \leq R. Find the minimum possible value of (i \times j) \mbox{ mod } 2019.
['l, r = map(int, input().split())\n\na = list(range(l, r+1))\n\nif len(a)>2019:\n a = a[:2019]\n\nprint(a)\n\nnum = 0\nans = 2019\n\nfor i in range(len(a)):\n for j in range(len(a)):\n if a[i]<a[j]:\n num = (a[i]*a[j])%2019\n ans = min(ans, num)\n if ans == 0:\n ...
['Runtime Error', 'Accepted']
['s393331414', 's373198966']
[42484.0, 3064.0]
[2243.0, 99.0]
[349, 353]
p02983
u973240207
2,000
1,048,576
You are given two non-negative integers L and R. We will choose two integers i and j such that L \leq i < j \leq R. Find the minimum possible value of (i \times j) \mbox{ mod } 2019.
["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']
['s918635310', 's583049947']
[12540.0, 12484.0]
[151.0, 557.0]
[488, 628]
p02983
u974402118
2,000
1,048,576
You are given two non-negative integers L and R. We will choose two integers i and j such that L \leq i < j \leq R. Find the minimum possible value of (i \times j) \mbox{ mod } 2019.
['L,R = (int(x) for x in input().split())\nif (L-R)//2019:\n R -= (L-R)//2019*2019\nans = 2018\nfor i in range(L,R):\n for j in range(i+1,R+1):\n ans = min(ans,(i*j)%2019)\nprint(ans)', 'L,R = (int(x) for x in input().split())\nif R-L > 2019*2:\n R -= ((R-L)//2019-1)*2019\nprint(L,R)\nans = 2019\nfor i in range(L...
['Wrong Answer', 'Wrong Answer', 'Accepted']
['s777336621', 's931463122', 's619247481']
[8976.0, 9056.0, 9044.0]
[2205.0, 1459.0, 1403.0]
[179, 195, 184]
p02983
u975485663
2,000
1,048,576
You are given two non-negative integers L and R. We will choose two integers i and j such that L \leq i < j \leq R. Find the minimum possible value of (i \times j) \mbox{ mod } 2019.
["L,R=map(int,input().split(' '))\nl,r=L%2019,R%2019\nD=R-L\nd=r-l\nif D<2019:\n if D==d:\n if \n print( (l*(l+1))%2019 )\n else:\n print(0)\nelse:\n print(0)", "import numpy as np\nL,R=map(int,input().split(' '))\nl,r=L%2019,R%2019\nD=R-L\nd=r-l\nprint(L,l,R,r)\nif D<2019:\n if D==d:\n res=[]\n for ...
['Runtime Error', 'Wrong Answer', 'Wrong Answer', 'Accepted']
['s067192628', 's442405991', 's453304809', 's098001806']
[2940.0, 84448.0, 236852.0, 84576.0]
[18.0, 718.0, 1469.0, 768.0]
[157, 275, 278, 260]
p02983
u981309686
2,000
1,048,576
You are given two non-negative integers L and R. We will choose two integers i and j such that L \leq i < j \leq R. Find the minimum possible value of (i \times j) \mbox{ mod } 2019.
['from collections import Counter\ninp=list(map(int,input().split()))\nl=inp[0]\nr=inp[1]\nc=Counter([])\narr=[]\nfor i in range(l,r+1):\n if c[i]==0:\n c[i]+=1\n arr.append(i)\n continue\n else:\n break\nif c[0]!=0:\n print (0)\nans=99999999999\nfor i in range(len(arr)):\n for j in range(i+1,len(arr)):...
['Runtime Error', 'Accepted']
['s723073377', 's908502391']
[8996.0, 9472.0]
[25.0, 57.0]
[391, 508]
p02983
u981931040
2,000
1,048,576
You are given two non-negative integers L and R. We will choose two integers i and j such that L \leq i < j \leq R. Find the minimum possible value of (i \times j) \mbox{ mod } 2019.
['L , R = map(int,input().split())\nif R - L >= 2019 or L == 0:\n print("0")\n exit()\nmin = 2020\n\nfor i in range(L , R):\n for j in range(i + 1 , R + 1):\n tmp_min = ( i * j) % 2019\n if tmp_min < min:\n min = tmp_min\n', 'L , R = map(int,input().split())\nif R - L >= 2019 or L == 0...
['Wrong Answer', 'Accepted']
['s056866307', 's268916484']
[2940.0, 3060.0]
[522.0, 512.0]
[243, 253]
p02983
u982591663
2,000
1,048,576
You are given two non-negative integers L and R. We will choose two integers i and j such that L \leq i < j \leq R. Find the minimum possible value of (i \times j) \mbox{ mod } 2019.
['L, R = map(int, input().split())\n\n\nif L == 0 or R-L >= 2019:\n ans = 0\nelse:\n flag = True\n for i in range(L, R+1):\n if i % 2019 == 0:\n ans = 0\n flag = False\n break\n if flag:\n raise\n ans = (L*(L+1))%2019\n\nprint(ans)\n', 'L, R = map(int, i...
['Runtime Error', 'Accepted']
['s684643112', 's667963822']
[2940.0, 2940.0]
[17.0, 60.0]
[280, 273]
p02983
u986943157
2,000
1,048,576
You are given two non-negative integers L and R. We will choose two integers i and j such that L \leq i < j \leq R. Find the minimum possible value of (i \times j) \mbox{ mod } 2019.
['from sys import exit, stderr, stdin\ninput = stdin.readline\ndef debug(var, name="hoge"):\n print(name +":" + str(type(var)) + " = " + repr(var), file=stderr)\n return\n\n\ndef main():\n L, R = [int(n) for n in input().split()]\n if (L//2019)<(R//2019):\n print(0)\n else:\n l = L%2019\n ...
['Runtime Error', 'Accepted']
['s420346160', 's750441820']
[3064.0, 3064.0]
[17.0, 514.0]
[512, 513]
p02983
u987164499
2,000
1,048,576
You are given two non-negative integers L and R. We will choose two integers i and j such that L \leq i < j \leq R. Find the minimum possible value of (i \times j) \mbox{ mod } 2019.
['from sys import stdin\n\nl,r = [int(x) for x in stdin.readline().rstrip().split()]\nm = 2020\nle = r-l+1\nfor i in range(le-1):\n for j in range(i+1,le):\n if i*j%2019 == 0:\n print(0)\n exit()\n else:\n m = min(m,i*j%2019)\nprint(m)', 'from sys import stdin\n\nl,r = ...
['Wrong Answer', 'Accepted']
['s833138744', 's076805252']
[2940.0, 3060.0]
[17.0, 75.0]
[271, 301]
p02983
u988586873
2,000
1,048,576
You are given two non-negative integers L and R. We will choose two integers i and j such that L \leq i < j \leq R. Find the minimum possible value of (i \times j) \mbox{ mod } 2019.
['args = input().split()\nl = int(args[0])\nr = int(args[1])\n\nans = 0\nif r - l < 2019:\n left = l % 2019\n if 2018 - left >= r - l:\n right = left + r - l\n ans = 2019\n for i in range(left, right + 1):\n for j in range(i + 1, right + 1):\n tmp = i * j % 2019\n ...
['Wrong Answer', 'Accepted']
['s135335776', 's452188636']
[3064.0, 3064.0]
[403.0, 387.0]
[461, 411]
p02983
u993435350
2,000
1,048,576
You are given two non-negative integers L and R. We will choose two integers i and j such that L \leq i < j \leq R. Find the minimum possible value of (i \times j) \mbox{ mod } 2019.
['L,R = map(int,input().split())\n\nans = 2020\n\nfor i in range(L,R + 1):\n l = i % 2019\n r = (i + 1) % 2019\n if l * r < ans:\n ans = l * r\n if r = 0:\n ans = 0\n break\n \nprint(ans)', 'L,R = map(int,input().split())\n\nans = 2019 ** 2\n\nif R - L >= 2018:\n ans = 0\n print(ans)\nelse: \n for i ...
['Runtime Error', 'Accepted']
['s869112485', 's842158447']
[2940.0, 3060.0]
[17.0, 956.0]
[188, 284]
p02983
u993642190
2,000
1,048,576
You are given two non-negative integers L and R. We will choose two integers i and j such that L \leq i < j \leq R. Find the minimum possible value of (i \times j) \mbox{ mod } 2019.
['L,R = [int(i) for i in input().split()]\n \nlength = min(2019, R-L)\n \nm = (L * R) % 2019\nfor i in range(L-1, L+length) :\n for k in range(i,L+length) :\n # tmp = (i*k) % 2019\n\n # print(i,k)\n \n l = i % 2019\n r = k % 2019\n tmp = (l*r) % 2019\n if (tmp == 0) :\n ...
['Wrong Answer', 'Accepted']
['s622269822', 's953502760']
[3060.0, 3060.0]
[690.0, 555.0]
[397, 277]
p02983
u996434204
2,000
1,048,576
You are given two non-negative integers L and R. We will choose two integers i and j such that L \leq i < j \leq R. Find the minimum possible value of (i \times j) \mbox{ mod } 2019.
["l,r=map(int,input().split())\n\nmin = 500000\nprint('r-l',r-l)\n\nfor i in range(0,r-l):\n for j in range(i+1,r-l-i+1):\n if ((l+i)*(l+j))%2019 < min:\n min=((l+i)*(l+j))%2019\n\nprint(min)", 'l,r = map(int,input().split())\n\nmn = 4038\n\nif (r - l) >= 2019:\n print(0)\nelse:\n for i in ra...
['Wrong Answer', 'Runtime Error', 'Accepted']
['s111063151', 's929386592', 's631671689']
[3060.0, 2940.0, 2940.0]
[2104.0, 20.0, 525.0]
[200, 234, 237]
p02983
u997387634
2,000
1,048,576
You are given two non-negative integers L and R. We will choose two integers i and j such that L \leq i < j \leq R. Find the minimum possible value of (i \times j) \mbox{ mod } 2019.
['L,R=map(int,input().split())\nmin=0\nresult=[]\nnum_range=R-L\nprint(num_range)\nfor i in range(num_range-1):\n for j in range(i+1,num_range):\n if (L+i)>=2019 and (L+j)>=2019:\n result.append((L+i-2019)*(L+j-2019))\n else: result.append(L*R) \nresult.sort()\nprint(result[0])', 'L,R=map...
['Runtime Error', 'Accepted']
['s037738347', 's808013243']
[197992.0, 2940.0]
[2117.0, 791.0]
[296, 181]
p02984
u024310884
2,000
1,048,576
There are N mountains in a circle, called Mountain 1, Mountain 2, ..., Mountain N in clockwise order. N is an _odd_ number. Between these mountains, there are N dams, called Dam 1, Dam 2, ..., Dam N. Dam i (1 \leq i \leq N) is located between Mountain i and i+1 (Mountain N+1 is Mountain 1). When Mountain i (1 \leq i ...
['num = int(input())\na = input().split()\nb = list(map(int, a))\nsum = sum(b)\n\nX = [0]*num\nX1 = 0\nfor i in range(num):\n if((2*i+1) >= num):\n break\n X1 = b[2*i+1] + X1\nX[0] = sum - 2 * X1\n\nfor i in range(1,num):\n X[i] = b[i-1]*2 - X[i-1]\nprint(X)', 'num = int(input())\na = input().split()\nb = list(ma...
['Wrong Answer', 'Accepted']
['s527843005', 's797828569']
[22416.0, 26264.0]
[98.0, 110.0]
[247, 267]
p02984
u025287757
2,000
1,048,576
There are N mountains in a circle, called Mountain 1, Mountain 2, ..., Mountain N in clockwise order. N is an _odd_ number. Between these mountains, there are N dams, called Dam 1, Dam 2, ..., Dam N. Dam i (1 \leq i \leq N) is located between Mountain i and i+1 (Mountain N+1 is Mountain 1). When Mountain i (1 \leq i ...
['N = int(input())\nA = list(map(int, input().split()))\nimport numpy as np\nleft = []\na = []\nfor i in range(N):\n if (i == 0 or i == 1):\n a.append(0.5)\n else:\n a.append(0)\na = np.array(a)\nfor i in range(N):\n left.append(np.roll(a, i))\nleft = np.array(left)\nprint(left)\nfrom numpy.linalg import sol...
['Wrong Answer', 'Accepted']
['s576534197', 's345141033']
[1824764.0, 14092.0]
[2222.0, 126.0]
[376, 170]
p02984
u027855659
2,000
1,048,576
There are N mountains in a circle, called Mountain 1, Mountain 2, ..., Mountain N in clockwise order. N is an _odd_ number. Between these mountains, there are N dams, called Dam 1, Dam 2, ..., Dam N. Dam i (1 \leq i \leq N) is located between Mountain i and i+1 (Mountain N+1 is Mountain 1). When Mountain i (1 \leq i ...
['#D\nn = int(input())\nA = list(map(int, input().split()))\n\nsum_eve = sum(A[0::2])\nsum_odd = sum(A[1::2])\n\nx = [0] * n\n\nx[0] = sum_eve - sum_odd\n\nfor num in range(1, n):\n x[num] = 2 * A[num-1] - x[num-1]\n \nprint(x)', '#D\nn = int(input())\nA = list(map(int, input().split()))\n\nsum_eve = sum(A[0::2])...
['Wrong Answer', 'Runtime Error', 'Accepted']
['s292249268', 's317105941', 's394487632']
[15252.0, 19224.0, 19092.0]
[86.0, 91.0, 92.0]
[217, 247, 243]
p02984
u032566873
2,000
1,048,576
There are N mountains in a circle, called Mountain 1, Mountain 2, ..., Mountain N in clockwise order. N is an _odd_ number. Between these mountains, there are N dams, called Dam 1, Dam 2, ..., Dam N. Dam i (1 \leq i \leq N) is located between Mountain i and i+1 (Mountain N+1 is Mountain 1). When Mountain i (1 \leq i ...
['N = int(input())\nA = list(map(int, input().strip().split()))\nX = []\nX = X.append(sum(A[0::2])-sum(A[1::2]))\nfor k in range (N-1):\n X = X.extend(2*A[k] - X[k])\nprint(X)', 'N = int(input())\nA = list(map(int, input().strip().split()))\nX = []\nX.append(sum(A[0::2])-sum(A[1::2]))\nfor k in range (N-1):\n X.appen...
['Runtime Error', 'Wrong Answer', 'Accepted']
['s103740455', 's464193740', 's808157956']
[14092.0, 15300.0, 14152.0]
[44.0, 81.0, 118.0]
[168, 160, 170]
p02984
u036340997
2,000
1,048,576
There are N mountains in a circle, called Mountain 1, Mountain 2, ..., Mountain N in clockwise order. N is an _odd_ number. Between these mountains, there are N dams, called Dam 1, Dam 2, ..., Dam N. Dam i (1 \leq i \leq N) is located between Mountain i and i+1 (Mountain N+1 is Mountain 1). When Mountain i (1 \leq i ...
["n = int(input())\n_a = input().split()\n\na = []\n\nx = []\n\nfor i in range(n):\n a.append(2*int(_a[i]))\n x.append(0)\n \nfor i in range(1, n):\n a[i] -= a[i-1]\n\nx[n-1] = a[n-1] // 2\n\nfor i in range(n-2, -1, -1):\n print(i)\n if i%2==0:\n x[i] = a[i] - x[n-1]\n else:\n x[i] = a[i] + x[n-1]\n \na...
['Wrong Answer', 'Runtime Error', 'Accepted']
['s013897052', 's982426891', 's656625505']
[23344.0, 15688.0, 22968.0]
[247.0, 91.0, 176.0]
[384, 340, 373]
p02984
u061984624
2,000
1,048,576
There are N mountains in a circle, called Mountain 1, Mountain 2, ..., Mountain N in clockwise order. N is an _odd_ number. Between these mountains, there are N dams, called Dam 1, Dam 2, ..., Dam N. Dam i (1 \leq i \leq N) is located between Mountain i and i+1 (Mountain N+1 is Mountain 1). When Mountain i (1 \leq i ...
["n = int(input())\na = list(map(int, input().split()))\n\nres = []\ns = 0\nfor i in enumerate(range(n)):\n s += a[i] * [-1, 1][i % 2 ==0]\nres.append(s)\n\nfor i in range(1, n):\n res.append(a[i] - 2*res[i-1])\n\nprint(' '.join(map(str, res)))\n", "n = int(input())\na = list(map(int, input().split()))\n\nres = [...
['Runtime Error', 'Accepted']
['s025260369', 's500415606']
[14092.0, 19096.0]
[42.0, 125.0]
[237, 228]
p02984
u062459048
2,000
1,048,576
There are N mountains in a circle, called Mountain 1, Mountain 2, ..., Mountain N in clockwise order. N is an _odd_ number. Between these mountains, there are N dams, called Dam 1, Dam 2, ..., Dam N. Dam i (1 \leq i \leq N) is located between Mountain i and i+1 (Mountain N+1 is Mountain 1). When Mountain i (1 \leq i ...
['N = int(input())\nA = map(int, input().split())\n\nS = sum(A)\nY = [0]*N\nY[0] = S - 2* sum(A[1::2])\nfor i in range(1,N):\n Y[i] = 2*A[i-1] - Y[i-1] \n\nprint(*Y)\n\n \n \n \n', 'N = int(input())\nA = map(int, input().split())\n\nS = sum(A)\nY = [0]*N\nY[0] = S - 2*sum(A[1::2])\nfor i in range(1,N):\n Y[i] = 2*...
['Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted']
['s455980537', 's648965412', 's810141391', 's753661613']
[11136.0, 11136.0, 2940.0, 14092.0]
[41.0, 40.0, 17.0, 117.0]
[166, 153, 212, 160]
p02984
u065079240
2,000
1,048,576
There are N mountains in a circle, called Mountain 1, Mountain 2, ..., Mountain N in clockwise order. N is an _odd_ number. Between these mountains, there are N dams, called Dam 1, Dam 2, ..., Dam N. Dam i (1 \leq i \leq N) is located between Mountain i and i+1 (Mountain N+1 is Mountain 1). When Mountain i (1 \leq i ...
["N = int(input())\nwater = [int(x) for x in input().split()]\nrain = [0]*N\nsum = 0\n\nfor i in water:\n sum += i\n\nfor k in range(2): \n sa = 0\n numofloop = 0\n ite = k + 1\n if (ite >= N):\n ite -= N\n while (numofloop < (N - 1) / 2):\n sa += water[ite]\n ite += 2\n i...
['Wrong Answer', 'Accepted']
['s110983681', 's378765389']
[19856.0, 19096.0]
[202.0, 134.0]
[775, 414]
p02984
u076917070
2,000
1,048,576
There are N mountains in a circle, called Mountain 1, Mountain 2, ..., Mountain N in clockwise order. N is an _odd_ number. Between these mountains, there are N dams, called Dam 1, Dam 2, ..., Dam N. Dam i (1 \leq i \leq N) is located between Mountain i and i+1 (Mountain N+1 is Mountain 1). When Mountain i (1 \leq i ...
["import sys\ninput=sys.stdin.readline\n\ndef main():\n N = int(input())\n A = list(map(int,input().split()))\n m = min(A)\n xi = A.index(m)\n for a in range(0, m*2+1, 2):\n B = A.copy()\n ans = [0]*N\n B[(xi-1)%N] -= a//2\n B[xi] -= a//2\n ans[xi] = a\n for i in...
['Wrong Answer', 'Accepted']
['s502990952', 's113262926']
[14232.0, 14108.0]
[2104.0, 111.0]
[608, 312]
p02984
u077291787
2,000
1,048,576
There are N mountains in a circle, called Mountain 1, Mountain 2, ..., Mountain N in clockwise order. N is an _odd_ number. Between these mountains, there are N dams, called Dam 1, Dam 2, ..., Dam N. Dam i (1 \leq i \leq N) is located between Mountain i and i+1 (Mountain N+1 is Mountain 1). When Mountain i (1 \leq i ...
['# ABC133D - Rain Flows into Dams\ndef main():\n # X_0 = sum(A) - 2 * sum(A[1::2]), X_i = 2Ai - X_{i-1}\n N, *A = map(int, open(0).read().split())\n X = [0] * N\n cur = sum(A) - 2 * sum(A[1::2])\n X[0] = cur\n for i, a in enumerate(A[:-1], 1):\n X[i] = a * 2 - cur\n cur = X[i]\n prin...
['Runtime Error', 'Accepted']
['s454595223', 's817032965']
[14092.0, 19212.0]
[60.0, 79.0]
[374, 372]
p02984
u089142196
2,000
1,048,576
There are N mountains in a circle, called Mountain 1, Mountain 2, ..., Mountain N in clockwise order. N is an _odd_ number. Between these mountains, there are N dams, called Dam 1, Dam 2, ..., Dam N. Dam i (1 \leq i \leq N) is located between Mountain i and i+1 (Mountain N+1 is Mountain 1). When Mountain i (1 \leq i ...
['N=int(input())\nA=list(map(int, input().split()))\nM=[0]*N\nmaxi=sum(A)\n\nM[0]=maxi//4\ntmp=10**9\n\nwhile M[0]/2 != tmp:\n for i in range(1,N):\n M[i]= 2*(A[i-1]-M[i-1]//2)\n tmp = A[-1] - M[N-1]//2\n #print(M,tmp)\n if M[0] != tmp*2:\n M[0] = (M[0]+tmp*2)//2\n if M[0]%2!=0:\n M[0] +=1\nelse:\n p...
['Wrong Answer', 'Accepted']
['s606460249', 's598776718']
[15144.0, 14028.0]
[127.0, 132.0]
[307, 155]
p02984
u106778233
2,000
1,048,576
There are N mountains in a circle, called Mountain 1, Mountain 2, ..., Mountain N in clockwise order. N is an _odd_ number. Between these mountains, there are N dams, called Dam 1, Dam 2, ..., Dam N. Dam i (1 \leq i \leq N) is located between Mountain i and i+1 (Mountain N+1 is Mountain 1). When Mountain i (1 \leq i ...
['n=int(input())\nA=list(map(int,input().split()))\nodd=sum(A[::2])\neven=sum(A[1::2])\nrtemp=10**9+1\nltemp=-1\nwhile rtemp-ltemp>1:\n mid=(rtemp+ltemp)//2\n if odd-even-mid<=mid:\n rtemp=mid \n\n else:\n ltemp=mid\n\nans=rtemp\nfor i in range(n-1):\n print(ans*2)\n ans=A[i]-ans', 'n=int(i...
['Wrong Answer', 'Wrong Answer', 'Accepted']
['s548747607', 's854791547', 's716804066']
[14036.0, 14036.0, 14624.0]
[138.0, 120.0, 121.0]
[290, 327, 329]
p02984
u111473084
2,000
1,048,576
There are N mountains in a circle, called Mountain 1, Mountain 2, ..., Mountain N in clockwise order. N is an _odd_ number. Between these mountains, there are N dams, called Dam 1, Dam 2, ..., Dam N. Dam i (1 \leq i \leq N) is located between Mountain i and i+1 (Mountain N+1 is Mountain 1). When Mountain i (1 \leq i ...
['n = int(input())\na = list(map(int, input().split()))\nsum_a = sum(a)\na2 = 0\nfor i in range(1, n):\n a2 += a[i]\n\nans = [0] * n\nans[0] = sum_a - 2*a2\nfor i in range(1, n, 2):\n ans[i] = 2*a[i-1] - ans[i-1]\nprint(*ans)', 'n = int(input())\na = list(map(int, input().split()))\nsum_a = sum(a)\na2 = 0\nfor i ...
['Wrong Answer', 'Accepted']
['s591168588', 's408069933']
[14028.0, 14028.0]
[117.0, 127.0]
[218, 218]
p02984
u115110170
2,000
1,048,576
There are N mountains in a circle, called Mountain 1, Mountain 2, ..., Mountain N in clockwise order. N is an _odd_ number. Between these mountains, there are N dams, called Dam 1, Dam 2, ..., Dam N. Dam i (1 \leq i \leq N) is located between Mountain i and i+1 (Mountain N+1 is Mountain 1). When Mountain i (1 \leq i ...
['mod = 2019\nl,r = map(int,input().split())\n\nif l==0 or r//mod - (l-1)//mod >= 1:\n print(0)\nelse:\n print(l*(l+1)%mod)', 'n = int(input())\n\nlsA = list(map(int,input().split()))\ntot = sum(lsA)\n\nan = tot\nfor i in range(0,n-2,2):\n an -= 2*lsA[i]\n\nans = [2*lsA[i] for i in range(n)]\nans[n-1] = an\nfor i in...
['Runtime Error', 'Accepted']
['s895261136', 's161829798']
[3060.0, 19144.0]
[17.0, 104.0]
[117, 256]
p02984
u116038906
2,000
1,048,576
There are N mountains in a circle, called Mountain 1, Mountain 2, ..., Mountain N in clockwise order. N is an _odd_ number. Between these mountains, there are N dams, called Dam 1, Dam 2, ..., Dam N. Dam i (1 \leq i \leq N) is located between Mountain i and i+1 (Mountain N+1 is Mountain 1). When Mountain i (1 \leq i ...
['\nimport numpy as np\nimport sys\ninput = sys.stdin.readline\nN = int(input())\nA = [[int(i)] for i in input().split()]\nA_np =np.array(A)\n\n\nmat_1 =np.zeros((N,N),dtype=int)\nfor i in range(N):\n mat_1[i,i]=1\n mat_1[i,(i+1)%N]=1 \nx =np.linalg.solve(mat_1,A_np)*2\n\n\nfor i in x:\n print(int(i[0]),end=" ...
['Runtime Error', 'Accepted']
['s114070002', 's033631505']
[463048.0, 14032.0]
[2110.0, 123.0]
[414, 303]
p02984
u124498235
2,000
1,048,576
There are N mountains in a circle, called Mountain 1, Mountain 2, ..., Mountain N in clockwise order. N is an _odd_ number. Between these mountains, there are N dams, called Dam 1, Dam 2, ..., Dam N. Dam i (1 \leq i \leq N) is located between Mountain i and i+1 (Mountain N+1 is Mountain 1). When Mountain i (1 \leq i ...
['l, r = map(int, input().split())\nif r-l >= 2017:\n\tprint (0)\n\texit()\nelse:\n\tfor i in range(l,r+1):\n\t\tfor j in range(i+1,r+1):\n\t\t\ta = min(a,i*j%2019)\nprint (a)', 'n = int(input())\na = list(map(int, input().split()))\nx1 = 0\nx1 = sum(a)-sum(a[1::2])*2\nx = []\nx.append(x1)\nfor i in range(n-1):\n\txx =...
['Runtime Error', 'Accepted']
['s635477277', 's369651558']
[3060.0, 14092.0]
[17.0, 122.0]
[157, 173]
p02984
u137542041
2,000
1,048,576
There are N mountains in a circle, called Mountain 1, Mountain 2, ..., Mountain N in clockwise order. N is an _odd_ number. Between these mountains, there are N dams, called Dam 1, Dam 2, ..., Dam N. Dam i (1 \leq i \leq N) is located between Mountain i and i+1 (Mountain N+1 is Mountain 1). When Mountain i (1 \leq i ...
["from numpy import roll, array\n\nn = int(input())\nx = input().split(' ')\na = [int(v) for v in x]\n\nb = roll(a, 1)\n\nans = (array(a) + array(b)) / 2\nans = list(ans)\n\nN = [str(int(p)) for p in ans]\n\nprint(' '.join(N))\n", "from numpy import roll, array\n\nn = int(input())\nx = input().split(' ')\na = [int(v) f...
['Wrong Answer', 'Wrong Answer', 'Runtime Error', 'Accepted']
['s493912497', 's512894014', 's549918097', 's091470296']
[38840.0, 39484.0, 460852.0, 28860.0]
[251.0, 336.0, 2110.0, 107.0]
[212, 206, 297, 294]
p02984
u150664457
2,000
1,048,576
There are N mountains in a circle, called Mountain 1, Mountain 2, ..., Mountain N in clockwise order. N is an _odd_ number. Between these mountains, there are N dams, called Dam 1, Dam 2, ..., Dam N. Dam i (1 \leq i \leq N) is located between Mountain i and i+1 (Mountain N+1 is Mountain 1). When Mountain i (1 \leq i ...
['N = int(input()) \nList = list(map(int,input().split())) \n\nx_0 = 0\n\nfor i in range(N):\n if (i % 2) == 0:\n x_0 += List[i]\n else:\n x_0 -= List[i]\n\nresult_x = []\nresult_x.append(x_0)\n\nfor j in range(N-1):\n result_x.append(int((List[j] - (result_x[j])/2) *2))\n\nprint(result_x)', 'N =...
['Wrong Answer', 'Accepted']
['s893191243', 's199237218']
[14412.0, 14092.0]
[128.0, 165.0]
[358, 359]
p02984
u175590965
2,000
1,048,576
There are N mountains in a circle, called Mountain 1, Mountain 2, ..., Mountain N in clockwise order. N is an _odd_ number. Between these mountains, there are N dams, called Dam 1, Dam 2, ..., Dam N. Dam i (1 \leq i \leq N) is located between Mountain i and i+1 (Mountain N+1 is Mountain 1). When Mountain i (1 \leq i ...
['n = int(input())\na = list(map(int,input().split()))\nx = [0]*n\nx[0] = sum(a)-2*(sum([a[i]for i in range(n)if i%2==1]))\nfor i in range(n-1):\n x[i+1] = 2*a[i]-x[i]\nprint("".join(map(str,x)))', 'n = int(input())\na = list(map(int,input().split()))\ns = sum(a)-2*sum(a[1::2])\nli=[s]\nfor i in range(1,n):\n li....
['Wrong Answer', 'Accepted']
['s116893479', 's050694319']
[19016.0, 14028.0]
[105.0, 118.0]
[190, 147]
p02984
u178488430
2,000
1,048,576
There are N mountains in a circle, called Mountain 1, Mountain 2, ..., Mountain N in clockwise order. N is an _odd_ number. Between these mountains, there are N dams, called Dam 1, Dam 2, ..., Dam N. Dam i (1 \leq i \leq N) is located between Mountain i and i+1 (Mountain N+1 is Mountain 1). When Mountain i (1 \leq i ...
['import sys\ninput = sys.stdin.readline\n\ndef func(dam_num, dam_volumes):\n water_amount = sum(dam_volumes)\n mountains_rain = [0]*dam_num\n mountains_rain[0] = water_amount\n \n \n for i in range(dam_num//2):\n mountains_rain[0] -= 2*dam_volumes[2*(i+1)-1]\n\n \n for i in range(dam_num...
['Wrong Answer', 'Accepted']
['s275815989', 's646777011']
[15336.0, 14108.0]
[87.0, 122.0]
[682, 683]
p02984
u183840468
2,000
1,048,576
There are N mountains in a circle, called Mountain 1, Mountain 2, ..., Mountain N in clockwise order. N is an _odd_ number. Between these mountains, there are N dams, called Dam 1, Dam 2, ..., Dam N. Dam i (1 \leq i \leq N) is located between Mountain i and i+1 (Mountain N+1 is Mountain 1). When Mountain i (1 \leq i ...
["n = int(input())\n\nl = [int(i) for i in input().split()]\n\ntotal = sum(l)\n\nfor i in range(1,n,2):\n total -= l[i] * 2\n\nans = [total]\n\nfor i in range(1,n):\n ans.append(2*l[i-1] - ans[i-1])\n ans = [str(i) for i in ans]\n \nprint(' '.join(ans))\n \n", 'n = int(input())\n\nl = [int(i) for i in in...
['Runtime Error', 'Wrong Answer', 'Accepted']
['s276499061', 's934333906', 's981448068']
[14024.0, 14024.0, 20576.0]
[57.0, 84.0, 113.0]
[254, 197, 248]
p02984
u187516587
2,000
1,048,576
There are N mountains in a circle, called Mountain 1, Mountain 2, ..., Mountain N in clockwise order. N is an _odd_ number. Between these mountains, there are N dams, called Dam 1, Dam 2, ..., Dam N. Dam i (1 \leq i \leq N) is located between Mountain i and i+1 (Mountain N+1 is Mountain 1). When Mountain i (1 \leq i ...
["from numpy.linalg import solve\nN=int(input())\nA=input().split()\nfor i in range(N):\n A[i]=2*int(A[i])\nx=[None]*N\nfor i in range(N-1):\n x[i]=[0]*N\n x[i][i],x[i][i+1]=1,1\nx[N-1]=[0]*N\nx[N-1][0],x[N-1][N-1]=1,1\ny=solve(x,A)\nfor i in range(N):\n print(int(y[i]),end=' ')\n", 'import sys\ndef input()...
['Time Limit Exceeded', 'Accepted']
['s212176355', 's794809076']
[1989656.0, 14092.0]
[2230.0, 147.0]
[277, 245]
p02984
u196697332
2,000
1,048,576
There are N mountains in a circle, called Mountain 1, Mountain 2, ..., Mountain N in clockwise order. N is an _odd_ number. Between these mountains, there are N dams, called Dam 1, Dam 2, ..., Dam N. Dam i (1 \leq i \leq N) is located between Mountain i and i+1 (Mountain N+1 is Mountain 1). When Mountain i (1 \leq i ...
['import numpy as np\n\nN = int(input())\nA = np.array([int(_) for _ in input().split()])\nlis = [([0] * N) for n in range(N)]\nfor n in range(N - 1):\n lis[n][n] = lis[n][n + 1] = 1\nlis[N - 1][0] = lis[N - 1][N - 1] = 1\n\n\n\nprint(*np.dot(np.linalg.inv(np.array(lis)), A) * 2)', "n = int(input())\nr_list = list(m...
['Wrong Answer', 'Accepted']
['s391071304', 's257421311']
[1976364.0, 19092.0]
[2260.0, 116.0]
[270, 358]
p02984
u203843959
2,000
1,048,576
There are N mountains in a circle, called Mountain 1, Mountain 2, ..., Mountain N in clockwise order. N is an _odd_ number. Between these mountains, there are N dams, called Dam 1, Dam 2, ..., Dam N. Dam i (1 \leq i \leq N) is located between Mountain i and i+1 (Mountain N+1 is Mountain 1). When Mountain i (1 \leq i ...
['N=int(input())\nalist=list(map(int,input().split()))\n\nasum=sum(alist)\nans_list=[0]*N\nfor i in range(N):\n ans_list[i] = asum-2*(alist[(i+1)%N]+alist[(i+3)%N])\n \nans_list_str=map(str,ans_list) \nprint(" ".join(ans_list_str))', 'N=int(input())\nalist=list(map(int,input().split()))\n\nasum=sum(alist)\nans_list=...
['Wrong Answer', 'Accepted']
['s479132005', 's880385164']
[19528.0, 19568.0]
[112.0, 133.0]
[223, 442]
p02984
u214561383
2,000
1,048,576
There are N mountains in a circle, called Mountain 1, Mountain 2, ..., Mountain N in clockwise order. N is an _odd_ number. Between these mountains, there are N dams, called Dam 1, Dam 2, ..., Dam N. Dam i (1 \leq i \leq N) is located between Mountain i and i+1 (Mountain N+1 is Mountain 1). When Mountain i (1 \leq i ...
['n = int(input())\na = list(map(int, input().split()))\ns = sum(a)\nb = []\nb.append(s - 2*sum(a[1::2]))\nfor i in range(n-1):\n b.append(2*a[i] - b[i])\nprint(b)', "n = int(input())\na = list(map(int, input().split()))\ns = sum(a)\nb = []\nb.append(s - 2*sum(a[1::2]))\nfor i in range(n-1):\n b.append(2*a[i] - b...
['Wrong Answer', 'Accepted']
['s770122498', 's501991516']
[14412.0, 19144.0]
[81.0, 89.0]
[157, 177]
p02984
u225577738
2,000
1,048,576
There are N mountains in a circle, called Mountain 1, Mountain 2, ..., Mountain N in clockwise order. N is an _odd_ number. Between these mountains, there are N dams, called Dam 1, Dam 2, ..., Dam N. Dam i (1 \leq i \leq N) is located between Mountain i and i+1 (Mountain N+1 is Mountain 1). When Mountain i (1 \leq i ...
["import numpy as np\n\nn = int(input())\na = [int(i) for i in input().split()] \nans = np.array(a)\n\ns = (n,n)\nM = np.matrix(np.zeros(s))\nfor i in range(n):\n vec = np.zeros(n)\n vec[i]=1/2\n if i == (n-1):\n vec[0]=1/2\n else:\n vec[i+1]=1/2\n M[i] = vec\nans = (np.linalg.inv(M)*(ans.r...
['Runtime Error', 'Wrong Answer', 'Wrong Answer', 'Accepted']
['s207415327', 's238298781', 's780950180', 's294605002']
[464200.0, 25080.0, 23112.0, 23088.0]
[2110.0, 910.0, 887.0, 872.0]
[361, 243, 240, 233]
p02984
u231685196
2,000
1,048,576
There are N mountains in a circle, called Mountain 1, Mountain 2, ..., Mountain N in clockwise order. N is an _odd_ number. Between these mountains, there are N dams, called Dam 1, Dam 2, ..., Dam N. Dam i (1 \leq i \leq N) is located between Mountain i and i+1 (Mountain N+1 is Mountain 1). When Mountain i (1 \leq i ...
['import numpy as np\n\n\ndef cmb(n, r, mod):\n if (r < 0 or r > n):\n return 0\n r = min(r, n - r)\n return g1[n] * g2[r] * g2[n - r] % mod\n\n\nmod = 10 ** 9 + 7 \nN = 10 ** 4\ng1 = [1, 1] \ng2 = [1, 1] \ninverse = [0, 1] 計算用テーブル\n\nfor i in range(2, N + 1):\n g1.append((g1[-1] * i) % mod)\n ...
['Runtime Error', 'Accepted']
['s794760047', 's489005921']
[317496.0, 25892.0]
[2109.0, 401.0]
[753, 794]
p02984
u255673886
2,000
1,048,576
There are N mountains in a circle, called Mountain 1, Mountain 2, ..., Mountain N in clockwise order. N is an _odd_ number. Between these mountains, there are N dams, called Dam 1, Dam 2, ..., Dam N. Dam i (1 \leq i \leq N) is located between Mountain i and i+1 (Mountain N+1 is Mountain 1). When Mountain i (1 \leq i ...
['import numpy as np\nN = int(input())\nA = list(map(int, input().split()))\na = np.array(A)\nl = int(((N**2)+1)/2)\nb = []\nfor i in range(l):\n b.append([1,-1])\n print(b)\nb = np.array(b).reshape(1,2*l)\nc = (np.delete(b, 2*l-1, axis=None)).reshape(N,N)\nd = c.reshape(N,N)\ninv = 0.5*( np.triu(c) - ( np.tril(c...
['Wrong Answer', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Wrong Answer', 'Runtime Error', 'Wrong Answer', 'Runtime Error', 'Accepted']
['s025385906', 's067198102', 's256408089', 's404792251', 's549113687', 's588131778', 's620103828', 's622485343', 's914453599', 's136556716']
[67960.0, 2940.0, 914760.0, 307780.0, 1062436.0, 23116.0, 914768.0, 23124.0, 160072.0, 32572.0]
[2109.0, 17.0, 917.0, 292.0, 938.0, 175.0, 1013.0, 181.0, 330.0, 404.0]
[426, 460, 418, 421, 357, 431, 415, 432, 433, 370]
p02984
u261246129
2,000
1,048,576
There are N mountains in a circle, called Mountain 1, Mountain 2, ..., Mountain N in clockwise order. N is an _odd_ number. Between these mountains, there are N dams, called Dam 1, Dam 2, ..., Dam N. Dam i (1 \leq i \leq N) is located between Mountain i and i+1 (Mountain N+1 is Mountain 1). When Mountain i (1 \leq i ...
['n = int(input())\na_list = list(map(int, input().split()))\n\nans = [0 for _ in range(n)]\nsum_rain = sum(a_list)\ntmp = sum_rain\nfor a in a_list[:-1:2]:\n tmp -= a * 2\nans[-1] = tmp\nans[0] = a_list[-1] * 2 - tmp\ntmp = ans[0]\nfor i in range(1, n-1):\n tmp = a_list[i-1] * 2 - tmp\n ans[i] = tmp\nprint(an...
['Wrong Answer', 'Accepted']
['s563564833', 's786692953']
[14408.0, 14940.0]
[96.0, 128.0]
[307, 308]
p02984
u268181283
2,000
1,048,576
There are N mountains in a circle, called Mountain 1, Mountain 2, ..., Mountain N in clockwise order. N is an _odd_ number. Between these mountains, there are N dams, called Dam 1, Dam 2, ..., Dam N. Dam i (1 \leq i \leq N) is located between Mountain i and i+1 (Mountain N+1 is Mountain 1). When Mountain i (1 \leq i ...
['\nimport scipy.linalg as linalg\n\nN = int(input())\nsolve_arr = [int(i) for i in input().split()]\nsolve_arr = [i*2 for i in solve_arr]\nw_arr = []\n\nfor i in range(N):\n arr = [0]*N\n if i == N-1:\n arr[i] = 1\n arr[0] = 1\n else:\n arr[i] = 1\n arr[i+1] = 1\n w_arr.append(arr)\n \nLU = linalg.lu_...
['Time Limit Exceeded', 'Time Limit Exceeded', 'Time Limit Exceeded', 'Accepted']
['s135434174', 's209926255', 's250114415', 's833703889']
[1980476.0, 1982464.0, 1984108.0, 18116.0]
[2230.0, 2230.0, 2235.0, 119.0]
[402, 392, 336, 400]
p02984
u276204978
2,000
1,048,576
There are N mountains in a circle, called Mountain 1, Mountain 2, ..., Mountain N in clockwise order. N is an _odd_ number. Between these mountains, there are N dams, called Dam 1, Dam 2, ..., Dam N. Dam i (1 \leq i \leq N) is located between Mountain i and i+1 (Mountain N+1 is Mountain 1). When Mountain i (1 \leq i ...
[' A[max_idx] -= b\n', "import numpy as np\nN = int(input())\nA = [int(i) for i in list(input().split())]\nA = np.array(A)\n\nres = np.zeros(len(A))\n\nmax_idx = np.argmax(A)\n\nif max_idx - 1 >= 0:\n max_idx -= 1\nelse:\n max_idx = max_idx + N - 1\n\na = A[max_idx] // 2 * 4\n\nif max_idx + 1 > N - 1:\n res...
['Runtime Error', 'Wrong Answer', 'Wrong Answer', 'Accepted']
['s103107796', 's346722655', 's682460146', 's119893915']
[2940.0, 23100.0, 23108.0, 14412.0]
[17.0, 1171.0, 719.0, 117.0]
[20, 581, 556, 138]
p02984
u281733053
2,000
1,048,576
There are N mountains in a circle, called Mountain 1, Mountain 2, ..., Mountain N in clockwise order. N is an _odd_ number. Between these mountains, there are N dams, called Dam 1, Dam 2, ..., Dam N. Dam i (1 \leq i \leq N) is located between Mountain i and i+1 (Mountain N+1 is Mountain 1). When Mountain i (1 \leq i ...
['n = int(input())\nlst = list(map(int,input().split()))\nans = []\nsome = 0\nfor i in range(n):\n some += lst[i]*(((-1)**i))/2\nfor i in range(n):\n if i == 0:\n ans.append(str(int(some)))\n else:\n ans.append(str(int(lst[i-1]-int(ans[i-1]))))\nprint(" ".join(ans))', 'n = int(input())\nlst = lis...
['Wrong Answer', 'Accepted']
['s995240607', 's698643603']
[16968.0, 17348.0]
[187.0, 192.0]
[276, 278]
p02984
u296150111
2,000
1,048,576
There are N mountains in a circle, called Mountain 1, Mountain 2, ..., Mountain N in clockwise order. N is an _odd_ number. Between these mountains, there are N dams, called Dam 1, Dam 2, ..., Dam N. Dam i (1 \leq i \leq N) is located between Mountain i and i+1 (Mountain N+1 is Mountain 1). When Mountain i (1 \leq i ...
['n=int(input())\na=list(map(int,input().split()))\nb=[0]*n\nfor i in range(n-2):\n\tb[i+2]=b[i]+(a[i+1]-a[i])*2\nsa=(a[-1]-a[-2])*2+b[-2]\nfor i in range(n//2):\n\tb[i*2+1]-=sa\nhosei=sum(a)-sum(b)\nfor i in range(n):\n\tb[i]+=hosei//5\nprint(*b)', 'n=int(input())\na=list(map(int,input().split()))\nans=[]\nx=0\nfor i ...
['Wrong Answer', 'Accepted']
['s595451750', 's769703188']
[15068.0, 14092.0]
[168.0, 137.0]
[231, 190]
p02984
u298297089
2,000
1,048,576
There are N mountains in a circle, called Mountain 1, Mountain 2, ..., Mountain N in clockwise order. N is an _odd_ number. Between these mountains, there are N dams, called Dam 1, Dam 2, ..., Dam N. Dam i (1 \leq i \leq N) is located between Mountain i and i+1 (Mountain N+1 is Mountain 1). When Mountain i (1 \leq i ...
["N = int(input())\nA = list(map(int,input().split()))\n\nx1 = sum(A) - 2 * sum(A[1::2])\nprint(A[1::2])\nprint(x1, end=' ')\nfor i in range(N-1):\n x1 = 2 * A[i] - x1\n print(x1, end=' ')", "N = int(input())\nA = list(map(int,input().split()))\n\nx1 = sum(A) - 2 * sum(A[1::2])\nprint(A[1::2])\nprint(x1, end=' ')...
['Wrong Answer', 'Wrong Answer', 'Accepted']
['s373200110', 's548786778', 's121519813']
[14092.0, 14028.0, 17224.0]
[183.0, 190.0, 98.0]
[184, 192, 201]
p02984
u303739137
2,000
1,048,576
There are N mountains in a circle, called Mountain 1, Mountain 2, ..., Mountain N in clockwise order. N is an _odd_ number. Between these mountains, there are N dams, called Dam 1, Dam 2, ..., Dam N. Dam i (1 \leq i \leq N) is located between Mountain i and i+1 (Mountain N+1 is Mountain 1). When Mountain i (1 \leq i ...
['n = int(input())\naa = list(map(int, input().split()))\ntotal_odd = sum(aa[1::2])\ntotal_eve = sum(aa[2::2])\ntmp = aa[0] + total_odd - total_eve\nlast = tmp\nfor i in range(1,n):\n tmp = 2*aa[i] - tmp\n print(tmp)\nprint(last)\n', 'l, r = map(int, input().split())\nif r //2019 > l //2019:\n print(0)\nelse:\...
['Wrong Answer', 'Runtime Error', 'Runtime Error', 'Accepted']
['s541101181', 's589244169', 's721247412', 's932885751']
[14092.0, 3060.0, 3060.0, 19144.0]
[129.0, 18.0, 18.0, 92.0]
[225, 225, 226, 251]
p02984
u309039873
2,000
1,048,576
There are N mountains in a circle, called Mountain 1, Mountain 2, ..., Mountain N in clockwise order. N is an _odd_ number. Between these mountains, there are N dams, called Dam 1, Dam 2, ..., Dam N. Dam i (1 \leq i \leq N) is located between Mountain i and i+1 (Mountain N+1 is Mountain 1). When Mountain i (1 \leq i ...
["N = int(input())\nA_s = list(map(int,input().split()))\nX_s = []\nX_s.append(sum(A_s)-2*sum(A_s[1::2]))\nfor i,a in enumerate(A_s):\n X_s.append(2*A_s[i]-X_s[i])\nprint(' '.join(map(str,X_s)))", "N = int(input())\nA_s = list(map(int,input().split()))\nX_s = []\nX_s.append(sum(A_s)-2*sum(A_s[1::2]))\nfor i,a in enume...
['Wrong Answer', 'Accepted']
['s251121282', 's921708722']
[19148.0, 19140.0]
[93.0, 94.0]
[187, 198]
p02984
u330692748
2,000
1,048,576
There are N mountains in a circle, called Mountain 1, Mountain 2, ..., Mountain N in clockwise order. N is an _odd_ number. Between these mountains, there are N dams, called Dam 1, Dam 2, ..., Dam N. Dam i (1 \leq i \leq N) is located between Mountain i and i+1 (Mountain N+1 is Mountain 1). When Mountain i (1 \leq i ...
['# -*- coding: utf-8 -*-\nimport numpy as np\n\nL, R = list(map(int, input().split()))\n\nif R-L >= 2019:\n print(0)\nelse:\n tmp = []\n for i in range(L, R):\n for j in range(i+1, R+1):\n tmp.append((i * j) % 2019)\n print(min(tmp))\n', '# -*- coding: utf-8 -*-\n\nN = int(input())\nA = l...
['Runtime Error', 'Accepted']
['s775179298', 's872715831']
[14316.0, 18120.0]
[148.0, 96.0]
[251, 203]
p02984
u336650912
2,000
1,048,576
There are N mountains in a circle, called Mountain 1, Mountain 2, ..., Mountain N in clockwise order. N is an _odd_ number. Between these mountains, there are N dams, called Dam 1, Dam 2, ..., Dam N. Dam i (1 \leq i \leq N) is located between Mountain i and i+1 (Mountain N+1 is Mountain 1). When Mountain i (1 \leq i ...
['N = int(input())\nA = input().split()\nA = [int(n) for n in A]\nprint(A)\nS = sum(A)\nprint(S)\nX1 = S\nresult = []\nfor i in range(1,N-1,2):\n X1 -= 2*A[i]\n\nresult.append(X1)\n\nfor i in range(N-1):\n result.append(2*A[i]-result[i])\n\nprint(result)', 'N = int(input())\nA = input().split()\nA = [int(n) for n...
['Wrong Answer', 'Accepted']
['s817790223', 's771376667']
[16796.0, 14528.0]
[102.0, 141.0]
[242, 272]
p02984
u343977188
2,000
1,048,576
There are N mountains in a circle, called Mountain 1, Mountain 2, ..., Mountain N in clockwise order. N is an _odd_ number. Between these mountains, there are N dams, called Dam 1, Dam 2, ..., Dam N. Dam i (1 \leq i \leq N) is located between Mountain i and i+1 (Mountain N+1 is Mountain 1). When Mountain i (1 \leq i ...
['N=int(input())\nA=list(map(int,input().split()))\n\nMaxX1=min(A[-1],A[1])*2\n\nfor i in range(0,MaxX1+2,2):\n X=[i]*N\n for j in range(N-1):\n X[j+1]=2*A[j]-X[j]\n AJ=[0]*N\n for k in range(N):\n AJ[k-1]=X[k-1]/2+X[k]/2\n if AJ==A:\n print(X)\n exit',...
['Wrong Answer', 'Accepted']
['s006781606', 's934858734']
[23076.0, 20588.0]
[2104.0, 104.0]
[302, 171]
p02984
u353241315
2,000
1,048,576
There are N mountains in a circle, called Mountain 1, Mountain 2, ..., Mountain N in clockwise order. N is an _odd_ number. Between these mountains, there are N dams, called Dam 1, Dam 2, ..., Dam N. Dam i (1 \leq i \leq N) is located between Mountain i and i+1 (Mountain N+1 is Mountain 1). When Mountain i (1 \leq i ...
["def rain_volume(A, N):\n X = [0]*N\n X[0] = sum(A)\n for i, a in enumerate(A):\n if i%2 != 0:\n X[0] -= 2*a\n for i, a in enumerate(A):\n if i != 0:\n X[i] = 2*A[i] - X[i-1]\n return X\n\nif __name__ == '__main__':\n N = int(input())\n A = list(map(int, input()...
['Wrong Answer', 'Runtime Error', 'Accepted']
['s197643157', 's712238490', 's773374821']
[18536.0, 12496.0, 18076.0]
[101.0, 150.0, 101.0]
[369, 389, 366]
p02984
u353797797
2,000
1,048,576
There are N mountains in a circle, called Mountain 1, Mountain 2, ..., Mountain N in clockwise order. N is an _odd_ number. Between these mountains, there are N dams, called Dam 1, Dam 2, ..., Dam N. Dam i (1 \leq i \leq N) is located between Mountain i and i+1 (Mountain N+1 is Mountain 1). When Mountain i (1 \leq i ...
['n=int(input())\na=list(map(int,input().split()))\na0=sum(a)//2-sum(a[1::2])\nprint(a0)\nans=[a0*2]\nfor i in range(n-2):\n ans.append(a[i]*2-ans[-1])\nans.append((a[-1]-a0)*2)\nprint(ans)\n', 'n=int(input())\na=list(map(int,input().split()))\na0=sum(a)//2-sum(a[1::2])\nans=[a0*2]\nfor i in range(n-2):\n ans.app...
['Wrong Answer', 'Wrong Answer', 'Accepted']
['s434398916', 's559549066', 's761351844']
[14412.0, 15300.0, 14092.0]
[78.0, 80.0, 117.0]
[183, 173, 174]
p02984
u354916249
2,000
1,048,576
There are N mountains in a circle, called Mountain 1, Mountain 2, ..., Mountain N in clockwise order. N is an _odd_ number. Between these mountains, there are N dams, called Dam 1, Dam 2, ..., Dam N. Dam i (1 \leq i \leq N) is located between Mountain i and i+1 (Mountain N+1 is Mountain 1). When Mountain i (1 \leq i ...
["N = int(input())\nA = list(map(int, input().split()))\n\ns = 1\n\nfor i in range(N):\n s = A[i] - s\n # print('A[i]',A[i])\n # print(s)\n\nx = s//2\nB = [0]*N\n\nfor i in range(N):\n B[i] = x*2\n x = A[i] - x\n\nprint(*B)", "N = int(input())\nA = list(map(int, input().split()))\n\ns = 0\n\nfor i in ran...
['Wrong Answer', 'Accepted']
['s392288563', 's505766164']
[14092.0, 14028.0]
[132.0, 123.0]
[219, 220]
p02984
u360116509
2,000
1,048,576
There are N mountains in a circle, called Mountain 1, Mountain 2, ..., Mountain N in clockwise order. N is an _odd_ number. Between these mountains, there are N dams, called Dam 1, Dam 2, ..., Dam N. Dam i (1 \leq i \leq N) is located between Mountain i and i+1 (Mountain N+1 is Mountain 1). When Mountain i (1 \leq i ...
['def main():\n N = int(input())\n A = list(map(int, input().split()))\n x = sum(A) - 2 * sum(A[i] for i in range(1, N, 2))\n ans = [x]\n for i in range(N - 1):\n x = 2 * A[i] - x\n ans.append(x)\n print(ans)\n\n\nmain()\n', "def main():\n N = int(input())\n A = list(map(int, input...
['Wrong Answer', 'Accepted']
['s159975055', 's800325798']
[14408.0, 17224.0]
[72.0, 84.0]
[240, 260]