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
p02982
u896206464
2,000
1,048,576
There are N points in a D-dimensional space. The coordinates of the i-th point are (X_{i1}, X_{i2}, ..., X_{iD}). The distance between two points with coordinates (y_1, y_2, ..., y_D) and (z_1, z_2, ..., z_D) is \sqrt{(y_1 - z_1)^2 + (y_2 - z_2)^2 + ... + (y_D - z_D)^2}. How many pairs (i, j) (i < j) are there such ...
['N, D = [int(_) for _ in input().split()]\nX = []\nfor i in range(D):\n X.append([int(_) for _ in input().split()])\n\n# N, D = [3, 4]\n# X = [\n# [-3, 7, 8, 2],\n# [-12, 1, 10, 2],\n# [-2, 8, 9, 3]\n# ]\n\nimport math\nimport numpy\n\nans = 0\nfor i in range(N):\n for j in range(i):\n # print(i,j)\n ...
['Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted']
['s010795622', 's099445532', 's519336213', 's585163658', 's600783529']
[12508.0, 3064.0, 3064.0, 3064.0, 3064.0]
[149.0, 18.0, 17.0, 18.0, 18.0]
[426, 408, 300, 413, 413]
p02982
u901598613
2,000
1,048,576
There are N points in a D-dimensional space. The coordinates of the i-th point are (X_{i1}, X_{i2}, ..., X_{iD}). The distance between two points with coordinates (y_1, y_2, ..., y_D) and (z_1, z_2, ..., z_D) is \sqrt{(y_1 - z_1)^2 + (y_2 - z_2)^2 + ... + (y_D - z_D)^2}. How many pairs (i, j) (i < j) are there such ...
['import math\nn,d=map(int,input().split())\nza=[list(map(int,input().split())) for i in range(n)]\nans=0\nlon=0\nfor i in range(n):\n for j in range(i+1,n):\n for k in range(d):\n lon+=(za[i][d]-za[j][d])**2\n lon=math.sqrt(lon)\n else:\n if lon==int(lon):\n ...
['Runtime Error', 'Accepted']
['s803361545', 's604428910']
[3064.0, 3064.0]
[18.0, 18.0]
[346, 346]
p02982
u903948194
2,000
1,048,576
There are N points in a D-dimensional space. The coordinates of the i-th point are (X_{i1}, X_{i2}, ..., X_{iD}). The distance between two points with coordinates (y_1, y_2, ..., y_D) and (z_1, z_2, ..., z_D) is \sqrt{(y_1 - z_1)^2 + (y_2 - z_2)^2 + ... + (y_D - z_D)^2}. How many pairs (i, j) (i < j) are there such ...
['N, D = [int(n) for n in input().split()]\nX = []\nfor i in range(N):\n X.append([int(m) for m in input().split()])\n\ndef get_distance(p1, p2):\n d2 = 0\n for i in range(D):\n d2 += (p1[i] - p2[i])**2\n return math.sqrt(d2)\n\ncount = 0\nfor i, j in itertools.combinations(range(N), 2):\n if get_...
['Runtime Error', 'Accepted']
['s143351162', 's131490761']
[9132.0, 9108.0]
[23.0, 28.0]
[372, 402]
p02982
u905582793
2,000
1,048,576
There are N points in a D-dimensional space. The coordinates of the i-th point are (X_{i1}, X_{i2}, ..., X_{iD}). The distance between two points with coordinates (y_1, y_2, ..., y_D) and (z_1, z_2, ..., z_D) is \sqrt{(y_1 - z_1)^2 + (y_2 - z_2)^2 + ... + (y_D - z_D)^2}. How many pairs (i, j) (i < j) are there such ...
['from itertools import combinations\nsq = [i**2 for i in range(500)]\nans = 0\nn,d = map(int,input().split())\na = [list(map(int,input().split())) for i in range(n)]\nfor (i,j) in combinations(a,2):\n dist2 = 0\n for x in range(d):\n dist2 += i[x]**2 + j[x]**2\n if dist2 in sq:\n ans += 1\nprint(ans)', 'from ...
['Wrong Answer', 'Accepted']
['s438473804', 's861749820']
[3064.0, 3064.0]
[18.0, 18.0]
[298, 295]
p02982
u912179452
2,000
1,048,576
There are N points in a D-dimensional space. The coordinates of the i-th point are (X_{i1}, X_{i2}, ..., X_{iD}). The distance between two points with coordinates (y_1, y_2, ..., y_D) and (z_1, z_2, ..., z_D) is \sqrt{(y_1 - z_1)^2 + (y_2 - z_2)^2 + ... + (y_D - z_D)^2}. How many pairs (i, j) (i < j) are there such ...
['import itertools\nimport numpy\n\nN, D = map(int, input().split())\n\ngrid = []\nfor i in range(N):\n X = list(map(int, input().strip().split()))\n grid.append(X)\n\n#print(grid)\n\ngrid2 = list(itertools.combinations(grid, 2))\nfor i in grid2:\n x = numpy.array(i[0])\n y = numpy.array(i[1])\n # print(x...
['Wrong Answer', 'Runtime Error', 'Wrong Answer', 'Runtime Error', 'Accepted']
['s103138215', 's239986999', 's666394262', 's816731098', 's586521603']
[12392.0, 3060.0, 12392.0, 3064.0, 12392.0]
[149.0, 17.0, 152.0, 17.0, 149.0]
[391, 401, 390, 411, 549]
p02982
u913395020
2,000
1,048,576
There are N points in a D-dimensional space. The coordinates of the i-th point are (X_{i1}, X_{i2}, ..., X_{iD}). The distance between two points with coordinates (y_1, y_2, ..., y_D) and (z_1, z_2, ..., z_D) is \sqrt{(y_1 - z_1)^2 + (y_2 - z_2)^2 + ... + (y_D - z_D)^2}. How many pairs (i, j) (i < j) are there such ...
['def issq(n):\n for i in range(2 * n):\n if i * i == n:\n return True\n return False\n \n\nn, d = map(int, input().split())\nx = [list(map(int, input().split())) for i in range(n)]\n\ncount = 0\n\nfor i in range(n - 1):\n for j in range(i + 1, n):\n sqdist = 0\n for k in ran...
['Wrong Answer', 'Wrong Answer', 'Accepted']
['s286620469', 's310029439', 's188476545']
[3064.0, 3064.0, 3064.0]
[35.0, 18.0, 35.0]
[465, 445, 443]
p02982
u918845030
2,000
1,048,576
There are N points in a D-dimensional space. The coordinates of the i-th point are (X_{i1}, X_{i2}, ..., X_{iD}). The distance between two points with coordinates (y_1, y_2, ..., y_D) and (z_1, z_2, ..., z_D) is \sqrt{(y_1 - z_1)^2 + (y_2 - z_2)^2 + ... + (y_D - z_D)^2}. How many pairs (i, j) (i < j) are there such ...
['def input_from_console():\n n, d = map(int, input().split())\n x_matrix = []\n for i in range(n):\n x = map(int, input().split())\n x_matrix.append(list(x))\n return n, d, x_matrix\n\n\ndef solve(n, d, x_matrix):\n result = 0\n for i in range(n):\n for j in range(n - i -1):\n ...
['Runtime Error', 'Accepted']
['s805790991', 's247383052']
[3064.0, 3064.0]
[17.0, 17.0]
[762, 775]
p02982
u925567828
2,000
1,048,576
There are N points in a D-dimensional space. The coordinates of the i-th point are (X_{i1}, X_{i2}, ..., X_{iD}). The distance between two points with coordinates (y_1, y_2, ..., y_D) and (z_1, z_2, ..., z_D) is \sqrt{(y_1 - z_1)^2 + (y_2 - z_2)^2 + ... + (y_D - z_D)^2}. How many pairs (i, j) (i < j) are there such ...
['n,d =map(int, input().split())\nL=[]\nfor i in range(n):\n L.append(list(map(int, input().split())))\nans =0\n\nfor i in range(n):\n for j in range(i+1,n):\n dis=0\n for k in range(d):\n dis = (L[i][k]-L[j][k])**2\n dis = dis**0.5\n if(dis == int(dis):\n ans +=1...
['Runtime Error', 'Wrong Answer', 'Wrong Answer', 'Accepted']
['s125411369', 's897979340', 's971384414', 's739038871']
[2940.0, 3060.0, 3064.0, 3064.0]
[17.0, 18.0, 17.0, 18.0]
[316, 316, 316, 315]
p02982
u928784113
2,000
1,048,576
There are N points in a D-dimensional space. The coordinates of the i-th point are (X_{i1}, X_{i2}, ..., X_{iD}). The distance between two points with coordinates (y_1, y_2, ..., y_D) and (z_1, z_2, ..., z_D) is \sqrt{(y_1 - z_1)^2 + (y_2 - z_2)^2 + ... + (y_D - z_D)^2}. How many pairs (i, j) (i < j) are there such ...
['import numpy as np\nN,D = map(int,input().split())\nXD = [list(map(int,input().split())) for i in range(N)]\ndis = 0\ncount = 0\nfor i in range(N):\n for j in range(N-i):\n if j == 0:\n continue\n for k in range(D):\n dis = (abs(XD[i][k]-XD[j+i][k]))**2\n if int(np.sqrt(...
['Wrong Answer', 'Accepted']
['s383770595', 's560154301']
[21440.0, 12428.0]
[297.0, 149.0]
[383, 384]
p02982
u932868243
2,000
1,048,576
There are N points in a D-dimensional space. The coordinates of the i-th point are (X_{i1}, X_{i2}, ..., X_{iD}). The distance between two points with coordinates (y_1, y_2, ..., y_D) and (z_1, z_2, ..., z_D) is \sqrt{(y_1 - z_1)^2 + (y_2 - z_2)^2 + ... + (y_D - z_D)^2}. How many pairs (i, j) (i < j) are there such ...
['n,d=map(int,input().split())\nlists=[list(map(int,input().split())) for x in range(n)]\nanswer=0\nfor i in range(1,n):\n for j in range(i+1,n+1):\n count=o\n for y in range(d):\n count+=(lists[j-1][y]-lists[i-1][y])**2\n t=count**(1/2)\n if t.is_integer():\n answer+=1\nprint(answer)', 'n,d=ma...
['Runtime Error', 'Runtime Error', 'Runtime Error', 'Wrong Answer', 'Runtime Error', 'Runtime Error', 'Accepted']
['s129721118', 's372470252', 's418043051', 's512001353', 's540960040', 's656470742', 's051302549']
[3064.0, 3188.0, 3064.0, 3064.0, 3060.0, 3064.0, 3064.0]
[17.0, 18.0, 17.0, 18.0, 17.0, 17.0, 18.0]
[297, 301, 303, 303, 299, 295, 257]
p02982
u935424675
2,000
1,048,576
There are N points in a D-dimensional space. The coordinates of the i-th point are (X_{i1}, X_{i2}, ..., X_{iD}). The distance between two points with coordinates (y_1, y_2, ..., y_D) and (z_1, z_2, ..., z_D) is \sqrt{(y_1 - z_1)^2 + (y_2 - z_2)^2 + ... + (y_D - z_D)^2}. How many pairs (i, j) (i < j) are there such ...
['import sys\nimport math\nN,D=map(int,sys.stdin.readline().split())\nx=[]\ncount=0\nfor i in range(N):\n x.append(map(int,sys.stdin.readline().split()))\nfor i in range(N):\n for j in range(n-1):\n if j>=i:\n k=j+1\n else:\n k=j\n diff=math.sqrt(sum([(a-b)**2 for a,b in...
['Runtime Error', 'Accepted']
['s767700223', 's773241792']
[2940.0, 3064.0]
[17.0, 19.0]
[383, 334]
p02982
u940780117
2,000
1,048,576
There are N points in a D-dimensional space. The coordinates of the i-th point are (X_{i1}, X_{i2}, ..., X_{iD}). The distance between two points with coordinates (y_1, y_2, ..., y_D) and (z_1, z_2, ..., z_D) is \sqrt{(y_1 - z_1)^2 + (y_2 - z_2)^2 + ... + (y_D - z_D)^2}. How many pairs (i, j) (i < j) are there such ...
['import math\nN,D=map(int,input().split())\nX=[list(map(int,input().split()))for i in range(N)]\nans=0\ndist=0.0\nfor i in range(N):\n for j in range(i+1,N):\n dist=0.0\n for k in range(D):\n dist+=(X[i][k]-X[j][k])**2\n print(dist.is_integer())\n if dist.is_integer() is True:...
['Wrong Answer', 'Accepted']
['s868403177', 's290839572']
[3064.0, 3064.0]
[18.0, 18.0]
[337, 333]
p02982
u945181840
2,000
1,048,576
There are N points in a D-dimensional space. The coordinates of the i-th point are (X_{i1}, X_{i2}, ..., X_{iD}). The distance between two points with coordinates (y_1, y_2, ..., y_D) and (z_1, z_2, ..., z_D) is \sqrt{(y_1 - z_1)^2 + (y_2 - z_2)^2 + ... + (y_D - z_D)^2}. How many pairs (i, j) (i < j) are there such ...
['import numpy as np\n\nN, D = map(int, input().split())\nX = np.array([list(map(int, input().split())) for _ in range(N)])\nans = 0\nDist = 0\n\nfor i in range(N - 1):\n for j in range(i + 1, N):\n Dist = np.sum((X[i] - X[j]) ** 2)\n print(Dist)\n for k in range(1, Dist // 2 + 2):\n ...
['Wrong Answer', 'Accepted']
['s078524985', 's351359558']
[12484.0, 21524.0]
[222.0, 325.0]
[360, 340]
p02982
u947327691
2,000
1,048,576
There are N points in a D-dimensional space. The coordinates of the i-th point are (X_{i1}, X_{i2}, ..., X_{iD}). The distance between two points with coordinates (y_1, y_2, ..., y_D) and (z_1, z_2, ..., z_D) is \sqrt{(y_1 - z_1)^2 + (y_2 - z_2)^2 + ... + (y_D - z_D)^2}. How many pairs (i, j) (i < j) are there such ...
['n,d = map(int, input().split())\nx = [list(map(int, input().split())) for _ in range(n)]\n\ncnt=0\nfor i in range(n):\n for j in range(i+1,n):\n sum=0\n for k in range(d):\n sum += (x[i][k]-x[j][k])**2\n route = sum**0.5\n if route.is_integer:\n cnt += 1\n\nprint(c...
['Wrong Answer', 'Runtime Error', 'Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Accepted']
['s058866424', 's216296451', 's242727107', 's821810336', 's949358947', 's766932494']
[3064.0, 2940.0, 3188.0, 3188.0, 3188.0, 3064.0]
[18.0, 17.0, 18.0, 18.0, 17.0, 18.0]
[308, 316, 308, 318, 323, 304]
p02982
u948911484
2,000
1,048,576
There are N points in a D-dimensional space. The coordinates of the i-th point are (X_{i1}, X_{i2}, ..., X_{iD}). The distance between two points with coordinates (y_1, y_2, ..., y_D) and (z_1, z_2, ..., z_D) is \sqrt{(y_1 - z_1)^2 + (y_2 - z_2)^2 + ... + (y_D - z_D)^2}. How many pairs (i, j) (i < j) are there such ...
['import math\nn,d = map(int,input().split())\nx = [list(map(int,input().split())) for _ in range(n)]\ndef distance(a,b):\n s = 0\n for i in range(d):\n s += (a[i]-b[i])**2\n return math.sqrt(ans)\nans = 0\nfor i in range(n-1):\n for j in range(i+1,n):\n if distance(x[i],x[j])//1 == distance(x[i],x[j]):\n ...
['Wrong Answer', 'Accepted']
['s905702377', 's723156595']
[3064.0, 3064.0]
[19.0, 18.0]
[327, 325]
p02982
u952491523
2,000
1,048,576
There are N points in a D-dimensional space. The coordinates of the i-th point are (X_{i1}, X_{i2}, ..., X_{iD}). The distance between two points with coordinates (y_1, y_2, ..., y_D) and (z_1, z_2, ..., z_D) is \sqrt{(y_1 - z_1)^2 + (y_2 - z_2)^2 + ... + (y_D - z_D)^2}. How many pairs (i, j) (i < j) are there such ...
['import math\n\nn,d = map(int, input().split())\nx_array = []\nfor i in range(n):\n x_array.append(list(map(int, input().split())))\n\n ans = 0\nfor i in range(1,n):\n for j in range(i):\n print(i, j)\n list1 = x_array[i]\n list2 = x_array[j]\n count = 0\n for k in range(len(list1)):\n count += ...
['Wrong Answer', 'Accepted']
['s165850610', 's672368328']
[3064.0, 3064.0]
[17.0, 17.0]
[405, 389]
p02982
u957338785
2,000
1,048,576
There are N points in a D-dimensional space. The coordinates of the i-th point are (X_{i1}, X_{i2}, ..., X_{iD}). The distance between two points with coordinates (y_1, y_2, ..., y_D) and (z_1, z_2, ..., z_D) is \sqrt{(y_1 - z_1)^2 + (y_2 - z_2)^2 + ... + (y_D - z_D)^2}. How many pairs (i, j) (i < j) are there such ...
['N, D = map(int, input().split())\ndata = [list(map(int, input().split())) for _ in range(N)]\nimport numpy as np\ndef dist(X, Y, D):\n s = 0\n for i in range(D):\n s += (X[i] - Y[i]) * (X[i] - Y[i])\n sq = int(np.sqrt(s))\n if np.abs(s - sq * sq) < 0.0001:\n return True\n return False\nc ...
['Wrong Answer', 'Wrong Answer', 'Accepted']
['s594527461', 's976680096', 's926140665']
[12492.0, 12468.0, 12240.0]
[157.0, 149.0, 149.0]
[482, 482, 427]
p02982
u960317355
2,000
1,048,576
There are N points in a D-dimensional space. The coordinates of the i-th point are (X_{i1}, X_{i2}, ..., X_{iD}). The distance between two points with coordinates (y_1, y_2, ..., y_D) and (z_1, z_2, ..., z_D) is \sqrt{(y_1 - z_1)^2 + (y_2 - z_2)^2 + ... + (y_D - z_D)^2}. How many pairs (i, j) (i < j) are there such ...
['import math\n\ndef is_integer(n):\n try:\n float(n)\n except ValueError:\n return False\n else:\n return float(n).is_integer()\n\nn,d = map(int,input().split())\nx = []\nfor i in range(n):\n x.append([int(j) for j in input().split()])\nc = 0\nprint(x)\nfor i in range(n-1):\n for j ...
['Wrong Answer', 'Accepted']
['s275531360', 's539553259']
[3064.0, 3064.0]
[17.0, 18.0]
[491, 482]
p02982
u968166680
2,000
1,048,576
There are N points in a D-dimensional space. The coordinates of the i-th point are (X_{i1}, X_{i2}, ..., X_{iD}). The distance between two points with coordinates (y_1, y_2, ..., y_D) and (z_1, z_2, ..., z_D) is \sqrt{(y_1 - z_1)^2 + (y_2 - z_2)^2 + ... + (y_D - z_D)^2}. How many pairs (i, j) (i < j) are there such ...
["import sys\n\nread = sys.stdin.read\nreadline = sys.stdin.readline\nreadlines = sys.stdin.readlines\nsys.setrecursionlimit(10 ** 9)\nINF = 1 << 60\nMOD = 1000000007\n\n\ndef main():\n L, R = map(int, readline().split())\n\n if L - R + 1 >= 2019:\n print(0)\n else:\n A = [i % 2019 for i in range...
['Runtime Error', 'Accepted']
['s480198082', 's468981106']
[9188.0, 9252.0]
[27.0, 29.0]
[410, 919]
p02982
u968846084
2,000
1,048,576
There are N points in a D-dimensional space. The coordinates of the i-th point are (X_{i1}, X_{i2}, ..., X_{iD}). The distance between two points with coordinates (y_1, y_2, ..., y_D) and (z_1, z_2, ..., z_D) is \sqrt{(y_1 - z_1)^2 + (y_2 - z_2)^2 + ... + (y_D - z_D)^2}. How many pairs (i, j) (i < j) are there such ...
['N,D=map(int,input().split())\nX = []\nfor i in range(N):\n X.append(input().split())\nc=0\nfor n in range(0,N-1):\n for m in range(n+1,N):\n a=0\n for j in range(0,D):\n a=a+int((int(X[n][j])-(int(X[m][j])**2)\n if (int(a**(1/2)))**2==a:\n c=c+1\nprint(c)', 'n,d=map(int,input().split())\nX=[[]*d ...
['Runtime Error', 'Accepted']
['s235111771', 's860653470']
[3060.0, 3064.0]
[17.0, 18.0]
[264, 294]
p02982
u969848070
2,000
1,048,576
There are N points in a D-dimensional space. The coordinates of the i-th point are (X_{i1}, X_{i2}, ..., X_{iD}). The distance between two points with coordinates (y_1, y_2, ..., y_D) and (z_1, z_2, ..., z_D) is \sqrt{(y_1 - z_1)^2 + (y_2 - z_2)^2 + ... + (y_D - z_D)^2}. How many pairs (i, j) (i < j) are there such ...
['n, d = map(int, input().split())\nl=[0]*n\nfor i in range(n):\n l[i] = list(map(int, input().split()))\nprint(l)', 'import math\nn, d = map(int, input().split())\na = []\nans = 0\nx = 0\nif d ==1:\n for i in range(n):\n a.append(int(input()))\n for i in range(n):\n for j in range(i,n):\n if math.sqrt((a...
['Wrong Answer', 'Accepted']
['s813258932', 's024203192']
[2940.0, 9204.0]
[18.0, 27.0]
[109, 534]
p02982
u974402118
2,000
1,048,576
There are N points in a D-dimensional space. The coordinates of the i-th point are (X_{i1}, X_{i2}, ..., X_{iD}). The distance between two points with coordinates (y_1, y_2, ..., y_D) and (z_1, z_2, ..., z_D) is \sqrt{(y_1 - z_1)^2 + (y_2 - z_2)^2 + ... + (y_D - z_D)^2}. How many pairs (i, j) (i < j) are there such ...
['N,D = (int(x) for x in input().split())\nX = []*N\nfor i in range(N):\n X[i] = [float(x) for x in input().split()]\ncount = 0\nfor i in range(N-1):\n for j in range(i+1,N):\n sq = [(X[i][k]-X[j][k])**2 for k in range(D)]\n if isinstance(sum(sq)**0.5 , int):\n count += 1\nprint(count)', 'N,D = (int(x) for...
['Runtime Error', 'Runtime Error', 'Accepted']
['s189420428', 's737193888', 's603267238']
[9132.0, 9020.0, 9412.0]
[26.0, 23.0, 23.0]
[287, 285, 302]
p02982
u988644208
2,000
1,048,576
There are N points in a D-dimensional space. The coordinates of the i-th point are (X_{i1}, X_{i2}, ..., X_{iD}). The distance between two points with coordinates (y_1, y_2, ..., y_D) and (z_1, z_2, ..., z_D) is \sqrt{(y_1 - z_1)^2 + (y_2 - z_2)^2 + ... + (y_D - z_D)^2}. How many pairs (i, j) (i < j) are there such ...
['import math\nn, d= (int(c) for c in input().split())\n\nx = []\n\nfor i in range(n): \n x.append(input().split())\n\nsum_ans = 0\ncount=0\nfor j in range(0,n):\n for k in range(j+1,n):\n for n in range(d):\n sum_ans = sum_ans+(x[j][n] - x[k][n]) **2\n if math.sqrt(sum_ans)%1==0:\n ...
['Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted']
['s111154503', 's305463197', 's336528285', 's672868600', 's799521431']
[3064.0, 2940.0, 3064.0, 3064.0, 3064.0]
[18.0, 17.0, 17.0, 17.0, 18.0]
[355, 360, 357, 359, 373]
p02982
u991269553
2,000
1,048,576
There are N points in a D-dimensional space. The coordinates of the i-th point are (X_{i1}, X_{i2}, ..., X_{iD}). The distance between two points with coordinates (y_1, y_2, ..., y_D) and (z_1, z_2, ..., z_D) is \sqrt{(y_1 - z_1)^2 + (y_2 - z_2)^2 + ... + (y_D - z_D)^2}. How many pairs (i, j) (i < j) are there such ...
['n,d = map(int,input().split())\ns = [input().split() for m in range(n)]\nprint(s)\nb = 0\nfor m in range(n):\n for l in range(m+1,n):\n ans = 0\n for j in range(d):\n ans += (int(s[m][j])-int(s[l][j]))**2\n if ans**0.5 == int(ans**0.5):\n b += 1\nprint(b)', 'n,d =...
['Wrong Answer', 'Wrong Answer', 'Runtime Error', 'Accepted']
['s168771696', 's302088526', 's679652558', 's787650600']
[3060.0, 3060.0, 2940.0, 3188.0]
[18.0, 18.0, 18.0, 18.0]
[298, 290, 334, 335]
p02982
u995062424
2,000
1,048,576
There are N points in a D-dimensional space. The coordinates of the i-th point are (X_{i1}, X_{i2}, ..., X_{iD}). The distance between two points with coordinates (y_1, y_2, ..., y_D) and (z_1, z_2, ..., z_D) is \sqrt{(y_1 - z_1)^2 + (y_2 - z_2)^2 + ... + (y_D - z_D)^2}. How many pairs (i, j) (i < j) are there such ...
['import math\nN, D = map(int, input().split())\nfor i in range(N):\n x = list(map(int, input().split()))\n\ncnt = 0\nfor i in range(D):\n for j in range(i+1, D):\n tmp = 0.0\n for k in range(D):\n tmp += (x[i][k]-x[j][k])**2\n if(math.sqrt(tmp).is_integer()):\n cnt += 1...
['Runtime Error', 'Accepted']
['s482649832', 's475474759']
[3064.0, 3064.0]
[18.0, 18.0]
[317, 310]
p02982
u997387634
2,000
1,048,576
There are N points in a D-dimensional space. The coordinates of the i-th point are (X_{i1}, X_{i2}, ..., X_{iD}). The distance between two points with coordinates (y_1, y_2, ..., y_D) and (z_1, z_2, ..., z_D) is \sqrt{(y_1 - z_1)^2 + (y_2 - z_2)^2 + ... + (y_D - z_D)^2}. How many pairs (i, j) (i < j) are there such ...
['N,D=map(int,input().split())\nP=[list(map(int,input().split())) for i in range(D)]\n\ndef distance(a,b):\n result=0\n for i in range(D):\n result+=(a[i]-b[i])**2\n result=result**0.5\n return result\n\nans=0\nfor i in range(N-1):\n for j in range(i+1,N):\n if distance(P[i],P[j]).is_intege...
['Runtime Error', 'Accepted']
['s195701009', 's748582533']
[3064.0, 3188.0]
[18.0, 17.0]
[340, 340]
p02983
u002459665
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# max_loop = 2019 * 2 + 1\nmax_loop = 2019 ** 2\ncount = 0\na = []\nfor i in range(L, R + 1):\n print(i)\n if count > max_loop:\n break\n a.append(i % 2019)\n count += 1\n\n# print(a)\nmn = min(a[:-1])\nif mn == 2018:\n print(0)\nelse:\n ans = (mn * (mn + 1...
['Wrong Answer', 'Wrong Answer', 'Accepted']
['s380168154', 's784638060', 's575214207']
[95764.0, 95444.0, 2940.0]
[2109.0, 2109.0, 63.0]
[325, 323, 287]
p02983
u003475507
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\nfor i in range(l,r+1):\n for j in range(i+1,r+1):\n ans = min(ans,(i*j)%2019)\nprint(ans)', 'l,r = map(int,input().split())\n\nfor i in range(l,r+1):\n for j in range(i+1,r+1):\n ans = min(ans,(i%2019*j%2019)%2019)\nprint(ans)', "l, r = map(int, input().split())\n...
['Runtime Error', 'Runtime Error', 'Wrong Answer', 'Accepted']
['s002809073', 's469386523', 's759152592', 's399062655']
[2940.0, 3060.0, 3060.0, 2940.0]
[17.0, 17.0, 2104.0, 1033.0]
[128, 138, 419, 204]
p02983
u003652013
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 = 0\nmin_mod = 2019\n\nif R-L<2019-1 :\n if R % 2019 > 0:\n for i in range(R-L) :\n print(i,(L+i)%2019)\n if min_mod > (L + i) % 2019 :\n min_mod = (L + i) % 2019\n \n ans = (min_mod * (min_mod + 1)) % 2019\nprint(ans)', 'L,R = map(int,input().split())\...
['Wrong Answer', 'Wrong Answer', 'Accepted']
['s303205924', 's753594148', 's134259078']
[3444.0, 3060.0, 3060.0]
[20.0, 840.0, 469.0]
[270, 329, 327]
p02983
u007785897
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\n\nl, r = [int(i) for i in input().split()]\n\nans = 2020\nfor i in range(l, r+1):\n\tfor k in range(i, r+1):\n\t\tmod = (i * k) % 2019\n\tif mod==0:\n\t\tprint(0)\n\t\tsys.exit()\n\n\tans = min(mod, ans)\n \nprint(ans)', 'import sys\n\nl, r = [int(i) for i in input().split()]\n\nans = 2020\nfor i in range...
['Wrong Answer', 'Accepted']
['s407353810', 's528389136']
[3060.0, 3060.0]
[2104.0, 63.0]
[207, 213]
p02983
u011062360
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())\nans = 0\na = a % 2019\nb = b % 2019\n\nif a > b:\n ans = 0\nelse:\n for i in range(a, b):\n for j in range(a+1, b+1):\n ans = min(ans, i*j%2019)\n\nprint(ans)', 'a, b = map(int, input().split())\nans = 20000000\nn = a//2019\nm = b//2019\na = a % 2019\nb = b % ...
['Wrong Answer', 'Accepted']
['s724821575', 's952962412']
[3060.0, 3064.0]
[1375.0, 1315.0]
[204, 282]
p02983
u014268998
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\nx = (R - L)%2019\nL %= 2019\nR = L + x\n\nprint(L,R)\n\nm = 2019\nfor i in range(L,R+1):\n for j in range(i+1,R+1):\n m = min(m,(i*j)%2019)\n if m == 0:\n break\nprint(m)\n \n\n', 'L,R = map(int,input().split())\nL %= 2019\nR %= 2019\nR += 2019\n\nm = 2019\nfor i in ra...
['Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Accepted']
['s220646291', 's501317024', 's518653426', 's601117314']
[3060.0, 2940.0, 3060.0, 2940.0]
[55.0, 21.0, 57.0, 58.0]
[209, 189, 240, 238]
p02983
u017415492
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=R-L\nY=2019\nif a<2019:\n for i in range(L,R+1):\n for j in range(L,R+1):\n if Y>(i)%2019 and i!=j:\n Y= (i)%2019\n print(Y)\nelse:\n print(0)\n ', 'l,r=map(int,input().split())\nhantei=20202\nif r-l+1>=2019:\n print(0)\nelse:\n for i in range(l,r+1):\n for ...
['Wrong Answer', 'Accepted']
['s971344927', 's121056773']
[2940.0, 3060.0]
[544.0, 1089.0]
[189, 205]
p02983
u020390084
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.
['n, m = map(int, input().split())\nlr = [list(map(int,input().split())) for _ in range(m)]\nmin2 = 1\nmax2= n\n\nfor llrr in lr:\n min2 = max(min2, llrr[0])\n max2 = min(max2, llrr[1])\n\nif max2-min2 >= 0:\n print(max2-min2+1)\nelse:\n print(0)', "#!/usr/bin/env python3\nimport sys\n\nMOD = 2019 # type: int\n\nd...
['Runtime Error', 'Accepted']
['s530273739', 's243317987']
[3060.0, 3064.0]
[17.0, 676.0]
[236, 648]
p02983
u021019433
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 >= 672:\n print(0)\nelse:\n print(min(i * j % 2019 for i in range(l, r + 1) for j in range(l, ir)))', 'l, r = map(int, input().split())\nif r - l >= 672:\n print(0)\nelse:\n print(min(i * j % 2019 for i in range(l, r + 1) for j in range(l, i)))']
['Runtime Error', 'Accepted']
['s534194822', 's930465726']
[2940.0, 2940.0]
[17.0, 37.0]
[145, 144]
p02983
u021548497
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\np, q = L%2019, R%2019\nz = R - L\n\nif (p == 0) or (q == 0) or (z > 2019) or (p >= q):\n print(0)\nelse:\n answer = []\n for i in range(z):#669\n for j in range(z-i):#669-i\n k1 = p + i#3\n k2 = j + i + 1\n X = k1 * k2 % 2019\n ...
['Wrong Answer', 'Accepted']
['s271795605', 's904515476']
[75536.0, 75416.0]
[1204.0, 1120.0]
[420, 369]
p02983
u023141436
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 = 2019\nm = []\nfor i in range(L,R+1):\n\tm.append(i%2019)\n\nfor i in range(len(m)):\n\tfor j in range(i+1,len(m)):\n\t\ttmp = (m[i]*m[j])%2019\n\t\tif ans> tmp:\n\t\t\tans = tmp\n\t\tif tmp = 0:\n\t\t\tbreak\t\t\t\t\nprint(ans)', 'L,R = map(int,input().split())\n \nans = 2019\...
['Runtime Error', 'Accepted']
['s921940144', 's909316264']
[2940.0, 3064.0]
[17.0, 505.0]
[236, 314]
p02983
u024609780
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.
['m, n = map(int, input().split(" "))\nif n - m >= 673:\n print(0)\nelse:\n score = m * n % 2019\n for i in range(n, m + 1):\n for j in range(i + 1, n + 1):\n if i * j % 2019 < score:\n score = i * j % 2019\n print(score)\n', 'm, n = map(int, input().split(" "))\nif n - m >=...
['Wrong Answer', 'Accepted']
['s170573239', 's698158763']
[9196.0, 9168.0]
[30.0, 47.0]
[256, 260]
p02983
u027406156
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)>=2019:\n print("0")\nelse:\n if (l % 2019) < (r % 2019):\n ans= l * r % 2019\n print(int(ans))\n else:\n print("0")', 'l,r=map(int,input().split())\n\nans=2018*2017\nfor i in range(l,min(r,l+2019)):\n for j in range(i+1,min(r,l+2019)+1):\n ...
['Wrong Answer', 'Accepted']
['s779614331', 's756670229']
[2940.0, 2940.0]
[18.0, 767.0]
[177, 168]
p02983
u036340997
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.
['lr = input().split()\nl = int(lr[0])\nr = int(lr[1])\n\nmini = 2020\nfor i in range(l, r+1):\n if i==0:\n print(0)\n break\n \n j = i+1\n while j>i and j<=r:\n q = (i*j)%2019\n j = j + (2018-q)//i\n mini = min(mini, q)\n \nprint(mini)\n', 'print(0)', 'lr = input().split()\nl = int(lr[0])\nr = ...
['Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Runtime Error', 'Accepted']
['s171331878', 's421369154', 's653758715', 's932464675', 's207844256']
[2940.0, 2940.0, 3060.0, 2940.0, 2940.0]
[2104.0, 18.0, 99.0, 2104.0, 59.0]
[243, 8, 213, 204, 215]
p02983
u037221289
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)\nelse:\n MIN = flaot('inf')\n for i in range(L,R):\n for j in range(i,R+1):\n MIN = min(MIN,(j-i) % 2019)\nprint(MIN)", "L,R = map(int,input().split(' '))\nif R - L >= 2019:\n print(0)\n exit()\nelse:\n MIN = float('inf')\n for i in range(...
['Runtime Error', 'Accepted']
['s502462092', 's062247771']
[3060.0, 3060.0]
[17.0, 854.0]
[184, 197]
p02983
u038024401
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)\nelse:\n modMin = 2019\n for i in range(L, R):\n for j in range(i+1, R+1):\n mod2019 = i*j%2019\n if mod2019 < modMin:\n modMin = mod2019\n print(modMin*(modMin+1))', 'L, R = map(int, input().split())\...
['Wrong Answer', 'Accepted']
['s733665302', 's298812441']
[3060.0, 3060.0]
[487.0, 532.0]
[271, 251]
p02983
u038244040
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.
['if __name__ == \'__main__\':\n l,r = list(map(int, input().split(" ")))\n res = 2019\n n = l // 2019\n if l % 2019 == 0:\n print(0)\n elif l//(n+1) <= 2019 and 2019 <= r//(n+1):\n print(0)\n else:\n for i in range(2019):\n for j in range(2019):\n if l...
['Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Accepted']
['s190478971', 's560601825', 's891753089', 's064042531']
[3060.0, 3064.0, 3060.0, 3064.0]
[1275.0, 18.0, 19.0, 1350.0]
[492, 427, 430, 498]
p02983
u039360403
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\nif R-L>=2020:\n print(0)\n exit()\nelse:\n l=[]\n for i in range(L,R+1):\n l.append(i%mod)\nans=2018\nfor i in l:\n for j in l:\n if i!=j:\n ans=min(ans,l[i]*l[j]%mod)\nprint(ans)', 'L,R=map(int,input().split())\nmod=2019\nA=L%mod\nB=R%mo...
['Runtime Error', 'Wrong Answer', 'Accepted']
['s153455526', 's530602558', 's211975657']
[3060.0, 2940.0, 3060.0]
[18.0, 17.0, 1591.0]
[245, 125, 239]
p02983
u040016087
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.
["s = input().rstrip().split(' ')\nL = int(s[0])\nR = int(s[1])\ncnt = (L*(L+1)) % 2019\n \nfor i in range(L, R):\n for r in range(i+1, R+1):\n ans = (i*r) % 2019 \n if ans < cnt:\n cnt = ans\n \tif cnt == 0:\n \t\t\tbreak\n if cnt == 0:\n break\n\nprint(cnt)", "s = input()...
['Runtime Error', 'Runtime Error', 'Accepted']
['s122355952', 's988726154', 's404800088']
[3064.0, 2940.0, 3064.0]
[17.0, 17.0, 42.0]
[284, 279, 282]
p02983
u042385277
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\nelse :\n t = []\n for i in range(L, R):\n for j in range(i + 1, R + 1) :\n list.append((i * j) % 2019)\n print(min(t))', 'L, R = map(int, input().split())\nif R - L >= 2019 :\n print(0)\nlist = []\nelse :\n for i in...
['Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted']
['s046533009', 's103405968', 's105648664', 's114825432', 's449530393', 's508963493', 's602515946', 's621930439', 's698676755', 's982290857', 's679649620']
[2940.0, 3064.0, 2940.0, 2940.0, 2940.0, 2940.0, 2940.0, 2940.0, 2940.0, 2940.0, 75380.0]
[18.0, 17.0, 17.0, 17.0, 18.0, 18.0, 17.0, 17.0, 17.0, 17.0, 626.0]
[206, 231, 209, 199, 201, 203, 228, 194, 209, 231, 204]
p02983
u042716570
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(input().split())\nif R-L > 2019:\n print(0)\nelse:\n ans = (L*(L+1))%2019\n for i in range(L,R+1):\n for j in range(i+1,R+1):\n ans = min(ans,(i%2019)*(j%2019))\n print(ans)', 'L,R = map(int, input().split())\nif R-L >= 2019:\n print(0)\nelse:\n ans = 2019\n for i in r...
['Runtime Error', 'Accepted']
['s603851713', 's334368335']
[3060.0, 2940.0]
[17.0, 786.0]
[205, 194]
p02983
u044964932
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 divisor(n):\n i = 1\n table = []\n while i * i <= n:\n if n % i == 0:\n table.append(i)\n table.append(n//i)\n i += 1\n table = list(set(table))\n return table\n\n\ndef main():\n l, r = map(int, input().split())\n print(l, r)\n if l % 2019 == 0 or r % 20...
['Wrong Answer', 'Accepted']
['s436603851', 's345254376']
[3064.0, 3064.0]
[32.0, 624.0]
[491, 496]
p02983
u046592970
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())\nmn = 2018\nif l >= 2019:\n mn = 0\nelse:\n for i in range(l,r):\n for j in range(l+1,r+1):\n mn = min(mn,i*j % 2019)\nprint(mn)', 'l,r = map(int,input().split())\nmn = 2018\nif r >= 2019:\n mn = 0\nelse:\n for i in range(l,r):\n for j in range(l+1,r...
['Wrong Answer', 'Wrong Answer', 'Accepted']
['s101748472', 's291975849', 's115371573']
[2940.0, 2940.0, 3060.0]
[2104.0, 20.0, 61.0]
[175, 175, 241]
p02983
u047197186
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(elem) for elem in input().split()]\n\nres = 0\nif (r / 2019) - (l / 2019) < 1:\n for i in range(l, r+1):\n for j in range(i+1, r+1):\n tmp = (i * j) % 2019\n if tmp < res:\n res = tmp\n elif i == l:\n res = tmp\n print(res)\nelse:...
['Wrong Answer', 'Accepted']
['s687115970', 's573675176']
[3064.0, 3188.0]
[594.0, 574.0]
[319, 323]
p02983
u047535298
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\nmodlist = [(L + i)%mod for i in range(min(2019,R-L+1))]\nprint(modlist)\nlength = len(modlist)\nans = 2019\nfor i in range(length):\n for j in range(i+1,length):\n ans = min(ans, modlist[i]*modlist[j]%mod)\n\nprint(ans)', 'L, R = map(int, input().split())\nmod =...
['Wrong Answer', 'Accepted']
['s789239572', 's817133103']
[3064.0, 3064.0]
[968.0, 901.0]
[265, 250]
p02983
u047662730
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.
['if (R - L) // 2019 > 0:\n print(0)\nelif (R - L) != (R % 2019 - L % 2019):\n print(0)\nelse:\n print(min(L * (L + 1) % 2019, R * (R - 1) % 2019, L * R % 2019))\n', 'L, R = map(int, input().split())\n\nif (R - L) // 2019 > 0:\n print(0)\nelif (R - L) != (R % 2019 - L % 2019):\n print(0)\nelse:\n answ...
['Runtime Error', 'Accepted']
['s068187840', 's681622199']
[2940.0, 3060.0]
[18.0, 490.0]
[164, 318]
p02983
u048176319
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:\n print(0)\nelse:\n l = list()\n for i in range(l, r):\n for j in range(i+1, r+1):\n l.append((i*j)%2019)\n print(min(l))', 'l, r = map(int, input().split())\n\nif r//2019 != l//2019:\n print(0)\n\nelse:\n lm = list()\n ...
['Runtime Error', 'Accepted']
['s425364513', 's151801062']
[3064.0, 75428.0]
[17.0, 590.0]
[201, 205]
p02983
u050708958
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\nfor l in range(L, min(R+1, L+2019)):\n for r in range(L, min(R+1, L+2019)):\n print(l, r)\n if l < r:\n ans = min([ans, (l*r)%2019])\nprint(ans)\n', 'L, R = map(int, input().split())\nans = 2019\nfor l in range(L, min(R+1, L+2019)):\n for r ...
['Wrong Answer', 'Accepted']
['s506495421', 's556369032']
[33524.0, 2940.0]
[2104.0, 1172.0]
[212, 192]
p02983
u054825571
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\nif R%mod >= L%mod or R-L >= mod:\n print(0)\nelse:\n a=mod\n for i in range(L%mod,R%mod):\n if j in range(i+1,R%mod+1):\n a=min((i*j)%mod,a)\n print(a)', 'L,R=map(int,input().split())\nmod=2019\nif L%mod >= R%mod or R-L >= mod:\n print(0)\nelse:\n a=mod\n for i i...
['Wrong Answer', 'Accepted']
['s665492813', 's372641556']
[9116.0, 9128.0]
[29.0, 544.0]
[194, 195]
p02983
u055941944
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())\na=[]\n\nfor i in range(L, R):\n\tfor j in range(i+1,R+1):\n\t\tx = (i*j)%2019\n\t\tif x == 0:\n\t\t\tprint(0)\n\t\t\tsys.exit()\n\t\telse:\n\t\t\ta.append()\n\nprint(min(a))', 'import sys\nL, R = map(int,input().split())\na=[]\n\nfor i in range(L, R):\n\tfor j in range(i+1...
['Runtime Error', 'Accepted']
['s431475234', 's750519190']
[3060.0, 6888.0]
[17.0, 68.0]
[189, 184]
p02983
u056358163
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\nans = 2018\nfor i in range(L, R):\n for j in range(i, R+1):\n ans = min(ans, (i * j) % 2019)\n if ans == 0:\n print(ans)\n exit()\n\nprint(ans)', 'L, R = map(int, input().split())\n\nans = 0\nif R - L < 2019:\n l = L % 2019\n r = R %...
['Wrong Answer', 'Wrong Answer', 'Accepted']
['s393718763', 's454005280', 's021161698']
[3060.0, 2940.0, 3060.0]
[60.0, 17.0, 64.0]
[396, 278, 398]
p02983
u057415180
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\nfor i in range(l, r):\n for i in range(l+1, r+1):\n tmp = i*j % 2019\n if ans > tmp:\n ans = tmp \n if ans == 0:\n print(ans)\n exit(0)\nprint(ans)', 'l, r = map(int, input().split())\nans = 2019\nfor i in range(l, r):\n ...
['Runtime Error', 'Accepted']
['s097188746', 's011210615']
[2940.0, 3060.0]
[17.0, 48.0]
[232, 239]
p02983
u057993957
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 = list(map(int, input().split()))\ndata = np.array([x for x in range(L, R+1)]) % 2019\n\nif np.where(data == 0):\n print(0)\n\nelse: \n data = np.sort(data)\n min_mod = (data[0] * data[1]) % 2019\n print(min_mod)', 'l, r = list(map(int,input().split()))\n\nif r - l >= 2019:\n ...
['Wrong Answer', 'Wrong Answer', 'Accepted']
['s500075850', 's932927114', 's922421449']
[2030820.0, 3060.0, 3060.0]
[2230.0, 1263.0, 683.0]
[241, 279, 280]
p02983
u060793972
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 f(l,r):\n p=2019\n for i in range(l,r+1):\n for j in range(l,r+1):\n p=min((i*j)%2019,p)\n return p\n \nl,r=map(int,input().split())\nprint(0 if r//2019-(l-1)//2019!=0 or (r//673-(l-1)//673!=0 and r//3-(l-1)//3!=0) else f(l,r))', 'def f(l,r):\n p=2019\n for i in range(l,r+1):\n...
['Wrong Answer', 'Accepted']
['s574686886', 's933465477']
[9196.0, 9192.0]
[74.0, 1167.0]
[253, 252]
p02983
u062706707
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+678)\nans = 2018\n\nfor i in range(l,r+1):\n for j in range(i+1,r+1):\n ans = min(i*j%678,ans)\nprint(ans)', 'l,r = map(int,input().split())\nr = min(r,l+678)\nans = 2018\n\nfor i in range(l,r+1):\n for j in range(i+1,r+1):\n ans = min(i*j%2019,ans)\npri...
['Wrong Answer', 'Accepted']
['s398849469', 's252033291']
[3060.0, 2940.0]
[99.0, 100.0]
[153, 154]
p02983
u067694718
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()]\nif r - l >= 2018:\n print(0)\n exit()\n\nmn = 2019\nfor i in range(l, r + 1):\n for j in range(l, r + 1):\n t = (i * j) % 2019\n mn = min(mn, t)\n\nprint(mn)\n', 'l, r = [int(i) for i in input().split()]\nif r - l >= 2018:\n print(0)\n exit()\n\nm...
['Wrong Answer', 'Accepted']
['s707520958', 's976639499']
[2940.0, 2940.0]
[1657.0, 1159.0]
[212, 242]
p02983
u067986021
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\nN = 2019\n\n\nans = 2019\n\nfor i in range(L, R):\n for j in range(i + 1, R + 1):\n mod = (i * j) % N\n if ans > mod:\n ans = mod\n if ans = 0:\n print(ans)\n exit(0)\n\nprint(ans)", "L, R = map(int, input().split(' '))\n\...
['Runtime Error', 'Accepted']
['s735252096', 's245779138']
[2940.0, 3060.0]
[17.0, 49.0]
[260, 261]
p02983
u071970578
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\n\n\n\n\ndef get_ans():\n \n if R - L >= 2018:\n return 0\n\n \n mods = np.mod(np.arange(L, R + 1), 2019)\n u_mods = np.unique(mods)\n\n length = len(u_mods)\n \n ans = 2019\n \n for X in range(length - 1):\n r = min(...
['Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Runtime Error', 'Accepted']
['s670890826', 's677517585', 's695635396', 's771098917', 's766723900']
[13492.0, 3060.0, 809104.0, 1354780.0, 3060.0]
[2109.0, 17.0, 2156.0, 2112.0, 53.0]
[837, 694, 525, 767, 507]
p02983
u075628913
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\nL, R = list(map(int, input().split()))\n\nmin_val = 2019\nfor i in range(L, R):\n for j in range(i+1, R+1):\n val = (i*j)%2019\n if min_val > val:\n if min == 0:\n break\nprint(min_val)', 'import numpy as np\nL, R = list(map(int, input().split()))\n\nmin_val = 2019\nfor i in ran...
['Wrong Answer', 'Accepted']
['s138221482', 's138355154']
[14424.0, 12420.0]
[2108.0, 171.0]
[214, 267]
p02983
u084357428
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=2018\nfor i in range(l,r):\n\tfor j in range(i+1,r+1):\n \tif i*j%2019<ans:\n \tans=i*j%2019\n elif i*j%2019==ans:\n \tprint(ans)\n exit()\nprint(ans)', 'l,r=map(int,input().split())\nans=2018\nfor i in range(l,r):\n for j in range(i+1,r+1):\n ...
['Runtime Error', 'Accepted']
['s323957285', 's549013405']
[2940.0, 2940.0]
[17.0, 21.0]
[206, 218]
p02983
u089711240
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=L%2019\nmin_mod = 2019\nflg=[0]*2019\nflg2=[0]*2019\nfor i in range(L,R):\n idx=i%2019\n if flg[idx]==0:\n for j in range(i+1,R+1):\n mod = (i*j)%2019\n if flg2[mod]==1:\n break\n flg2[mod]=1\n if min_mod > mo...
['Wrong Answer', 'Accepted']
['s891097840', 's905363146']
[3064.0, 3064.0]
[2104.0, 20.0]
[369, 394]
p02983
u090266528
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()))\nm = R//2019\nif R-L>=2019 or (m*2019<=R and m*2019>=L):\n print(0)\nelse:\n l = L%2019\n print((l*(l+1))//2019)', "L, R = list(map(int, input().split()))\nm = R//2019\nif R-L>=2019 or (m*2019<=R and m*2019>=L):\n print(0)\nelse:\n l = L%2019\n r = R%2019\n min_c = 2019\n...
['Wrong Answer', 'Wrong Answer', 'Accepted']
['s829898348', 's993049778', 's160482145']
[2940.0, 16980.0, 3060.0]
[17.0, 2104.0, 592.0]
[148, 332, 291]
p02983
u095021077
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.
['temp=input().split()\nL=int(temp[0])\nR=int(temp[1])\n\nprint(min([(i*j)%2019 for i in range(L, R) for j in range(i, R+1)]))', 'temp=input().split()\nL=int(temp[0])\nR=int(temp[1])\n\nprint(min([(i*j)%2019 for i in range(L, R-1) for j in range(i, R)]))', 'temp=input().split()\nL=int(temp[0])\nR=int(temp[1])\n\nprint(...
['Wrong Answer', 'Runtime Error', 'Runtime Error', 'Accepted']
['s259791420', 's475169372', 's896683022', 's782429494']
[580248.0, 578072.0, 578584.0, 2940.0]
[2139.0, 2141.0, 2139.0, 735.0]
[120, 120, 120, 188]
p02983
u097317219
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 = float("inf")\nif (r-l)>=2019:\n print("0")\nelse:\n l %= 2019\n r %= 2019\n for i in range(l,r+1):\n for j in range(i,r+1):\n a = min(a,i*j%2019)\nprint(a)', 'l,r = map(int,input().split())\na = float("inf")\nif (r-l)>=2019:\n print(0)\nelse:\n for i in range(l,r+1):\...
['Wrong Answer', 'Wrong Answer', 'Accepted']
['s038487815', 's394297645', 's327280687']
[2940.0, 3060.0, 3064.0]
[682.0, 19.0, 1141.0]
[193, 199, 299]
p02983
u098982053
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(" "))\nw = R-L\n\n\nif w>2019:\n print(0)\nelse:\n List = [int(i) for i in range(L,R+1)]\n print(List)\n Min = 2018\n for i in range(len(List)-1):\n for j in range(i+1,len(List)):\n l = (List[j]*List[i])%2019\n if l<Min:\n Min = l...
['Wrong Answer', 'Accepted']
['s025965548', 's045825765']
[3064.0, 3064.0]
[695.0, 646.0]
[319, 303]
p02983
u102242691
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.
['\nL,R = map(int,input().split())\nif R-L >= 2019:\n print(a)\nelse:\n ans = []\n for i in range(L,R):\n ans.append(i*j*2019)\n print(min(ans))\n\n ', '\nL,R = map(int,input().split())\nif R-L >= 2019:\n print(0)\nelse:\n ans = []\n for i in range(L,R):\n ans.append(i*j*2019)\n ...
['Runtime Error', 'Runtime Error', 'Wrong Answer', 'Accepted']
['s106794573', 's513199926', 's701643951', 's071778370']
[2940.0, 2940.0, 195992.0, 149456.0]
[18.0, 18.0, 1111.0, 1199.0]
[159, 154, 191, 178]
p02983
u102275718
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\nl %= 2019\nr = r+(r-l)%2019\n\nif l>=r:\n r += 2019\n\nmin = 2020\nfor i in range(l, r):\n for j in range(i+1, r+1):\n if (i*j)%2019 < min:\n min = (i*j)%2019\n\nprint(min)\n\n', 'l, r = map(int, input().split())\n\nif (r-l)>=2019:\n print(0)\nelse:\n ...
['Wrong Answer', 'Accepted']
['s154079159', 's150790120']
[2940.0, 3064.0]
[2104.0, 323.0]
[220, 282]
p02983
u103902792
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.
['n = int(input())\nD = list(map(int,input().split()))\n\nD.sort()\nprint(D[n//2] -D[n//2-1])\n\n', "l,r = map(int,input().split())\n\ncand = []\nfor i in range(l,r+1):\n cand.append(i%2019)\n if len(cand) == 2020*2:\n break\n \nans = float('inf')\nfor i in range(len(cand)):\n for j in range(len(cand)):\n i...
['Runtime Error', 'Accepted']
['s942349158', 's512043149']
[2940.0, 3064.0]
[17.0, 126.0]
[89, 341]
p02983
u105302073
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(input()) for i in input().split()]\ndiff = R - L\nans = 2019\nif diff == 1:\n x = (L * (L + 1)) % 2019\n print(min(x, ans))\nelse:\n for i in range(diff):\n for j in range(i + 1, diff):\n x = ((L + i) * (L + j)) % 2019\n ans = min(x, ans)\n if x == 0:\n ...
['Runtime Error', 'Wrong Answer', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted']
['s676650594', 's791674974', 's871416671', 's886967365', 's948514846', 's504992460']
[3060.0, 3060.0, 3060.0, 3060.0, 3060.0, 3060.0]
[17.0, 1585.0, 17.0, 17.0, 18.0, 1347.0]
[339, 356, 328, 319, 319, 254]
p02983
u106103668
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 = 10**10\nfor i in range(L,min(R,L+2019):\n for j in range(i+1,min(R,L+2019)+1):\n a = min(a,(i*j)%2019)\n if a == 1:\n print("1")\n exit()\nprint(a)', 'L, R = map(int,input().split())\na = 10**10\nfor i in range(L,min(R,L+2019)+1):\n for j ...
['Runtime Error', 'Accepted']
['s641514671', 's206727589']
[2940.0, 2940.0]
[17.0, 737.0]
[215, 157]
p02983
u111949210
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.
['n, r = map(int, input().split())\nif r - n >= 2019:\n print(0)\n sys.exit(0)\nmin = 2019\n#nM = n % 2019\n#rM = r % 2019\nfor i in range(n, r+1):\n for j in range(i+1, r+1):\n min = min((i*j)%2019, min)\nprint(min)', 'import sys\nn, r = map(int, input().split())\nif r-n >= 2019:\n print(0)\n sys.exit(0)\nmini...
['Runtime Error', 'Accepted']
['s592690430', 's498359953']
[3060.0, 3060.0]
[17.0, 737.0]
[210, 223]
p02983
u113750443
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 nyu():\n L,R = map(int,input().split())\n return L,R\n\n\ndef convert(LL,LR):\n LL = LL % 2019\n LR = LR % 2019\n\n return LL,LR\n\ndef kansu(LL,LR):\n\n ans = 2020\n\n for ll in range(LL,LR):\n for lr in range(ll+1,LR+1):\n print(lr)\n tmp = (ll * lr) % 2019\n ...
['Wrong Answer', 'Wrong Answer', 'Accepted']
['s217674600', 's820479761', 's625121931']
[33916.0, 19264.0, 3060.0]
[2104.0, 2104.0, 37.0]
[417, 424, 546]
p02983
u113971909
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())\nfrom itertools import permutations, combinations,combinations_with_replacement,product\nfor \nif (R+1-L)<2019:\n LR = range(L,R+1)\n LRA = []\n for i in LR:\n LRA.append(i%2019)\n LRAA = set(LRA)\n C = combinations(LRAA, 2)\n Ret = 2019\n for i in list(C):\n Ret = min(Ret,(...
['Runtime Error', 'Accepted']
['s234864488', 's750090114']
[2940.0, 148408.0]
[17.0, 938.0]
[349, 345]
p02983
u114648678
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=l%2019\nR=r%2019\nans=2019\nif l+2019<=r:\n print(0)\nelif L>R:\n print(0)\nelse:\n for i in range(L,R+1):\n for j in range(i+1,R+!):\n ans=min(ans,(i*j)%2019)\n print(ans)', 'l,r=map(int,input().split())\nL=l%2019\nR=r%...
['Runtime Error', 'Accepted']
['s418582953', 's833901972']
[2940.0, 3064.0]
[17.0, 707.0]
[258, 256]
p02983
u116038906
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\ninput = sys.stdin.readline\nL,R = (int(x) for x in input().split())\n\nmod_L =L %2019\nmod_R =R %2019\nans =0\nif 2018 <= R -L:\n ans =0\nelif mod_R < mod_L:\n ans =0\nelif:\n mod_L==0 :\n ans =0\nelse:\n ans =mod_L *(mod_L +1)\nprint(ans)', '\nimport sys\ninput = sys.stdin.readline\nL,R ...
['Runtime Error', 'Accepted']
['s440670565', 's134512793']
[2940.0, 75432.0]
[17.0, 627.0]
[265, 364]
p02983
u116233709
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=[]\nif r-l>=2018:\n print(0)\nelse:\n for i in range(0,r-l+1):\n a.append((l+i)%2019)\n \n a=sorted(a)\n print(a[0]*a[1])\n ', 'l,r=map(int,input().split())\na=[]\nb=[]\nif r-l>=2018:\n print(0)\nelse:\n for i in range(0,r-l+1):\n a.append((l+i)%2019)\n \n for j in ra...
['Runtime Error', 'Accepted']
['s148000243', 's466252149']
[2940.0, 75440.0]
[17.0, 668.0]
[157, 246]
p02983
u118211443
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 = []\n\nif r - l + 1 >= 2019:\n print(0)\n exit(0)\n\nelse:\n for i in range(r - l + 1):\n a.append((l + i) % 2019)\n\nprint(a)\na.sort()\nprint(a[0] * a[1])', 'l, r = map(int, input().split())\na = []\n\ndata = 2019\n\nif r - l + 1 >= 2019:\n print(0)\n exit(...
['Wrong Answer', 'Accepted']
['s455331987', 's498587447']
[3060.0, 2940.0]
[18.0, 753.0]
[196, 229]
p02983
u124498235
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 >= 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)', 'l, r = map(int, input().split())\nif r-l >2019:\n\tl = r-2019\ns = 10**9\nfor i in range(l,r+1):\n\tfor j in range(i+1,r+1):\n\t\ts = min(s,i...
['Runtime Error', 'Accepted']
['s569301804', 's487493562']
[2940.0, 2940.0]
[18.0, 794.0]
[157, 150]
p02983
u124589361
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 numpy as np\nimport math\nimport copy\nimport re\nimport sys\n#sys.exit(0)\n\ninf = float("inf")\n\ndef check_print(check_flag, text, end="\\n"):\n if check_flag:\n print(text, end=end)\n\ndef c2i(x):\n if str.isdecimal(x):\n return int(x)\n else:\n ...
['Runtime Error', 'Accepted']
['s826744217', 's569463128']
[51996.0, 75392.0]
[2268.0, 433.0]
[2811, 357]
p02983
u128539234
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 = 99999999\nfor i in range(l,r):\n if min == 0:\n break\n for j in range(i+1,r+1):\n value = (i*j)%2019\n print(value)\n if min > value:\n min = value\n if min == 0:\n break\nprint(min)', 'l,r = map(int,input().split())\n\nmin = 99999999\nfor i in ran...
['Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Accepted']
['s311830596', 's826347237', 's947506869', 's739388450']
[3792.0, 9776.0, 14420.0, 3060.0]
[104.0, 2104.0, 2103.0, 478.0]
[239, 212, 210, 259]
p02983
u130900604
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.
['MOD=2019\n\nl,r=map(int,input().split()) #l<=i<i+1<=j<=r\nres=2020\nl=l%MOD\nr=r%MOD\nl,r=min(l,r),max(l,r)\n\nfor i in range(l,r+1):\n for j in range(i,r+1):\n res =min((i*j)%MOD,res)\nprint(res)\n\n\n', 'print(0)', 'l,r=map(int,input().split())\nans=10**15\nfor i in range(l,min(r,l+2100)):\n for j in range(i+1...
['Wrong Answer', 'Wrong Answer', 'Accepted']
['s446753777', 's644881226', 's900883065']
[3188.0, 2940.0, 2940.0]
[662.0, 17.0, 815.0]
[192, 8, 156]
p02983
u130927217
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=2019\nfor i in range(L,R+1):\n for k in range(i+1,R+1):\n mod=(i*k)%2019\n if mod==0:\n min=0\n break\n if mod<min:\n min=mod\n else:\n continue\n \tbreak\nprint(min)\n', 'L,R=map(int,input().split())\nmin=...
['Runtime Error', 'Accepted']
['s609124043', 's349834755']
[2940.0, 2940.0]
[17.0, 44.0]
[265, 256]
p02983
u131625544
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\nif (R - L) <= 2019:\n temp1 = float("inf")\n for i in range(R - L):\n if (R-i-1) < L:\n break\n temp2 = (R * (R - i - 1)) % 2019\n if temp2 < temp1:\n temp1 = temp2\n print(temp1)\nelse:\n temp1 = float("inf")\n for ...
['Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Accepted']
['s057437630', 's504735779', 's887604811', 's941901817', 's579769495']
[3064.0, 2940.0, 2940.0, 2940.0, 3064.0]
[18.0, 17.0, 17.0, 18.0, 1508.0]
[474, 78, 117, 155, 526]
p02983
u134302690
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\n\nL, R = map(int, input().split())\nmod = 2019\nans = []\nif R-L >= 2019:\n print(0)\n sys.exit()\nelif R-L < 2019:\n for i in range(L, R + 1):\n for j in range(L, R + 1):\n tmp = (i * j) % mod\n if tmp == 0:\n print(0)\n sys.exit()\n ...
['Wrong Answer', 'Accepted']
['s205384644', 's387073805']
[10632.0, 75428.0]
[92.0, 673.0]
[343, 270]
p02983
u134856634
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.
['# -*- coding: utf-8 -*-\nimport sys;\nimport string;\nsys.setrecursionlimit(20000) \n\nimport copy\nimport math\nimport itertools\n\nfrom functools import lru_cache\n#@lru_cache(maxsize = None)\n\nPPP = 1000000007\n\n\n#n = int(input())\n\n\n#a = [int(x) for x in input().split()]\nl, r = map(int, input().split())\n#p...
['Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Accepted']
['s165721943', 's302282380', 's411001937', 's413236435', 's922753903']
[5528.0, 5404.0, 5524.0, 3060.0, 3060.0]
[40.0, 41.0, 2104.0, 18.0, 45.0]
[1564, 1587, 1527, 378, 409]
p02983
u135116520
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 (L-R)>=2018:\n print(0)\nelse:\n ans=2019\n for i in range(L,R):\n for j in range(i+1,R+1):\n ans=min(ans,I*j//2019)\nprint(ans)\n ', 'L,R=map(int,input().split())\nif (R-L)>=2018:\n print(0)\nelse:\n ans=2019\n for i in range(L,R):\n for j in range(i+1,R+1):\n ...
['Runtime Error', 'Runtime Error', 'Accepted']
['s509203755', 's951368214', 's998794766']
[2940.0, 2940.0, 2940.0]
[17.0, 17.0, 796.0]
[167, 167, 167]
p02983
u135847648
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\nl,r = map(int,input().split())\nMOD= 2019\nans = 10**10\nif r-l+1 >= MOD:\n print(0)\nelse:\n i = l % MOD\n j = r % MOD\n for x in range(i+1,j):\n for y in range(x+1,j):\n ans = min((x*y)%MOD,ans)\n print(ans) \n \n', 'import numpy as np\nl,r = map(int,input().split())\nMO...
['Wrong Answer', 'Wrong Answer', 'Accepted']
['s262187128', 's275393183', 's201629423']
[21132.0, 12508.0, 3060.0]
[826.0, 151.0, 102.0]
[245, 211, 228]
p02983
u136090046
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-1)*r < 2019:\n print(l*(l+1))\nelif r >= 2019:\n print(0)\nelse:\n print(2)\n', 'l, r = map(int, input().split())\ndiff = r-l\nif diff >= 2019:\n print(0)\n exit()\nres = float("inf")\nfor i in range(l, r+1):\n for j in range(i, r+1):\n if i == j:\n ...
['Wrong Answer', 'Accepted']
['s271614065', 's255956003']
[2940.0, 2940.0]
[17.0, 892.0]
[119, 243]
p02983
u137667583
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()\n\nlow = 2*1e+200\n\nfor i in range(l,r-1):\n for j in range(i+1,r):\n if(((i%2019)*(j%2019))%2019<low):\n low = ((i%2019)*(j%2019))%2019\n\nif(l*(l-1)%2019<low):\n low = l*(l-1)\nprint(low)', 'l,r = map(int,input().split...
['Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Accepted']
['s091603746', 's180137340', 's272767948', 's578102635']
[3064.0, 3064.0, 3060.0, 2940.0]
[613.0, 439.0, 414.0, 444.0]
[273, 250, 248, 192]
p02983
u141633765
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=int(input())\nR=int(input())\n\nif R - L >= 672:\n ans = 0\nelif R * L < 2019:\n ans = L*(L+1)\nelse:\n ans = 2018\n for i in range(L, R):\n for j in range(L+1, R+1):\n mod=(i*j)%2019\n if mod < ans:\n ans = mod\nprint(ans)\n ', 'L, R = list(map(int, input(...
['Runtime Error', 'Accepted']
['s129904371', 's565535134']
[3060.0, 3064.0]
[17.0, 69.0]
[272, 279]
p02983
u143612492
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())\nm=r\nfor i in range(l,r+1):\n for j in range(l,r+1):\n m=min(m,(i*j)%2019)\n if m==0:\n print(m)\n exit()\nprint(m)', 'l,r=map(int,input().split())\nm=r\nfor i in range(l,r+1):\n for j in range(1+1,r+1):\n m=min(m,(i*j)%2019)\n if m==0:\n print(m)\n exit...
['Wrong Answer', 'Wrong Answer', 'Accepted']
['s604919644', 's818413407', 's393537202']
[2940.0, 2940.0, 2940.0]
[100.0, 18.0, 58.0]
[154, 156, 164]
p02983
u145145077
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\nsho_l = l // 2019\nsho_r = r // 2019\n\nif sho_r-sho_l >= 1:\n print(0)\nelse:\n ans = 2018\n for i in range(l,r):\n for j in range(i,r+1):\n ans = min((i*j)%2019,ans)\n print(ans)\n', 'l,r=map(int,input().split())\n\nsho_l = l // 2019\nsho_r = r // 2019\n\nif sho_r-sho_l >...
['Wrong Answer', 'Accepted']
['s476444816', 's144599883']
[9176.0, 9196.0]
[675.0, 71.0]
[213, 301]
p02983
u149991748
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 = L%MOD\nR = R%MOD\nif L > R:\n L, R = R, L\n\nMIN = 2018\nif L == R:\n MIN = 0\nfor i in range(L, R):\n for j in range(i+1, R+1):\n buf = (i*j) % MOD\n print(i, j)\n MIN = min(buf, MIN)\n\nprint(MIN)', 'L, R = map(int, input().split())\n...
['Wrong Answer', 'Runtime Error', 'Accepted']
['s659210590', 's924890775', 's020421743']
[14912.0, 2940.0, 3064.0]
[2104.0, 17.0, 761.0]
[263, 299, 296]
p02983
u150787983
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\nif R - L >= 2019:\n print(0)\nelse:\n L = L % 2019\n R = R % 2019\n \n if L >R:\n print(0)\n else:\n mi = (L*(L+1)) %2019\n for i in range(L, R):\n for j in range(i+1, R+1):\n print(i, j)\n tmp...
['Wrong Answer', 'Accepted']
['s057796119', 's331655028']
[18004.0, 3064.0]
[2104.0, 378.0]
[415, 387]