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 |
|---|---|---|---|---|---|---|---|---|---|---|
p02981 | u935424675 | 2,000 | 1,048,576 | N of us are going on a trip, by train or taxi. The train will cost each of us A yen (the currency of Japan). The taxi will cost us a total of B yen. How much is our minimum total travel expense? | ['import sys\nl,r=map(int,sys.stdin.readline().split())\nr_m=r%2019\nl_m=l%2019\nmin=2019\nif r-l>2019-r_m:\n print(0)\nelse:\n retu=range(l_m,r_m+1)\n\n for i in range(len(retu)):\n for j in range(i+1,len(retu)):\n s=retu[i]*retu[j]%2019\n if s<min:\n min=s\nprint(m... | ['Runtime Error', 'Wrong Answer', 'Accepted'] | ['s308515849', 's710983938', 's324591409'] | [3060.0, 2940.0, 2940.0] | [17.0, 19.0, 17.0] | [307, 73, 72] |
p02981 | u935522051 | 2,000 | 1,048,576 | N of us are going on a trip, by train or taxi. The train will cost each of us A yen (the currency of Japan). The taxi will cost us a total of B yen. How much is our minimum total travel expense? | ['n,a,b = map(int,input().split())\t\nif n*a=<b:\n print(int(n*a))\nelse:\n print(b)', 'n,a,b = map(int,input().split())\t\nif n*a<=b:\n print(int(n*a))\nelse:\n print(b)\n '] | ['Runtime Error', 'Accepted'] | ['s870227525', 's527888456'] | [2940.0, 2940.0] | [17.0, 17.0] | [79, 82] |
p02981 | u937706062 | 2,000 | 1,048,576 | N of us are going on a trip, by train or taxi. The train will cost each of us A yen (the currency of Japan). The taxi will cost us a total of B yen. How much is our minimum total travel expense? | ['N, A, B = map(int, input().split())\nif A * N > B:\n\tprint(A * N)\nelse:\n\tprint(B)', 'N, A, B = map(int, input().split())\nif A * N > B:\n\tprint(B)\nelse:\n\tprint(A * N)'] | ['Wrong Answer', 'Accepted'] | ['s082714722', 's539402322'] | [2940.0, 2940.0] | [17.0, 17.0] | [79, 79] |
p02981 | u942051624 | 2,000 | 1,048,576 | N of us are going on a trip, by train or taxi. The train will cost each of us A yen (the currency of Japan). The taxi will cost us a total of B yen. How much is our minimum total travel expense? | ['n,a,b=map(int,input().split())\nprint(max(a*n,b))', 'n,a,b=map(int,input().split())\nprint(min(n*a,b))'] | ['Wrong Answer', 'Accepted'] | ['s838211102', 's543702719'] | [9056.0, 9092.0] | [33.0, 27.0] | [48, 48] |
p02981 | u944015274 | 2,000 | 1,048,576 | N of us are going on a trip, by train or taxi. The train will cost each of us A yen (the currency of Japan). The taxi will cost us a total of B yen. How much is our minimum total travel expense? | ['n, a, b = map(input().split())\nprint(min(n*a, b))', 'n, a, b = map(int, input().split())\nprint(min(n*a, b))\n'] | ['Runtime Error', 'Accepted'] | ['s946079023', 's170790940'] | [2940.0, 2940.0] | [17.0, 17.0] | [49, 55] |
p02981 | u944404180 | 2,000 | 1,048,576 | N of us are going on a trip, by train or taxi. The train will cost each of us A yen (the currency of Japan). The taxi will cost us a total of B yen. How much is our minimum total travel expense? | ['N,A,B = map(int,input().split)\nkake = N*A\n\nprint(min(kake,B))', 'N,A,B = map(int,input().split())\nkake = N*A\n\nprint(min(kake,B))'] | ['Runtime Error', 'Accepted'] | ['s709559605', 's639776155'] | [2940.0, 2940.0] | [17.0, 17.0] | [61, 63] |
p02981 | u946969297 | 2,000 | 1,048,576 | N of us are going on a trip, by train or taxi. The train will cost each of us A yen (the currency of Japan). The taxi will cost us a total of B yen. How much is our minimum total travel expense? | ['[n,a,b]=list(map(int,input().split()))\n\nprint(n*a+b)\n', '[n,a,b]=list(map(int,input().split()))\n\nprint(min(n*a,b))\n'] | ['Wrong Answer', 'Accepted'] | ['s913831964', 's154292613'] | [2940.0, 2940.0] | [17.0, 17.0] | [53, 58] |
p02981 | u947327691 | 2,000 | 1,048,576 | N of us are going on a trip, by train or taxi. The train will cost each of us A yen (the currency of Japan). The taxi will cost us a total of B yen. How much is our minimum total travel expense? | ['n,a,b=map(int,input().split())\n\nc=n*a\n\nif c > b:\n print(c)\nelse:\n print(b)', 'n,a,b=map(int,input().split())\n\nc=n*a\n\nprint(min(b,c))'] | ['Wrong Answer', 'Accepted'] | ['s511114127', 's809710548'] | [3064.0, 3064.0] | [17.0, 17.0] | [80, 54] |
p02981 | u949981986 | 2,000 | 1,048,576 | N of us are going on a trip, by train or taxi. The train will cost each of us A yen (the currency of Japan). The taxi will cost us a total of B yen. How much is our minimum total travel expense? | ['N = int(input())\nA = list(map(int, input().split()))\n\n\n\n\n\n\n\n\n\n# x = A3 - (A2 - (A1 - x))\n# x = A3 - A2 + A1 - x\n# 2x = A3 - A2 + A1\nsummary = 0\n\nfor i in range(N):\n if i % 2 == 0:\n summary += A[i]\n else:\n summary -= A[i]\n\nfor i in range(N):\n print(summary)\n summary = ... | ['Runtime Error', 'Accepted'] | ['s470937273', 's914718324'] | [3060.0, 2940.0] | [17.0, 18.0] | [575, 75] |
p02981 | u953379577 | 2,000 | 1,048,576 | N of us are going on a trip, by train or taxi. The train will cost each of us A yen (the currency of Japan). The taxi will cost us a total of B yen. How much is our minimum total travel expense? | ['n ,a , b = map(int,input(),split())\nt = n*a\nif t>b:\n print(b)\nelse:\n print(t)', 'n , a , b = map(int,input().split())\nt = n*a\nif t>b:\n print(b)\nelse:\n print(t)'] | ['Runtime Error', 'Accepted'] | ['s934353069', 's965588993'] | [2940.0, 2940.0] | [18.0, 17.0] | [83, 84] |
p02981 | u953486781 | 2,000 | 1,048,576 | N of us are going on a trip, by train or taxi. The train will cost each of us A yen (the currency of Japan). The taxi will cost us a total of B yen. How much is our minimum total travel expense? | ['n, a, b = map(int, input().split())\nif n * a <= b:\n print(a)\nelse:\n print(b)', 'i = list(map(int, input().split()))\n\nif i[0] * i[1] <= i[2]:\n print(i[0] * i[1])\nelse:\n print(i[2])'] | ['Wrong Answer', 'Accepted'] | ['s208995778', 's078799049'] | [2940.0, 2940.0] | [17.0, 17.0] | [82, 105] |
p02981 | u956941456 | 2,000 | 1,048,576 | N of us are going on a trip, by train or taxi. The train will cost each of us A yen (the currency of Japan). The taxi will cost us a total of B yen. How much is our minimum total travel expense? | ['N=(input())\nA=(input())\nB=(input())\n\na=N*A\nb=B\nif N*A<=B:\n\tprint(a)\nelse:\n\tprint(b)', 'N,A,B=(int(i) for i in input().split())\n\na=N*A\nb=B\n\nif a<=b:\n print(a)\nelse:\n print(b)'] | ['Runtime Error', 'Accepted'] | ['s808419830', 's842440840'] | [2940.0, 2940.0] | [18.0, 18.0] | [83, 88] |
p02981 | u960227987 | 2,000 | 1,048,576 | N of us are going on a trip, by train or taxi. The train will cost each of us A yen (the currency of Japan). The taxi will cost us a total of B yen. How much is our minimum total travel expense? | ['N,A,B=mnap(int,input().split())\n\nC=A*N\nif C<B:\n print(B)\nelif C>B:\n print(C)', 'N,A,B=map(int,input().split())\n\nC=A*N\nif C<=B:\n print(C)\nelif C>B:\n print(B)'] | ['Runtime Error', 'Accepted'] | ['s399286762', 's364653268'] | [2940.0, 2940.0] | [17.0, 17.0] | [78, 78] |
p02981 | u960570220 | 2,000 | 1,048,576 | N of us are going on a trip, by train or taxi. The train will cost each of us A yen (the currency of Japan). The taxi will cost us a total of B yen. How much is our minimum total travel expense? | ['A, B, N = map(int, input().split())\n\nif A * N > B:\n print(B)\nelse:\n print(A * N)', 'A, B, N = map(int, input().split())\n\ntotal_price = A + (N * B)\n\nprint(total_price - max(total_price))\n', 'N, A, B = map(int, input().split())\n\n\nif N * A > B:\n print(B)\nelse:\n print(N * A)'] | ['Wrong Answer', 'Runtime Error', 'Accepted'] | ['s612656470', 's985942585', 's904690112'] | [9104.0, 9100.0, 9064.0] | [28.0, 20.0, 27.0] | [86, 102, 126] |
p02981 | u969848070 | 2,000 | 1,048,576 | N of us are going on a trip, by train or taxi. The train will cost each of us A yen (the currency of Japan). The taxi will cost us a total of B yen. How much is our minimum total travel expense? | ['a, b , c = map(input().split())\nprint(min(a*b, c))', 'a, b , c = map(int, input().split())\nprint(min(a*b, c))'] | ['Runtime Error', 'Accepted'] | ['s206741466', 's668853487'] | [2940.0, 2940.0] | [17.0, 18.0] | [50, 55] |
p02981 | u970082363 | 2,000 | 1,048,576 | N of us are going on a trip, by train or taxi. The train will cost each of us A yen (the currency of Japan). The taxi will cost us a total of B yen. How much is our minimum total travel expense? | ['L,R =(int(x) for x in input().split())\nif(L<2019<R):\n print(1)\nelif(L<=3 and R>=673):\n print(0)\nelse:\n if((L%2019)^2 < (R%2019)^2):\n if(((L+1)%2019)^2 < (R%2019)^2):\n print((L*(L+1))%2019)\n else:\n print((L*R)%2019)\n else:\n if((L%2019)^2 < ((R-1)%2019)... | ['Runtime Error', 'Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s057295992', 's057924095', 's526584624', 's300203214'] | [3064.0, 2940.0, 2940.0, 2940.0] | [19.0, 17.0, 17.0, 17.0] | [389, 94, 94, 94] |
p02981 | u970197315 | 2,000 | 1,048,576 | N of us are going on a trip, by train or taxi. The train will cost each of us A yen (the currency of Japan). The taxi will cost us a total of B yen. How much is our minimum total travel expense? | ['# -*- coding: utf-8 -*-\nN = int(input())\nA,B = map(int,input().split())\ntrain = N*A\ncab = B\nresult = train - cab\n\nif result >= 0:\n print(cab)\nelse:\n print(train)', 'n,a,b=map(int,input().split())\ntrain=a*n\ntaxi=b\nprint(min(train,taxi))'] | ['Runtime Error', 'Accepted'] | ['s837098589', 's709396710'] | [3060.0, 2940.0] | [18.0, 17.0] | [167, 70] |
p02981 | u972658925 | 2,000 | 1,048,576 | N of us are going on a trip, by train or taxi. The train will cost each of us A yen (the currency of Japan). The taxi will cost us a total of B yen. How much is our minimum total travel expense? | ['N,A,B = map(int,input().split())\nprint(N*A + B)', 'N,A,B = map(int,input().split())\ntr = N*A\nif tr < B:\n print(tr)\nelse:\n print(B)'] | ['Wrong Answer', 'Accepted'] | ['s483951482', 's431652199'] | [2940.0, 2940.0] | [20.0, 17.0] | [47, 81] |
p02981 | u973108807 | 2,000 | 1,048,576 | N of us are going on a trip, by train or taxi. The train will cost each of us A yen (the currency of Japan). The taxi will cost us a total of B yen. How much is our minimum total travel expense? | ['n,a,b = map(int,input().split())\nprint(min(a*n, b)', 'n,a,b = map(int,input().split())\nprint(min(a*n, b))'] | ['Runtime Error', 'Accepted'] | ['s264568021', 's540192232'] | [2940.0, 2940.0] | [17.0, 17.0] | [50, 51] |
p02981 | u974402118 | 2,000 | 1,048,576 | N of us are going on a trip, by train or taxi. The train will cost each of us A yen (the currency of Japan). The taxi will cost us a total of B yen. How much is our minimum total travel expense? | ['N,A,B = (int(x) for x in input(),split())\nprint(min(N*A,B))', 'N,A,B = (int(x) for x in input().split())\nprint(min(N*A,B))'] | ['Runtime Error', 'Accepted'] | ['s756910754', 's616327265'] | [8920.0, 9024.0] | [26.0, 26.0] | [59, 59] |
p02981 | u974935538 | 2,000 | 1,048,576 | N of us are going on a trip, by train or taxi. The train will cost each of us A yen (the currency of Japan). The taxi will cost us a total of B yen. How much is our minimum total travel expense? | ['N,A,B = map(int,input().split())\nif N>A/B:\n print(A/B)\nelse:\n print(N)', 'N,A,B = map(int,input().split())\nif N*A>B:\n print(B)\nelse:\n print(N*A)'] | ['Wrong Answer', 'Accepted'] | ['s796412383', 's009698848'] | [2940.0, 2940.0] | [17.0, 17.0] | [76, 76] |
p02981 | u978252828 | 2,000 | 1,048,576 | N of us are going on a trip, by train or taxi. The train will cost each of us A yen (the currency of Japan). The taxi will cost us a total of B yen. How much is our minimum total travel expense? | ['N,A,B = map(int,input().split())\n\nprint(min(N*A,B)', 'N,A,B = map(int,input().split())\n\nprint(min(N*A,B))'] | ['Runtime Error', 'Accepted'] | ['s411383128', 's964046321'] | [2940.0, 2940.0] | [17.0, 17.0] | [50, 51] |
p02981 | u978962055 | 2,000 | 1,048,576 | N of us are going on a trip, by train or taxi. The train will cost each of us A yen (the currency of Japan). The taxi will cost us a total of B yen. How much is our minimum total travel expense? | ['n,a,b = list(map(int, input().split()))\nd = n*a\nt = n*b\nprint(np.min([d, t]))', 'n,a,b = list(map(int, input().split()))\ntaxi = n*a\ndensya = n*b\nprint(np.min([taxi, densya]))', 'n,a,b = list(map(int, input().split()))\nd = n*a\nt = n*b\nprint(int(np.min([d, t])))', 'import numpy as np\nn,a,b=map(int, input().sp... | ['Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted'] | ['s423940036', 's557147901', 's615731959', 's720547276', 's727778340'] | [2940.0, 2940.0, 2940.0, 12408.0, 2940.0] | [17.0, 17.0, 17.0, 153.0, 17.0] | [77, 93, 82, 74, 50] |
p02981 | u979038517 | 2,000 | 1,048,576 | N of us are going on a trip, by train or taxi. The train will cost each of us A yen (the currency of Japan). The taxi will cost us a total of B yen. How much is our minimum total travel expense? | ['import java.util.*;\npublic class Main{\n public static void main(String args[]){\n Scanner sc = new Scanner(System.in);\n int n = sc.nextInt();\n int a = sc.nextInt();\n int b = asc.nextInt();\n if(n*a>=b){\n System.out.println(b);\n }else{\n System.out.println(n*a);\n }\n }\n}', 'n,... | ['Runtime Error', 'Accepted'] | ['s884726989', 's312533992'] | [2940.0, 2940.0] | [17.0, 17.0] | [299, 86] |
p02981 | u979078704 | 2,000 | 1,048,576 | N of us are going on a trip, by train or taxi. The train will cost each of us A yen (the currency of Japan). The taxi will cost us a total of B yen. How much is our minimum total travel expense? | ['N, a, b = map(int,input().split())\nprint(max(N * a, b))\n ', 'N, a, b = map(int,input().split())\nprint(min(N * a, b))\n '] | ['Wrong Answer', 'Accepted'] | ['s557966889', 's320135683'] | [2940.0, 2940.0] | [17.0, 17.0] | [62, 62] |
p02981 | u980783809 | 2,000 | 1,048,576 | N of us are going on a trip, by train or taxi. The train will cost each of us A yen (the currency of Japan). The taxi will cost us a total of B yen. How much is our minimum total travel expense? | ['n,a,b=map(int input.split())\nprint(max(n*a,b))', 'n,a,b=map(int, input.split())\nprint(max(n*a,b))', 'n,a,b = map(int,input().split())\nprint(min(a * n, b))'] | ['Runtime Error', 'Runtime Error', 'Accepted'] | ['s525208019', 's581370652', 's769325429'] | [2940.0, 2940.0, 2940.0] | [17.0, 17.0, 17.0] | [46, 47, 53] |
p02981 | u981758672 | 2,000 | 1,048,576 | N of us are going on a trip, by train or taxi. The train will cost each of us A yen (the currency of Japan). The taxi will cost us a total of B yen. How much is our minimum total travel expense? | ['\n#include<string>\nusing namespace std;\n\nint main()\n{\n int n, a, b;\n cin >> n >> a >> b;\n if(n*a < b) {\n cout << n*a;\n } else {\n cout << b;\n }\n}', 'n, a, b = [int(i) for i in input("").split(" ")]\nif (n*a) < b:\n print(n*a)\nelse:\n print(b)'] | ['Runtime Error', 'Accepted'] | ['s462140238', 's397412212'] | [8908.0, 9164.0] | [21.0, 27.0] | [191, 92] |
p02981 | u982438430 | 2,000 | 1,048,576 | N of us are going on a trip, by train or taxi. The train will cost each of us A yen (the currency of Japan). The taxi will cost us a total of B yen. How much is our minimum total travel expense? | ['N = int(input())\nA = list(map(int,input().split()))\n\nX1by2 = 0\nfor i in range(N):\n if i%2 ==0:\n X1by2 += A[i]\n else:\n X1by2 -= A[i]\n\nX = []\n\nX.append(X1by2)\nfor i in range(len(A)-1):\n X.append((A[i]-X[i]/2)*2)\n\nprint(" ".join(repr(int(e)) for e in X))\n', 'L, R = map(int,input().split())\nL_m... | ['Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted'] | ['s113878310', 's228706672', 's316082783', 's523477424'] | [3064.0, 3064.0, 3060.0, 2940.0] | [17.0, 17.0, 17.0, 17.0] | [261, 409, 262, 108] |
p02981 | u982462877 | 2,000 | 1,048,576 | N of us are going on a trip, by train or taxi. The train will cost each of us A yen (the currency of Japan). The taxi will cost us a total of B yen. How much is our minimum total travel expense? | ['nums = list(map(int, input().split()))\n\nif nums[0]*nums[1] > nums[2]:\n print(nums[0]*nums[1])\n \nelif nums[0]* nums[1] <= nums[2]: \n print(nums[2])', 'nums = list(map(int, input().split()))\n\nif nums[0]*nums[1] > nums[2]:\n print(nums[2])\n \nelif nums[0]* nums[1] <= nums[2]: \n print(nums[0] ... | ['Wrong Answer', 'Accepted'] | ['s437805794', 's753566468'] | [2940.0, 2940.0] | [17.0, 17.0] | [155, 157] |
p02981 | u982808037 | 2,000 | 1,048,576 | N of us are going on a trip, by train or taxi. The train will cost each of us A yen (the currency of Japan). The taxi will cost us a total of B yen. How much is our minimum total travel expense? | ['print("hello world!!")', 'n,a,b=map(int,input().split())\n\nprint(min(n*a,b))'] | ['Wrong Answer', 'Accepted'] | ['s789647708', 's057678515'] | [2940.0, 2940.0] | [17.0, 17.0] | [22, 49] |
p02981 | u983943108 | 2,000 | 1,048,576 | N of us are going on a trip, by train or taxi. The train will cost each of us A yen (the currency of Japan). The taxi will cost us a total of B yen. How much is our minimum total travel expense? | ['def minimizer(n,a,b):\n first=n*a\n second=b\n if first>second:\n return second\n else: \n return first\n\ninputing=input("enter your value")\ninput_sep=inputing.split(" ")\ninput_sep=[int(i) for i in input_sep]\nprint(minimizer(int(input_sep[0]),int(input_sep[1]),int(input_sep[2])))', 'def minimizer(n,a,b)... | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s634151329', 's814069477', 's037961779'] | [3060.0, 3060.0, 3060.0] | [17.0, 17.0, 17.0] | [283, 322, 265] |
p02981 | u985648232 | 2,000 | 1,048,576 | N of us are going on a trip, by train or taxi. The train will cost each of us A yen (the currency of Japan). The taxi will cost us a total of B yen. How much is our minimum total travel expense? | ['N A B = list(map(int, input().split()))\n\ntotal_cost = N * A\n\nif total_cost > B:\n total_cost = B\n \nprint(total_cost)\n', 'N, A, B = list(map(int, input().split()))\n \ntotal_cost = N * A\n \nif total_cost > B:\n total_cost = B\n \nprint(total_cost)'] | ['Runtime Error', 'Accepted'] | ['s405611079', 's891188672'] | [2940.0, 2940.0] | [19.0, 17.0] | [118, 121] |
p02981 | u987164499 | 2,000 | 1,048,576 | N of us are going on a trip, by train or taxi. The train will cost each of us A yen (the currency of Japan). The taxi will cost us a total of B yen. How much is our minimum total travel expense? | ['from sys import stdin\n\nli = list(map(int,stdin.readline().rstrip.split()))\n\nif li[1] > li[2]:\n print(li[0]*li[1])\nelse:\n print(li[0]*li[2])\n ', 'from sys import stdin\nli = list(map(int,stdin.readline().rstrip.split()))\nif li[1] > li[2]:\n print(li[0]*li[1])\nelse:\n print(li[0]*li[2])', 'from... | ['Runtime Error', 'Runtime Error', 'Accepted'] | ['s624058312', 's878554760', 's725032386'] | [2940.0, 3060.0, 2940.0] | [17.0, 17.0, 17.0] | [150, 143, 145] |
p02981 | u992910889 | 2,000 | 1,048,576 | N of us are going on a trip, by train or taxi. The train will cost each of us A yen (the currency of Japan). The taxi will cost us a total of B yen. How much is our minimum total travel expense? | ['# coding: utf-8\n# Your code here!\nN,A,B=map(int,input().split())\nif N*B>A:\n print(A)\nelse:\n print(N*B)\n', '# coding: utf-8\n# Your code here!\nN,A,B=map(int,input().split())\nif N*B>A:\n print(N*B)\nelse:\n print(A)', '# coding: utf-8\n# Your code here!\nN,A,B=map(int,input().split())\nif N*A>B:\n ... | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s657450703', 's722520736', 's930161017'] | [2940.0, 2940.0, 2940.0] | [17.0, 17.0, 19.0] | [109, 108, 109] |
p02981 | u993435350 | 2,000 | 1,048,576 | N of us are going on a trip, by train or taxi. The train will cost each of us A yen (the currency of Japan). The taxi will cost us a total of B yen. How much is our minimum total travel expense? | ['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 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\n elif mod == 0:\n ans = 0\n break\n print(ans)\n\n', 'L,R = map(in... | ['Runtime Error', 'Runtime Error', 'Accepted'] | ['s255522085', 's594735209', 's905991323'] | [2940.0, 2940.0, 2940.0] | [17.0, 17.0, 17.0] | [284, 317, 124] |
p02981 | u994985556 | 2,000 | 1,048,576 | N of us are going on a trip, by train or taxi. The train will cost each of us A yen (the currency of Japan). The taxi will cost us a total of B yen. How much is our minimum total travel expense? | ['#coding: utf-8\nn, a, b = map(int,input().split())\nif n * a > b:\n print(n * a)\nelse:\n print(b)\n', '#coding: utf-8\nn, a, b = map(int,input().split())\nif n * a > b:\n print(b)\nelse:\n print(n * a)\n'] | ['Wrong Answer', 'Accepted'] | ['s028660011', 's516298211'] | [2940.0, 2940.0] | [17.0, 17.0] | [100, 100] |
p02981 | u995861601 | 2,000 | 1,048,576 | N of us are going on a trip, by train or taxi. The train will cost each of us A yen (the currency of Japan). The taxi will cost us a total of B yen. How much is our minimum total travel expense? | ['n, a, b = map(int, input().split())\nif n*a > b:\n print(n*a)\nelse:\n print(b)', 'n, a, b = map(int, input().split())\nif n*a < b:\n print(n*a)\nelse:\n print(b)'] | ['Wrong Answer', 'Accepted'] | ['s613284719', 's082788311'] | [2940.0, 2940.0] | [18.0, 17.0] | [77, 77] |
p02981 | u997393081 | 2,000 | 1,048,576 | N of us are going on a trip, by train or taxi. The train will cost each of us A yen (the currency of Japan). The taxi will cost us a total of B yen. How much is our minimum total travel expense? | ['a,b,c=map(int,input()).split()\nprint(c if c<=a*b else a*b)', 'a,b,c=map(int,input().split());print(min(a*b,c))'] | ['Runtime Error', 'Accepted'] | ['s539861924', 's744881828'] | [2940.0, 2940.0] | [18.0, 17.0] | [58, 48] |
p02981 | u999669171 | 2,000 | 1,048,576 | N of us are going on a trip, by train or taxi. The train will cost each of us A yen (the currency of Japan). The taxi will cost us a total of B yen. How much is our minimum total travel expense? | ['n, a, b = map( int, input() )\nprint( min( n*a, b ) )', 'n, a, b = map( int, input().split() )\nprint( min( n*a, b ) )'] | ['Runtime Error', 'Accepted'] | ['s350825331', 's165383776'] | [2940.0, 2940.0] | [18.0, 17.0] | [52, 60] |
p02982 | u007991836 | 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())\n3 2\nX = [list(map(int,input().split())) for i in range(N)]\n1 2\n5 5\n-2 8\n\nans = 0\nfor j in range(N):\n for i in range(j):\n distant2 = 0\n for k in range(D):\n distant2 += (X[j][k]-X[i][k])**2\n if math.sqrt(distant2) % 1 == 0:\n ... | ['Runtime Error', 'Accepted'] | ['s902760573', 's397507036'] | [2940.0, 3060.0] | [17.0, 17.0] | [333, 316] |
p02982 | u008582165 | 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())\ncount = 0\nalllist = []\nfor i in range(n):\n alist = list(map(int,input().split()))\n alllist.append(alist)\n\n\nfor i in range(n-1):\n for j in range(i+1,n):\n count1 = 0\n for s in range(d):\n count1 += (alllist[i][s]-alllist[j][s])**2\... | ['Wrong Answer', 'Accepted'] | ['s668017983', 's917561413'] | [3064.0, 3064.0] | [18.0, 17.0] | [418, 396] |
p02982 | u014724123 | 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\n\nn, d = map(int, input().split())\n\nl = []\nfor v in range(n):\n l.append(list(map(int, input().split())))\n\nans = 0\n\nfor i in range(n):\n for j in range(n):\n if i == j:\n continue\n a = numpy.array(l[i])\n b = numpy.array(l[j])\n c = numpy.linalg.norm(... | ['Wrong Answer', 'Accepted'] | ['s881999705', 's071143836'] | [12504.0, 12504.0] | [152.0, 149.0] | [375, 342] |
p02982 | u017624958 | 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\n# 0924 start\ninputted = list(map(int, input().split()))\nN = inputted[0]\nD = inputted[1]\n\nX = []\nfor i in range(N):\n print(i)\n X.append(list(map(int, input().split())))\nprint(X)\n\ncalculate = lambda y, z : math.sqrt(sum([(yi - zi) ** 2 for yi, zi in zip(y, z)]))\n\nanswer = 0\nfor i in r... | ['Wrong Answer', 'Accepted'] | ['s994161262', 's786905818'] | [3064.0, 3064.0] | [19.0, 18.0] | [465, 443] |
p02982 | u018776180 | 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(s) for s in input().split(" ")]\npts = []\nfor _ in range(n):\n pts.append([int(s) for s in input().split(" ")])\n\ndef dist(x, y):\n sum = 0\n for xx, yy in zip(x, y):\n sum += (xx - yy)**2\n return math.sqrt(sum)\n\ncnt = 0\nfor i in range(n):\n for j in range(i + 1, n):\n d = dist(pts[i], pt... | ['Runtime Error', 'Accepted'] | ['s818904129', 's639797023'] | [3064.0, 3064.0] | [18.0, 17.0] | [363, 375] |
p02982 | u020959776 | 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 math import sqrt\n\n\ndef calc(pos_x, pos_y):\n sum = 0\n for i in range(0, len(pos_x)):\n sum += (pos_x[i] - pos_y[i]) ** 2\n\n return sqrt(sum).is_integer()\n\n\n\n# items = []\n\n# items.append(list(map(int, input().split())))\n\nitems = []\nitems.append(list(map(int, "-3 7 8 2".split())))\nitems.appe... | ['Wrong Answer', 'Accepted'] | ['s462029817', 's802604554'] | [3064.0, 3064.0] | [17.0, 18.0] | [597, 597] |
p02982 | u026788530 | 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())\n\nx=[list(map(int,input().split())) for i in range(n)]\n\nlis=[False for i in range(16001)]\nfor i in range(1264):\n lis[i*i]=True\n \nans=0\nfor i in range(n):\n for j in range(i):\n dis=sum([(x[i][k]-x[j][k])*(x[i][k]-x[j][k]) for k in range(d)])\n print(dis)\n if lis[dis]:... | ['Runtime Error', 'Runtime Error', 'Accepted'] | ['s371834908', 's844092108', 's533570985'] | [3316.0, 3064.0, 3188.0] | [18.0, 18.0, 18.0] | [331, 328, 339] |
p02982 | u032566873 | 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())\n\u200b\n\nX = []\nfor i in range(N):\n array = list(map(int, input().strip().split()))\n X.append(array)\nvar = 0\nfor i in range(N-1):\n for k in range(N-1-i):\n s = 0\n for j in range(D): \n s = s + (X[i+1+k][j] - X[i+k][j])*(X[i+1+k][j] - X[i+k][j])\n if ... | ['Runtime Error', 'Accepted'] | ['s325784783', 's987248240'] | [2940.0, 3064.0] | [17.0, 18.0] | [373, 373] |
p02982 | u038657704 | 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\n\ndef is_distance_integer(p1, p2):\n n = len(p1)\n\n total = 0\n for i in range(n):\n total += ((p1[i] - p2[i])**2)\n\n dist = math.sqrt(total)\n\n return (dist**2) == total\n\n\ndef count_pairs(points):\n cnt = 0\n n = len(points)\n\n for i in range(n):\n for j in... | ['Runtime Error', 'Accepted'] | ['s222614497', 's529846567'] | [3064.0, 3064.0] | [18.0, 17.0] | [613, 624] |
p02982 | u039860745 | 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 ... | ['Thank you for your comment.\nWhen I run the above code, it just displays the text "Loading...." and doesn\'t jump to the "login" or "home" page.\nI\'m not sure which part of the code is the cause, but I\'m wondering if initState wasn\'t called', 'import math\nN,D = map(int,input().split())\nX = []\nc = 0\ns = 0\nfor ... | ['Runtime Error', 'Accepted'] | ['s972342492', 's694201431'] | [8856.0, 9268.0] | [22.0, 27.0] | [237, 427] |
p02982 | u042385277 | 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(input())\nx = [list(map(int, input().split())) for _ in range(N)]\ns = 0\nfor i in range(N - 1) :\n for j in range(i + 1, N) :\n length' = 0.0\n for d in range(D) :\n length' += (x[i][d] - x[j][d]) ** 2\n length = length' ** (1/2)\n if length.is_integer() :\n ... | ['Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted'] | ['s235719682', 's334281441', 's967689973', 's969718632', 's280650058'] | [2940.0, 3060.0, 2940.0, 2940.0, 3064.0] | [18.0, 17.0, 17.0, 18.0, 18.0] | [330, 311, 431, 313, 324] |
p02982 | u042716570 | 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 n in range(N):\n x = list(map(int, input().split()))\n X.append(x)\n \nimport numpy as np\ndef distance(a,b):\n dis = 0\n for i in range(D):\n dis += (a[i]-b[i])**2\n return np.sqrt(dis)\n\ncount = 0\nfor i in range(N):\n print(distance(X[i],X[... | ['Wrong Answer', 'Accepted'] | ['s477483934', 's447360486'] | [12500.0, 12496.0] | [148.0, 152.0] | [400, 386] |
p02982 | u045408189 | 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 i in range(N)]\nc=0\nfor i in range(N-1):\n for j in range(i+1,N):\n c += (sum((a-b)**2) for a,b in zip(X[i],X[j]))**0.5.is_integer()\nprint(c)', 'N,D=map(int,input().split())\nX=[list(map(int,input().split())) for i in range(N)]\nc=0\nfor ... | ['Runtime Error', 'Accepted'] | ['s801839587', 's872915405'] | [3060.0, 3060.0] | [17.0, 18.0] | [215, 216] |
p02982 | u054825571 | 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=[]\nfor _ in range(N):\n X.append(list(map(int, input().split())))\ncount=0\nfor i in range(N-1):\n for j in range(i+1,N):\n a=0\n for k in range(D):\n a+=(X[i][k]-X[j][k])**2\n if math.sqrt(a).is_integer():\n coutn+=1\nprint(count)', 'import math\n ... | ['Runtime Error', 'Accepted'] | ['s139351494', 's912039979'] | [9200.0, 9000.0] | [24.0, 29.0] | [286, 287] |
p02982 | u063073794 | 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 ... | ['yandy\nN, D = map(int, input().split())\narray = []\nfor _ in range(N):\n array.append([int(i) for i in input().split()])\n \nans = 0\nfor i in range(N):\n for j in range(i+1, N):\n s = 0\n for d in range(D):\n s += (array[i][d]-array[j][d]) ** 2\n if s ** (1/2) % 1 == 0:\n ... | ['Runtime Error', 'Wrong Answer', 'Runtime Error', 'Accepted'] | ['s201527654', 's258398481', 's557005747', 's434426140'] | [3064.0, 3316.0, 2940.0, 3060.0] | [18.0, 18.0, 17.0, 18.0] | [332, 254, 106, 250] |
p02982 | u068142202 | 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())\ndistances = [list(map(int, input().split())) for _ in range(n)]\nans = 0\n\nfor i in range(n):\n for j in range(i + 1, n):\n diff_total = 0\n for k in range(d):\n diff = abs(distances[i][k] - distances[j][k])\n diff_total = diff * diff\n\n ... | ['Wrong Answer', 'Accepted'] | ['s836780269', 's903787802'] | [9120.0, 9116.0] | [29.0, 42.0] | [478, 478] |
p02982 | u068695365 | 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 = [int(i) for i in input().split()]\n\nlist_coord = list()\nfor i in range(N):\n list_coord.append([int(i) for i in input().split()])\narr_coord = np.array(list_coord)\n\ncnt = 0\nfor i in range(N):\n for j in range(N-i-1):\n a = np.array(list_coord[i])\n b = np.array(list_c... | ['Wrong Answer', 'Accepted'] | ['s454408979', 's773479165'] | [12784.0, 13596.0] | [189.0, 154.0] | [461, 462] |
p02982 | u084069244 | 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())\n\narr = [[0 for i in range(10)] for j in range(10)]\n\nfor i in range(N):\n x = list(map(int, input().split()))\n for j in range(0, D):\n array[i][j] = x[j];\nsum_dis = 0\nfor i in range(0,N-1):\n for j in range(i+1,N):\n dis = 0\n for k i... | ['Runtime Error', 'Wrong Answer', 'Runtime Error', 'Wrong Answer', 'Wrong Answer', 'Runtime Error', 'Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Runtime Error', 'Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s212031969', 's367795432', 's465083915', 's466596149', 's483434725', 's537397184', 's675899971', 's696067375', 's718602657', 's794846519', 's796172864', 's818518232', 's987257565', 's545223964'] | [3064.0, 3064.0, 3064.0, 3064.0, 3064.0, 3064.0, 3064.0, 3064.0, 3064.0, 3064.0, 3064.0, 3064.0, 3064.0, 3064.0] | [17.0, 19.0, 20.0, 18.0, 18.0, 17.0, 18.0, 18.0, 18.0, 17.0, 18.0, 17.0, 18.0, 18.0] | [452, 420, 413, 466, 414, 301, 419, 420, 415, 297, 374, 433, 454, 454] |
p02982 | u085035133 | 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_l = [list(map(int, input().split))) for _ in range(n)]\n\nans = 0\n\nfor i in range(n):\n for j in range(i+1, n):\n tmp = 0\n for k in range(d):\n tmp += (x_l[j][k] - x_l[i][k]) ** 2\n if tmp**0.5%1 == 0:\n ans += 1\n\nprint(ans)\n', 'n... | ['Runtime Error', 'Runtime Error', 'Accepted'] | ['s166149193', 's244399638', 's695519911'] | [8852.0, 9164.0, 9312.0] | [23.0, 25.0, 27.0] | [299, 298, 300] |
p02982 | u086503932 | 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())\nc=0\nX=[]\nfor i in range(N):\n X.append(list(map(int,input().split())))\n\nfor j in range(N):\n for k in range(j+1,N):\n tmp=sum([(X[j][l]-X[k][l])**2 for l in range(N)])\n if tmp in [y**2 for y in range(21)]:\n c +=1\nprint(c)', 'N,D=map(int,input().split())\nc=0\nX=[]\nfo... | ['Runtime Error', 'Accepted'] | ['s886573618', 's191174284'] | [3060.0, 3060.0] | [18.0, 19.0] | [260, 261] |
p02982 | u089142196 | 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=[list(map(int, list(input().split()))) for i in range(0,N)]\nsum=0\nans=0\n\nprint(X)\n\nfor i in range(0,N-1):\n for j in range(i+1,N):\n sum=0\n for k in range(0,D):\n sum+=(X[j][k]-X[i][k])**2\n M=math.sqrt(sum)\n if M.is_integer():\n ans+=1 \n... | ['Wrong Answer', 'Accepted'] | ['s711006681', 's623541095'] | [3064.0, 3064.0] | [17.0, 17.0] | [314, 304] |
p02982 | u090032260 | 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=[]\ncount=0\nfor i in range(N):\n x = list(map(int,input().split()))\n X.append(x)\nfor i in range(N-1):\n for j in range(i,N):\n s = 0\n for k in range(N):\n s += (X[i][k]-X[j][k])**2\n if math.sqrt(s).is_integer():\n ... | ['Runtime Error', 'Wrong Answer', 'Accepted'] | ['s170674187', 's796621710', 's174460489'] | [3064.0, 3064.0, 3064.0] | [18.0, 18.0, 18.0] | [337, 339, 331] |
p02982 | u095021077 | 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 ... | ['temp=input().split()\nN=int(temp[0])\nD=int(temp[1])\n\npoints=[]\nfor i in range(N):\n temp=input().split()\n points.append([int(temp[x]) for x in range(D)])\n \ncounter=0\nfor i in range(N):\n for j in range(i+1, N):\n l=pow(sum([pow(points[i, x]-points[j, x], 2) for x in range(D)]), 1/2)\n if l.is_intege... | ['Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted'] | ['s468880969', 's667106963', 's927158674', 's060466865'] | [3064.0, 3064.0, 3064.0, 12508.0] | [17.0, 18.0, 18.0, 154.0] | [348, 340, 345, 302] |
p02982 | u098588273 | 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=[[int(a) for a in input().split(" ")] for _ in range(n)]\ncnt=0\ndis=0\nfor i in range(n-1):\n for j in range(i+1,n):\n for k in range(d):\n dis+=(x[i][k]-x[j][k])**2\n if (dis**0.5).is_integer:\n cnt+=1\nprint(cnt)', 'n,d=map(int,input().split())\nx=[[int(a) for a... | ['Wrong Answer', 'Accepted'] | ['s814273462', 's403546715'] | [3064.0, 3188.0] | [18.0, 18.0] | [258, 262] |
p02982 | u102242691 | 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 ... | ['\nn,d = map(int,input().split())\nl = []\na = []\ncount = 0\nsum = 0\n\nfor i in range(n):\n a = list(map(int,input().split()))\n l.append(a)\n\nfor x in range(1,n):\n for y in range(x+1,n):\n for z in range(d):\n# print((l[x][z]-l[y][z])**2)\n sum += (l[x][z]-l[y][z])**2\n ... | ['Wrong Answer', 'Accepted'] | ['s728826530', 's993357132'] | [3316.0, 3060.0] | [18.0, 18.0] | [497, 282] |
p02982 | u103902792 | 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())\npoints = []\nfor _ in range(n):\n X = tuple(map(int,input().split()))\n points.append(X)\n \nans = 0\n\nimport math\ndef distance(x,y):\n dis = 0\n for i in range(d):\n dis += (x[i]-y[i])**2\n return math.sqrt(dis)\n\nfor i in range(n-1):\n for j in range(i+1,n):\n dis = d... | ['Runtime Error', 'Accepted'] | ['s116030167', 's487485398'] | [3064.0, 3064.0] | [17.0, 18.0] | [369, 381] |
p02982 | u104442591 | 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\nnum = [int(i) for i in input().split()]\na = [[int(c) for c in l.strip()] for l in sys.stdin]\nr = 0\nans = 0\nfor i in range(num[0]-1):\n for j in range(num[1]):\n d = (a[i][j]**2 + a[i+1][j]**2)\n r += d\n if int(r**0.5) == r**0.5:\n ans += 1\n r = 0\n\nfor j in range(num[1]):\n d = (a[num[... | ['Runtime Error', 'Accepted'] | ['s913464133', 's036709875'] | [3064.0, 3064.0] | [20.0, 17.0] | [402, 322] |
p02982 | u106181248 | 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=[]\nans = 0\ny = 0.0\n\nfor i in range(n):\n x.append(list(map(int,input().split()))) \nprint(x)\n \nfor i in range(n):\n for j in range(i+1,n): \n y = 0.0\n for k in range(d): \n y = y + (x[i][k] - x[j][k])**2 \n if math.sqrt(... | ['Wrong Answer', 'Accepted'] | ['s898771690', 's885736740'] | [3064.0, 3064.0] | [19.0, 18.0] | [538, 529] |
p02982 | u106778233 | 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())\ncnt=0\ndlist=[list(map(int,input().split())) for _ in range(n)]\nfor i in range(n-1):\n for j in range(i+1:n):\n ans=0\n for k in range(d):\n ans+=(dlist[i][k]-dlist[j][k])**2\n cnt+=math.floor(ans**0.5)==math.ceil(ans**0.5):\n\nprint(cnt) ... | ['Runtime Error', 'Accepted'] | ['s428892845', 's204699248'] | [2940.0, 3064.0] | [17.0, 18.0] | [311, 306] |
p02982 | u111392182 | 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 ... | ['l,r = map(int,input().split())\nx = l%2019\nif (l//673 < r//673 or l%673==0) and (l//3 < r//3 or l%3==0):\n ans = 0\nelse:\n ans = l*(l+1)%2019\nprint(ans)', 'import math;\nn,d = map(int,input().split())\nx = list(list(map(int,input().split()))for i in range(n))\nans = 0\nl = 0\nfor i in range(n):\n for j in... | ['Wrong Answer', 'Accepted'] | ['s821937547', 's062492772'] | [2940.0, 3064.0] | [17.0, 18.0] | [155, 318] |
p02982 | u116002573 | 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 main():\n n = int(input())\n A = list(map(int, input().split()))\n\n filled = [0]*(n+1)\n ans = []\n for i in range(n-1, -1, -1):\n if sum(filled[::i+1][1:]) % 2 != A[i]:\n filled[i+1] = 1\n ans.append(i+1)\n print(len(ans))\n print(' '.join(map(str, ans)))\n\n\ni... | ['Runtime Error', 'Accepted'] | ['s406297414', 's393364938'] | [3064.0, 3064.0] | [18.0, 18.0] | [340, 447] |
p02982 | u116233709 | 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 math import sqrt\nn,d=map(int, input().split())\nx=[list(map(int, input().split())) for i in range(n)]\n\nans=0\n\nfor i in range(n):\n for j in range(i+1, n):\n xi,xj = x[i],x[j]\n tmp = 0\n for k in range(d):\n tmp += (xi[d]-xj[d]) ** 2\n if sqrt(tmp)%1==0:\n ans += 1\n\nprint(ans)\n\n... | ['Runtime Error', 'Runtime Error', 'Wrong Answer', 'Accepted'] | ['s480257752', 's606966741', 's655743670', 's075421926'] | [2940.0, 3064.0, 3060.0, 3064.0] | [17.0, 17.0, 18.0, 18.0] | [301, 310, 299, 327] |
p02982 | u118211443 | 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())\na = []\nfor i in range(n):\n a.append(list(map(int, input().split())))\ncnt = 0\nfor i in range(n):\n for j in range(n):\n if i == n - 1:\n if j == n - 1:\n print(cnt/2)\n exit(0)\n countwa = 0\n ... | ['Wrong Answer', 'Accepted'] | ['s113860453', 's897164385'] | [3064.0, 3064.0] | [18.0, 18.0] | [679, 392] |
p02982 | u128539234 | 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 ... | ['l,r = map(int,input().split())\n\nr = min(r, l+4038)\n\nmin = 99999999\nfor i in range(l,r):\n for j in range(i+1,r+1):\n value = (i*j)%2019\n if min > value:\n min = value\nprint(min)', 'import math\n\nn,d = map(int, input().split())\np = []\nfor i in range(n):\n p.append(list(map(int, input().split()))... | ['Wrong Answer', 'Accepted'] | ['s667739901', 's092312490'] | [2940.0, 3060.0] | [17.0, 18.0] | [186, 296] |
p02982 | u131264627 | 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 = [[int(j) for j in input().split()] for i in range(n)]\nans = 0\nfor i in range(n):\n for j in range(i + 1, n):\n acum = 0.0\n for k in range(d)\n acum += (x[j][k] - x[i][k]) ** 2\n if (acum ** 0.5).is_integer():\n ans += 1\nprint(ans)... | ['Runtime Error', 'Accepted'] | ['s389956992', 's808864435'] | [2940.0, 3064.0] | [17.0, 18.0] | [308, 309] |
p02982 | u137542041 | 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())\n\n\nall_list = []\n\nfor i in range(n):\n x = input()\n x = x.split(' ')\n\n # x = list(x)\n # print(x)\n x = [float(v) for v in x] # to float\n\n all_list.append(x) # list of list\n\n# print(all_list)\n\ncnt = 0\n\nfor i in range(n):\n target = a... | ['Wrong Answer', 'Accepted'] | ['s841283168', 's836314711'] | [3064.0, 3064.0] | [18.0, 17.0] | [641, 709] |
p02982 | u143492911 | 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()))]\nans=0\nfor i in range(n-1):\n for j in range(1,n-i):\n l=0\n for k in range(d):\n l+=(x[i][k]-x[i+j][k])**2\n l=l**0.5\n if l.is_integer()==True:\n ans+=1\nprint(ans)', 'n,d=map(int,input().split())\... | ['Runtime Error', 'Accepted'] | ['s458814391', 's361267546'] | [3188.0, 3064.0] | [17.0, 18.0] | [274, 291] |
p02982 | u145600939 | 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 *\nn,d = map(int,input().split())\nx = [list(map(int,input().split())) for _ in range(n)]\nans = 0\nfor a,b in combinations(x,2):\n delta = 0\n for i in range(d):\n delta += (a[i] - b[i])**2\n if (n **0.5).is_integer():\n ans += 1\nprint(ans)\n', 'from itertools import *\nn,d = map(int,... | ['Wrong Answer', 'Accepted'] | ['s022215492', 's719081735'] | [3060.0, 3188.0] | [18.0, 18.0] | [264, 268] |
p02982 | u154979004 | 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 math import sqrt\n\n\ndef diff_square(x1, x2):\n return (x1 - x2) ** 2\n\n\nN, D = map(int, input().split(' '))\nX = []\nfor _ in range(N):\n X.append(list(map(int, input().split(' '))))\n\ncount = 0\nfor i in range(N):\n for j in range(i, N):\n if i != j:\n distance = sqrt(sum(map(dif... | ['Wrong Answer', 'Accepted'] | ['s351657083', 's973829996'] | [3064.0, 3064.0] | [18.0, 18.0] | [433, 405] |
p02982 | u166621202 | 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())\n\npoint = []\nfor _ in range(n):\n x = list(map(int, input().split()))\n point.append(x)\n\ncnt = 0\nfor i in range(n-1):\n for j in range(i+1, n):\n dist = 0\n for d in range(D):\n dist += (point[i][d] - point[j][d])**2\n dist = mat.sqrt(dist)\n if i... | ['Runtime Error', 'Accepted'] | ['s689619622', 's915101630'] | [3064.0, 3064.0] | [18.0, 18.0] | [345, 346] |
p02982 | u167908302 | 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 ... | ['#coding:utf-8\nimport math\nn, d = map(int, input().split())\n\ngrid = []\nfor i in range(n):\n array = list(map(int, input().strip().split()))\n grid.append(array)\n\nprint(grid)\ncounter = 0\n\n#print(grid[0][0])\nfor i in range(1, n):\n tmp = []\n for j in range(d):\n tmp.append((grid[i][j] - gr... | ['Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s221521484', 's263983237', 's363869307', 's679282530', 's368399282'] | [3064.0, 3316.0, 3064.0, 3064.0, 3064.0] | [18.0, 21.0, 18.0, 18.0, 17.0] | [423, 501, 491, 502, 491] |
p02982 | u169138653 | 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())\nlis=[list(map(int,input().split())) for i in range(n)]\ncnt=0\nx=0\nfor i in range(n-1):\n for j in range(i+1,n):\n for k in range(d):\n x+=(lis[i][k]-lis[j][k])**2\n if x**0.5.is_integer():\n cnt+=1\n x=0\nprint(cnt)', 'n,d=map(int,input().split())\nlis=[list(map(int... | ['Wrong Answer', 'Accepted'] | ['s457575049', 's151326401'] | [3064.0, 3060.0] | [17.0, 17.0] | [256, 259] |
p02982 | u175590965 | 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 = [list(map(int,input().split()))for _ in range(n)]\nans = 0\nfor i in range(n):\n for j in range(i+1,n):\n r = 0\n for k in range(d):\n r += (l[i][k]-l[j][k])**2\n r = r**0.5\n if r == int(r):\n ans += 1\nprint(ans)', ... | ['Wrong Answer', 'Runtime Error', 'Accepted'] | ['s370428141', 's373704582', 's373515813'] | [3188.0, 3064.0, 3064.0] | [18.0, 17.0, 18.0] | [304, 304, 292] |
p02982 | u190178779 | 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 itertoolsy\nN,D = map(int,input().split())\narray = [ list(map(int,input().split())) for x in range(N) ]\n\nif not ( 2 <= N <= 10 and 1 <= D <= 10 ): sys.exit()\nfor I in array:\n if not ( -20 <= min(I) and max(I) <= 20 ): sys.exit()\n\ncount = 0\nfor I in list(itertools.combinations(array,2)):\... | ['Runtime Error', 'Accepted'] | ['s830557133', 's958127745'] | [9088.0, 9476.0] | [23.0, 28.0] | [494, 493] |
p02982 | u193197732 | 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\n\ndef distance(X, Y):\n d = 0\n for x, y in zip(X, Y):\n d += (x - y)**2\n return math.sqrt(d)\n\n\nstr = input()\n\nN, D = map(int, str.split(" "))\n\nX = []\nfor i in range(N):\n x = input()\n x = x.split(" ")\n x = map(int, x)\n X.append(x)\n\nX = list(map(list, X))\n\nco... | ['Wrong Answer', 'Accepted'] | ['s699794601', 's468818778'] | [3064.0, 3064.0] | [18.0, 18.0] | [466, 449] |
p02982 | u200527996 | 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 = []\ntmp = []\nans = []\nfor _ in range(N):\n X.append(list(map(int, input().split())))\nfor i in range(N):\n for j in range(D):\n tmp.append((X[i-1][j]-X[i][j])**2)\n ans.append(tmp[0] + tmp[1])\nprint(ans)', 'N ,D = map(int, input().split())\nX = []\ntmp = []\nan... | ['Runtime Error', 'Accepted'] | ['s663003675', 's609425770'] | [3064.0, 3188.0] | [17.0, 18.0] | [250, 457] |
p02982 | u202727309 | 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 = int(input())\nP = list(map(int, input().split()))\n\ncnt = 0\nfor i in range(N):\n if i + 1 == P[i]:\n cnt += 1\n\nif cnt >= N - 2:\n print('YES')\nelse:\n print('NO')\n", ' N, D = map(int, input().split())\n X = [list(map(int, input().split())) for _ in range(N)]\ncnt = 0\n\ndef dist(A, B):... | ['Runtime Error', 'Runtime Error', 'Accepted'] | ['s124035996', 's704041629', 's977182960'] | [2940.0, 2940.0, 3064.0] | [17.0, 17.0, 17.0] | [177, 416, 410] |
p02982 | u205087376 | 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())\ntry:\n a = [list(map(int,input().split())) for j in range(0,n)]\nexcept EOFError:\n pass\nc = 0\nr = 0\nfor i in range(0,n):\n for j in range(i+1,n):\n for k in range(0,d):\n c+=(a[i][k]-a[j][k])**2\n if math.sqrt(c)==int(math.sqrt(c)):\n r += 1\nprint(r)\n'... | ['Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Runtime Error', 'Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s292164917', 's339312991', 's637640411', 's785366216', 's806827570', 's934435358', 's350765072'] | [3064.0, 3064.0, 3064.0, 3064.0, 3064.0, 3064.0, 3060.0] | [18.0, 20.0, 18.0, 18.0, 18.0, 19.0, 17.0] | [302, 303, 298, 268, 297, 309, 309] |
p02982 | u210827208 | 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=[]\nfor i in range(n):\n x=list(map(int,input().split()))\n X.append(x)\ncnt=0\nfor i in range(n):\n for j in range(i+1,n):\n s=0\n for a,b in zip(X[i],X[j]):\n s+=(a-b)**2\n s=math.sqrt(s)\n print(s)\n if s.is_integer... | ['Wrong Answer', 'Accepted'] | ['s853165916', 's532883925'] | [3064.0, 3064.0] | [18.0, 17.0] | [337, 320] |
p02982 | u219466830 | 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())\ns = [np.asarray(list(map(int,list(input())))) for i in range(n)]\n\ncounter = 0\n\nfor i in range(n):\n for j in range(n):\n ans = np.sum((s[i] - s[j]) ** 2)\n if ans == int(ans):\n counter += 1\n\nprint(counter)', 'import numpy as np... | ['Runtime Error', 'Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s141230090', 's167813319', 's813455269', 's169352208'] | [12488.0, 12492.0, 12736.0, 12500.0] | [151.0, 152.0, 152.0, 150.0] | [283, 295, 286, 300] |
p02982 | u222643068 | 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())\nli=[]\nfor i in range(n):\n li.append(list(map(int,input().split())))\n\ncount=0\nfor i in range(n-1):\n for j in range(i+1,n):\n num=0\n for k in range(d):\n num+=(li[i][k]-li[j][k])**2\n num=math.sqrt(num)\n print(num)\n if num%1==0:\n count+=1... | ['Wrong Answer', 'Accepted'] | ['s521921813', 's051106943'] | [3064.0, 3064.0] | [17.0, 18.0] | [315, 300] |
p02982 | u223904637 | 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())\nl=[]\nans=0\nfor i in range(n):\n l.append(list(map(int,input().split())))\nfor i in range(n):\n for j in range(i):\n z=0\n for k in range(d):\n z+=(l[i][k]-l[j][k])**2\n if float(np.sqrt(z)).is_integer:\n ans+=1\nprin... | ['Wrong Answer', 'Accepted'] | ['s467316654', 's404919231'] | [12396.0, 21280.0] | [152.0, 296.0] | [311, 313] |
p02982 | u233745357 | 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 ... | ['tmp=input().split()\nn=int(tmp[0])\nd=int(tmp[1])\nxn = [0]*d\nnum = 0\n\nfor i in range(n):\n xn[i] = input().split()\n \nfor i in range(n):\n for j in range(i+1, n):\n dist = 0\n for k in range(d):\n dist = dist + pow(int(xn[i][k])-int(xn[j][k]), 2)\n# print("test",dist)\n# print(int(pow(int(p... | ['Runtime Error', 'Accepted'] | ['s271967449', 's811606935'] | [3188.0, 3188.0] | [18.0, 21.0] | [418, 418] |
p02982 | u244434589 | 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= [list(map(int, input().split())) for i in range(N)]\na = 0\nans +=1\nfor i in range(n):\n for j in range(i+1,n):\n for k in range(d):\n a += l[i][k]**2 - l[j][k]**2\n a **=0.5\n if a.is_integer:\n ans +=1\nprint(ans)', 'n,d =m... | ['Runtime Error', 'Accepted'] | ['s863601525', 's520565134'] | [9124.0, 9408.0] | [27.0, 25.0] | [297, 294] |
p02982 | u246975555 | 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())\nimport sys\nimport math\n \na = [map(int,input().split()) for l in range(n)]\ncount = 0\n \nfor i in range(n):\n for j in range(n):\n if i == j:\n count += 0\n else:\n d = math.sqrt((a[i][0] - a[j][0]) ** 2 + (a[i][1] - a[j][1]) ** 2 +(a[i][2] - a[j][2]) ** 2 +(a[i][... | ['Runtime Error', 'Runtime Error', 'Wrong Answer', 'Wrong Answer', 'Runtime Error', 'Runtime Error', 'Accepted'] | ['s418159750', 's511268262', 's555678035', 's685152504', 's705007372', 's819786025', 's214811238'] | [3064.0, 21576.0, 3188.0, 3064.0, 12440.0, 3064.0, 3064.0] | [17.0, 418.0, 18.0, 18.0, 151.0, 18.0, 18.0] | [429, 343, 386, 404, 336, 433, 381] |
p02982 | u250090834 | 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 ... | ['\nn, d = map(int, input().split())\npoint = [[int(i) for i in input().split()] for j in range(n)]\n\nm = 0\nfor i in range(n):\n\tfor j in range(i+1,n):\n\t\ta = 0\n\t\tfor k in range(d):\n\t\t\ta += (point[i][k]-pont[j][k])**2\n\t\tif isinstance(a**0.5, int) \n\t\tm += 1\nprint(m)', '\nn, d = map(int, input().split(... | ['Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted'] | ['s363028098', 's544886497', 's579512374', 's503826072'] | [2940.0, 2940.0, 2940.0, 3316.0] | [17.0, 17.0, 17.0, 21.0] | [288, 290, 269, 296] |
p02982 | u261891508 | 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=[]\nfor i in range(n):\n a=list(map(int,input().split()))\n x.append(a)\n\nans=0\n\nfor i in range(n):\n for j in range(i+1,n):\n temp=0\n for k in range(d):\n temp+=(x[i][k]-x[j][k])**2\n print(math.sqrt(temp))\n temp=math.sqrt(temp)\n if temp==in... | ['Wrong Answer', 'Accepted'] | ['s109573461', 's262845986'] | [3064.0, 3064.0] | [18.0, 18.0] | [334, 335] |
p02982 | u263734237 | 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 = list(map(int, input().split()))\nx = [[0 for x in range(2)] for y in range(3)]\n\nfor i in range(n):\n x[i] = list(map(int, input().split()))\n\ncnt = 0\nfor i in itertools.combinations(x, 2):\n y = i[0]\n z = i[1]\n res = 0\n for j in range(d):\n res +=(y[j]-z[j])**2\n\n res = math.sqr... | ['Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted'] | ['s057948088', 's188175360', 's628150853', 's685635716', 's789431114', 's990472230'] | [3064.0, 3064.0, 3064.0, 3064.0, 3064.0, 3064.0] | [17.0, 18.0, 18.0, 17.0, 18.0, 18.0] | [364, 358, 358, 357, 358, 388] |
p02982 | u269235541 | 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 = [[int(i) for i in input().split()] for i in range(N)]\nS = set()\nans = 0\nfor i in range(N):\n for j in range(N):\n for k in range(D):\n S = S | {(X[i][k] - X[j][k])**2}\n sumS = sum(S)**(0.50)\n print(sumS)\n S = set()\n if i == j... | ['Wrong Answer', 'Accepted'] | ['s888312120', 's003587206'] | [3188.0, 3064.0] | [19.0, 59.0] | [403, 366] |
p02982 | u271752821 | 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())\ncount = 0\nx_list = (list(map(int, input().split())) for _ in range(n)))\n\nfor i in range(n-1):\n for j in range(i+1, n):\n count += (sum((a-b)**2 for a,b in zip(x_list[i], x_list[j]))**0.5).is_integer\nprint(count)', 'n, d = map(int, input().split())\ncount = 0\nx_list = ... | ['Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted'] | ['s509374307', 's830329639', 's859693413', 's388275997'] | [2940.0, 3060.0, 2940.0, 3064.0] | [18.0, 17.0, 17.0, 18.0] | [253, 252, 253, 254] |
p02982 | u273006189 | 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\nimport itertools\n\nN, D = map(int, input().split())\n\nX = [[0]*D+1]*N+1\n\nfor n in range(N):\n X[n] = list(map(int, input().split()))\n\ndef distance(x, y):\n dis = 0\n for d in range(D):\n dis += abs(x[d] - y[d]) ** 2\n \n return math.sqrt(dis).is_integer()\n \ndistance(X[1],... | ['Runtime Error', 'Accepted'] | ['s307204057', 's928629904'] | [3064.0, 3064.0] | [17.0, 19.0] | [447, 451] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.