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 |
|---|---|---|---|---|---|---|---|---|---|---|
p02595 | u924828749 | 2,000 | 1,048,576 | We have N points in the two-dimensional plane. The coordinates of the i-th point are (X_i,Y_i). Among them, we are looking for the points such that the distance from the origin is at most D. How many such points are there? We remind you that the distance between the origin and the point (p, q) can be represented as \... | ['n,d = [int(x) for x in input().split()]\nx = []\ny = []\nfor i in range(n):\n x1,y1 = [int(x) for x in input().split()]\n x.append(x1)\n y.append(y1)\nc = 0\nfor i in range(n):\n s = x[i] ** 2 + y[i] ** 2\n if s < d ** 2:\n c += 1\nprint(c)', 'n,d = [int(x) for x in input().split()]\nx = []\ny = []\nfor i in ... | ['Wrong Answer', 'Accepted'] | ['s592006503', 's629865346'] | [24932.0, 24988.0] | [547.0, 537.0] | [236, 237] |
p02595 | u928784113 | 2,000 | 1,048,576 | We have N points in the two-dimensional plane. The coordinates of the i-th point are (X_i,Y_i). Among them, we are looking for the points such that the distance from the origin is at most D. How many such points are there? We remind you that the distance between the origin and the point (p, q) can be represented as \... | ['import itertools\nfrom collections import deque,defaultdict,Counter\nfrom itertools import accumulate\nimport bisect\nfrom heapq import heappop,heappush,heapify\nimport math\nfrom copy import deepcopy\nimport queue\nimport numpy as np\n\nMod = 1000000007\nfact = [1, 1]\nfactinv = [1, 1]\ninv = [0, 1] \nfor i in range... | ['Wrong Answer', 'Accepted'] | ['s304999202', 's006982425'] | [75620.0, 75808.0] | [922.0, 956.0] | [2263, 2268] |
p02595 | u945065638 | 2,000 | 1,048,576 | We have N points in the two-dimensional plane. The coordinates of the i-th point are (X_i,Y_i). Among them, we are looking for the points such that the distance from the origin is at most D. How many such points are there? We remind you that the distance between the origin and the point (p, q) can be represented as \... | ['n ,d = map(int,input().split())\n\nans = 0\nfor i in range(n):\n x,y = map(int,input().split())\n if d <= x + y:\n ans += 1\n\nprint(ans)', 'n ,d = map(int,input().split())\n\nans = 0\nfor i in range(n):\n x,y = map(int,input().split())\n if d**2 >= x**2 + y**2 :\n ans += 1\n\nprint(ans)'] | ['Wrong Answer', 'Accepted'] | ['s874912138', 's122216376'] | [9180.0, 9188.0] | [362.0, 474.0] | [142, 152] |
p02595 | u957764821 | 2,000 | 1,048,576 | We have N points in the two-dimensional plane. The coordinates of the i-th point are (X_i,Y_i). Among them, we are looking for the points such that the distance from the origin is at most D. How many such points are there? We remind you that the distance between the origin and the point (p, q) can be represented as \... | ['import math\n\nN, D = int(input().split())\nP = []\nfor n in N:\n X_n, Y_n = int(input().split())\n P.append((X_n, Y_n))\n\ndef distance(p:tuple):\n # d_2 = p[0] ** 2 + p[1] ** 2\n # d = math.sqrt(d_2)\n return math.sqrt(p[0] ** 2 + p[1] ** 2)\n\ncount = [p for p in P if distance(p) <= D]\nprint(len(co... | ['Runtime Error', 'Accepted'] | ['s884472660', 's319792026'] | [9068.0, 37228.0] | [24.0, 528.0] | [309, 267] |
p02595 | u960201620 | 2,000 | 1,048,576 | We have N points in the two-dimensional plane. The coordinates of the i-th point are (X_i,Y_i). Among them, we are looking for the points such that the distance from the origin is at most D. How many such points are there? We remind you that the distance between the origin and the point (p, q) can be represented as \... | ['from sys import stdin\n\nn, d = stdin.readline().rstrip().split()\n\nn = int(n)\nd = int(d)\n\ndata = [stdin.readline().rstrip().split() for _ in range(n)]\n\ncount = 0\nfor i in range(n):\n if int(data[i][0]) * int(data[i][0]) + int(data[i][1]) * int(data[i][1]) < d + 1:\n count = count + 1\n\nprint(count)\n\n',... | ['Wrong Answer', 'Accepted'] | ['s278774511', 's146211352'] | [67644.0, 67656.0] | [425.0, 488.0] | [300, 319] |
p02595 | u963915126 | 2,000 | 1,048,576 | We have N points in the two-dimensional plane. The coordinates of the i-th point are (X_i,Y_i). Among them, we are looking for the points such that the distance from the origin is at most D. How many such points are there? We remind you that the distance between the origin and the point (p, q) can be represented as \... | ['n,d=map(int,input())\ncnt=0\nfor i in range(n):\n x,y =map(int,input())\n if x**2+y**2 <= d**2:\n cnt+=1\nprint(cnt)', 'n,d=map(int,input().split())\ncnt=0\nfor i in range(n):\n x,y =map(int,input().split())\n if x**2+y**2 <= d**2:\n cnt+=1\nprint(cnt)\n'] | ['Runtime Error', 'Accepted'] | ['s985951344', 's623678846'] | [9128.0, 9172.0] | [25.0, 475.0] | [115, 132] |
p02595 | u970082363 | 2,000 | 1,048,576 | We have N points in the two-dimensional plane. The coordinates of the i-th point are (X_i,Y_i). Among them, we are looking for the points such that the distance from the origin is at most D. How many such points are there? We remind you that the distance between the origin and the point (p, q) can be represented as \... | ['n,d = (int(x) for x in input().split())\ncount = 0\nfor i in range(n):\n x,y = (int(x) for x in input().split())\n if x**2*y**2<=d**2:\n count += 1\nprint(count)', 'n,d = (int(x) for x in input().split())\ncount = 0\nfor i in range(n):\n x,y = (int(x) for x in input().split())\n if x**2+y**2<=d**2:... | ['Wrong Answer', 'Accepted'] | ['s928850482', 's339792478'] | [9100.0, 9136.0] | [500.0, 501.0] | [168, 168] |
p02595 | u974402118 | 2,000 | 1,048,576 | We have N points in the two-dimensional plane. The coordinates of the i-th point are (X_i,Y_i). Among them, we are looking for the points such that the distance from the origin is at most D. How many such points are there? We remind you that the distance between the origin and the point (p, q) can be represented as \... | ['N,D = (int(x) for x in input().split())\ncount = 0\nfor i in range(N):\n x,y = (int(x) for x in input().split())\n sqdist = x**2 + y**2\n if sqdist < D**2:\n count += 1\nprint(count)', 'N,D = (int(x) for x in input().split())\ncount = 0\nfor i in range(N):\n x,y = (int(z) for z in input().split())\n sqdist = ... | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s095781503', 's468631418', 's092901169'] | [9132.0, 9048.0, 9028.0] | [512.0, 506.0, 516.0] | [181, 181, 178] |
p02595 | u975997984 | 2,000 | 1,048,576 | We have N points in the two-dimensional plane. The coordinates of the i-th point are (X_i,Y_i). Among them, we are looking for the points such that the distance from the origin is at most D. How many such points are there? We remind you that the distance between the origin and the point (p, q) can be represented as \... | ['import math\nX, D = map(int, input().split())\nn = 0\nfor i in range(N):\n x, y = map(int, input().split())\n if math.sqrt(x**2+y**2) <= D:\n n += 1\nprint(n)', 'import math\nN, D = map(int, input().split())\nn = 0\nfor i in range(N):\n x, y = map(int, input().split())\n if math.sqrt(x**2+y**2) <= D:\n n +=... | ['Runtime Error', 'Accepted'] | ['s687566004', 's233287531'] | [9076.0, 9192.0] | [28.0, 472.0] | [156, 157] |
p02595 | u988466483 | 2,000 | 1,048,576 | We have N points in the two-dimensional plane. The coordinates of the i-th point are (X_i,Y_i). Among them, we are looking for the points such that the distance from the origin is at most D. How many such points are there? We remind you that the distance between the origin and the point (p, q) can be represented as \... | ['def lineFromPoints(P,Q): \n \n a = Q[1] - P[1] \n b = P[0] - Q[0] \n c = a*(P[0]) + b*(P[1]) \n \n if(b<0): \n print("The line passing through points P and Q is:", \n a ,"x ",b ,"y = ",c ,"\\n") \n else: \n print("The line passing through points P and Q is: ", \n ... | ['Runtime Error', 'Accepted'] | ['s941272431', 's482518919'] | [9208.0, 8920.0] | [29.0, 495.0] | [677, 201] |
p02595 | u988466682 | 2,000 | 1,048,576 | We have N points in the two-dimensional plane. The coordinates of the i-th point are (X_i,Y_i). Among them, we are looking for the points such that the distance from the origin is at most D. How many such points are there? We remind you that the distance between the origin and the point (p, q) can be represented as \... | ['[N, D] = input().split()\ns = 0\nD = int(D)\nfor i in range(N):\n [X, Y] = input().split()\n X = int(X)\n Y = int(Y)\n Z = X**2 + Y**2\n if Z <= D**2:\n s +=1\nprint(s) ', '[N, D] = input().split()\ns = 0\nD = int(D)\nD = D**2\nfor i in range(N):\n [X, Y] = input().split()\n X = int... | ['Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted'] | ['s349285483', 's710085710', 's784080412', 's251295788'] | [9184.0, 9200.0, 9196.0, 9144.0] | [24.0, 24.0, 25.0, 472.0] | [188, 195, 185, 206] |
p02595 | u990957471 | 2,000 | 1,048,576 | We have N points in the two-dimensional plane. The coordinates of the i-th point are (X_i,Y_i). Among them, we are looking for the points such that the distance from the origin is at most D. How many such points are there? We remind you that the distance between the origin and the point (p, q) can be represented as \... | ['i1 = input()\ni2 = int(i1.split(" ")[0])\ni3 = int(i1.split(" ")[1])\ni4 = 0\ni5 = 0\ni6 = 0\nli = []\nfor i in range(i2):\n i4 = input().split(" ")\n i5 = (int(i4[1]) ** 2 - int(i4[0]) ** 2) ** 0.5\n if i3 >= abs(i5):\n i6 += 1\nprint(i6)', 'i1 = input()\ni2 = int(i1.split(" ")[0])\ni3 = int(i1.split(" ")[1])\... | ['Wrong Answer', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted'] | ['s289337025', 's327139568', 's420742271', 's972798331', 's337086879'] | [9652.0, 9044.0, 9524.0, 9208.0, 9620.0] | [572.0, 29.0, 414.0, 29.0, 406.0] | [233, 235, 230, 229, 237] |
p02595 | u991641236 | 2,000 | 1,048,576 | We have N points in the two-dimensional plane. The coordinates of the i-th point are (X_i,Y_i). Among them, we are looking for the points such that the distance from the origin is at most D. How many such points are there? We remind you that the distance between the origin and the point (p, q) can be represented as \... | ['n,d=list(map(int,input().split()))\ncnt=0\nfor i in range(n):\n x,y=list(map(int,input().split()))\n if (x**2+y**2)==d**2:\n cnt+=1\nprint(cnt)\n ', 'n,d=list(map(int,input().split()))\ncnt=0\nfor i in range(n):\n x,y=list(map(int,input().split()))\n if (x**2+y**2)<=d**2:\n cnt+=1\nprint(cnt)'] | ['Wrong Answer', 'Accepted'] | ['s055329485', 's776244866'] | [9072.0, 9116.0] | [504.0, 508.0] | [145, 142] |
p02595 | u994935583 | 2,000 | 1,048,576 | We have N points in the two-dimensional plane. The coordinates of the i-th point are (X_i,Y_i). Among them, we are looking for the points such that the distance from the origin is at most D. How many such points are there? We remind you that the distance between the origin and the point (p, q) can be represented as \... | ['import math\nN,D = map(int,input().split())\n\nans = 0\nfor i in range(N):\n x,y = map(int,input().split())\n d = math.sprt(x**2 + y**2)\n if d <= D:\n ans += 1\nprint(ans)', 'import math\nN,D = map(int,input().split())\n \nans = 0\nfor i in range(N):\n x,y = map(int,input().split())\n d = math.sqrt(x**2 + y*... | ['Runtime Error', 'Accepted'] | ['s470169453', 's760789021'] | [9108.0, 9112.0] | [30.0, 479.0] | [169, 170] |
p02595 | u995109095 | 2,000 | 1,048,576 | We have N points in the two-dimensional plane. The coordinates of the i-th point are (X_i,Y_i). Among them, we are looking for the points such that the distance from the origin is at most D. How many such points are there? We remind you that the distance between the origin and the point (p, q) can be represented as \... | ['I=lambda:list(map(int,input().split()))\nn,d=I()\ndef ch(a,b):\n return a**2+b**2\nans=0\nfor i in range(n):\n x,y=I()\n if ch(x,y)<=d:\n ans+=1\nprint(ans)\n \n ', 'I=lambda:list(map(int,input().spilt()))\nn,d=I()\ndef ch(a,b):\n return a**2+b**2\nans=0\nfor i in range(n):\n x,y=I()\n ... | ['Wrong Answer', 'Runtime Error', 'Accepted'] | ['s469026138', 's864281534', 's329362231'] | [9180.0, 9048.0, 9180.0] | [493.0, 28.0, 519.0] | [173, 173, 175] |
p02595 | u997036872 | 2,000 | 1,048,576 | We have N points in the two-dimensional plane. The coordinates of the i-th point are (X_i,Y_i). Among them, we are looking for the points such that the distance from the origin is at most D. How many such points are there? We remind you that the distance between the origin and the point (p, q) can be represented as \... | ['n,d = map(int,input().split())\nl = []\nfor i in range(n):\n x,y = map(int,input().split())\n l.append([x,y])\nans = 0\nfor j in l:\n if j[0]**2 + j[1]**2 < d**2:\n ans += 1\nprint(ans)', 'n,d = map(int,input().split())\nl = []\nfor i in range(n):\n x,y = map(int,input().split())\n l.append([x,y])\nans = 0\nf... | ['Wrong Answer', 'Accepted'] | ['s146440073', 's489051187'] | [38928.0, 39056.0] | [563.0, 661.0] | [182, 183] |
p02595 | u998867748 | 2,000 | 1,048,576 | We have N points in the two-dimensional plane. The coordinates of the i-th point are (X_i,Y_i). Among them, we are looking for the points such that the distance from the origin is at most D. How many such points are there? We remind you that the distance between the origin and the point (p, q) can be represented as \... | ['\nfor i in range(n):\n x,y = map(int,input().split())\n if x**2 + y**2 <= d**2:\n s += 1\nprint(s)', 'n,d = map(int,input().split())\n\ns = 0\n\nfor i in range(n):\n x,y = map(int,input().split())\n if x**2 + y**2 <= d**2:\n s += 1\nprint(s)'] | ['Runtime Error', 'Accepted'] | ['s833623736', 's017159938'] | [8968.0, 9204.0] | [28.0, 501.0] | [106, 144] |
p02595 | u999287037 | 2,000 | 1,048,576 | We have N points in the two-dimensional plane. The coordinates of the i-th point are (X_i,Y_i). Among them, we are looking for the points such that the distance from the origin is at most D. How many such points are there? We remind you that the distance between the origin and the point (p, q) can be represented as \... | ['import math\nN, D = map(int, input().split())\nP = [list(map(int, input().split()) for _ in range(N))]\n\ncnt = 0\nfor i in range(N):\n d = math.sqrt(P[0]**2 + P[1]**2)\n if d <= D:\n cnt += 1', 'import math\nN, D = map(int, input().split())\nP = [list(map(int, input().split()) for _ in range(N))]\n\ncnt... | ['Runtime Error', 'Runtime Error', 'Accepted'] | ['s375553596', 's686376593', 's754399758'] | [96124.0, 96080.0, 45432.0] | [762.0, 755.0, 574.0] | [197, 209, 224] |
p02596 | u023077142 | 2,000 | 1,048,576 | Takahashi loves the number 7 and multiples of K. Where is the first occurrence of a multiple of K in the sequence 7,77,777,\ldots? (Also see Output and Sample Input/Output below.) If the sequence contains no multiples of K, print `-1` instead. | ['def main():\n K = int(input())\n\n if K % 2 == 0:\n v = 7\n for i in range(1, 1000000):\n if v % K == 0:\n print(i)\n return\n\n v = (v * 10 + 7) % K\n \n print(-1)\n\nmain()\n', 'def main():\n K = int(input())\n\n v = 7\n for ... | ['Wrong Answer', 'Accepted'] | ['s797959998', 's128072374'] | [9160.0, 9172.0] | [152.0, 161.0] | [243, 200] |
p02596 | u029399657 | 2,000 | 1,048,576 | Takahashi loves the number 7 and multiples of K. Where is the first occurrence of a multiple of K in the sequence 7,77,777,\ldots? (Also see Output and Sample Input/Output below.) If the sequence contains no multiples of K, print `-1` instead. | ['n = int(input())\nif n%2==0 or n%5==0:\n print(-1)\nelse:\n a = 7\n flag = 0\n while flag==0:\n if a%n==0:\n print(count+1)\n flag = 1\n else:\n count+=1\n a = a*10\n a = a+7\n a = a%n', 'n = int(input())\nif n%2==0 or n%5==0:\n print(-1)\nelse:\n a = 7\n flag = 0\n while f... | ['Runtime Error', 'Runtime Error', 'Accepted'] | ['s127966254', 's778679325', 's734384161'] | [9132.0, 9040.0, 9164.0] | [30.0, 31.0, 220.0] | [210, 208, 115] |
p02596 | u040660107 | 2,000 | 1,048,576 | Takahashi loves the number 7 and multiples of K. Where is the first occurrence of a multiple of K in the sequence 7,77,777,\ldots? (Also see Output and Sample Input/Output below.) If the sequence contains no multiples of K, print `-1` instead. | ['# # 1 <= K <= 10^6\n# K = int(input())\n\n#\n# import math\n#\n\n\n# math.gcd(101, 7777)\n#\n#\n# row = \'\'\n\n# row = row + \'7\'\n# n_row = int(row)\n# print(n_row)\n#\n# if n_row % K == 0:\n# print(i + 1)\n# break\n\n# print("-1")\n\nk = int(input())\nif k==1 or k==7:\n pr... | ['Wrong Answer', 'Accepted'] | ['s057496176', 's610222592'] | [9916.0, 9116.0] | [559.0, 266.0] | [622, 606] |
p02596 | u050779044 | 2,000 | 1,048,576 | Takahashi loves the number 7 and multiples of K. Where is the first occurrence of a multiple of K in the sequence 7,77,777,\ldots? (Also see Output and Sample Input/Output below.) If the sequence contains no multiples of K, print `-1` instead. | ['import math\nimport time\nimport sys\n\nsys.setrecursionlimit(5000)\ndef judge_debisible(K, seven_number):\n gcd_number = math.gcd(K,seven_number)\n elapsed_time = time.time() - start_time\n print(elapsed_time)\n if elapsed_time > 0.1:\n print("-1")\n elif gcd_number == 1 :\n judge_debisi... | ['Runtime Error', 'Accepted'] | ['s060403452', 's075683203'] | [19012.0, 9108.0] | [64.0, 224.0] | [444, 280] |
p02596 | u068538925 | 2,000 | 1,048,576 | Takahashi loves the number 7 and multiples of K. Where is the first occurrence of a multiple of K in the sequence 7,77,777,\ldots? (Also see Output and Sample Input/Output below.) If the sequence contains no multiples of K, print `-1` instead. | ['count = 0\nbefore = 0\nif k%2 == 0 or k%5==0:\n print(-1)\n exit()\n\nai=0\ni=0\nwhile True:\n ai = (ai*10+7)%k\n i += 1\n if ai == 0:\n print(i)\n break', 'k = int(input())\ncount = 0\nbefore = 0\nif k % 2 == 0 or k % 5 == 0:\n print(-1)\n exit()\n\nai = 0\ni = 0\nwhile True:\n ... | ['Runtime Error', 'Accepted'] | ['s279058019', 's739169587'] | [9112.0, 9112.0] | [26.0, 202.0] | [169, 198] |
p02596 | u068862829 | 2,000 | 1,048,576 | Takahashi loves the number 7 and multiples of K. Where is the first occurrence of a multiple of K in the sequence 7,77,777,\ldots? (Also see Output and Sample Input/Output below.) If the sequence contains no multiples of K, print `-1` instead. | ['K = int(input())\nans = 1\nX = 7\ncnt = K\nwhile(cnt > 0):\n\n rem = X % K\n if rem == 0:\n print(ans)\n break\n else:\n remlst.append(rem)\n ans += 1\n X = rem*10 + 7 \n cnt -= 1\n\nif rem != 0:\n print(-1)', 'K = int(input())\nans = 1\nX = 7\ncnt = K\nwhile(cnt ... | ['Runtime Error', 'Runtime Error', 'Accepted'] | ['s600242692', 's903973556', 's071859952'] | [9176.0, 9108.0, 9180.0] | [27.0, 23.0, 306.0] | [277, 277, 250] |
p02596 | u069699931 | 2,000 | 1,048,576 | Takahashi loves the number 7 and multiples of K. Where is the first occurrence of a multiple of K in the sequence 7,77,777,\ldots? (Also see Output and Sample Input/Output below.) If the sequence contains no multiples of K, print `-1` instead. | ['K=int(input())\ncount=0\nresult = -1\nfor i in range(K):\n count =(10*count+7)%K\n if count%K==0:\n result = i+1\nprint(result)', 'K=int(input())\ncount=0\nresult = -1\nfor i in range(K):\n count =(10*count+7)%K\n if count%K==0:\n result = i+1\nprint(result)', 'K=int(input())\n\ncount=0\nres... | ['Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s248290535', 's689288365', 's720310251', 's787635866', 's103675119'] | [9108.0, 9172.0, 9008.0, 9148.0, 9084.0] | [208.0, 206.0, 185.0, 178.0, 132.0] | [133, 152, 133, 150, 180] |
p02596 | u069707486 | 2,000 | 1,048,576 | Takahashi loves the number 7 and multiples of K. Where is the first occurrence of a multiple of K in the sequence 7,77,777,\ldots? (Also see Output and Sample Input/Output below.) If the sequence contains no multiples of K, print `-1` instead. | ['x = int(input())\ni = 1\nn= 0\nif x % 2 or x % 5 == 0:\n print(-1)\nelse:\n for i in range(1, 1000000):\n\n l = 7 * (10**i - 1) // 9\n n+=1\n if l % x == 0:\n break\n print(n)\n', 'k = int(input())\na=0\nfor i in range (1,10**6):\n a=10*a+7\n a%=k\n if a==0:\n an... | ['Wrong Answer', 'Accepted'] | ['s705837218', 's916876477'] | [9132.0, 9048.0] | [2205.0, 247.0] | [205, 141] |
p02596 | u072717685 | 2,000 | 1,048,576 | Takahashi loves the number 7 and multiples of K. Where is the first occurrence of a multiple of K in the sequence 7,77,777,\ldots? (Also see Output and Sample Input/Output below.) If the sequence contains no multiples of K, print `-1` instead. | ["import sys\nread = sys.stdin.read\nreadlines = sys.stdin.readlines\nfrom math import sqrt\nfrom collections import defaultdict\ndef main():\n k = int(input())\n if k % 2 == 0 or k % 5 == 0:\n print(-1)\n sys.exit()\n p = 7\n plus = 7\n amari = set()\n r = 1\n while p != 0:\n ... | ['Wrong Answer', 'Accepted'] | ['s772061011', 's498803064'] | [78152.0, 92812.0] | [385.0, 512.0] | [555, 605] |
p02596 | u075317232 | 2,000 | 1,048,576 | Takahashi loves the number 7 and multiples of K. Where is the first occurrence of a multiple of K in the sequence 7,77,777,\ldots? (Also see Output and Sample Input/Output below.) If the sequence contains no multiples of K, print `-1` instead. | ["import math\n\ndef Repsept():\n \n num = int(input())\n\n seven_yes = num % 7\n eleven_yes = num % 11\n mod_value = 1\n\n count = 1\n \n if num % 2 != 0 and num % 5 != 0:\n \n if not is_prime(num):\n \n while mod_value != 0:\n value = 7*(pow(10, count... | ['Runtime Error', 'Wrong Answer', 'Accepted'] | ['s014386570', 's111888975', 's917038860'] | [9112.0, 9192.0, 9176.0] | [29.0, 37.0, 133.0] | [788, 837, 250] |
p02596 | u080685822 | 2,000 | 1,048,576 | Takahashi loves the number 7 and multiples of K. Where is the first occurrence of a multiple of K in the sequence 7,77,777,\ldots? (Also see Output and Sample Input/Output below.) If the sequence contains no multiples of K, print `-1` instead. | ['k = int(input())\nt = 7\nkou = 1\n\nif k % 2 != 0:\n if k % 5 != 0:\n while True:\n kou += 1\n t = 10 * t + 7\n \n if t % k == 0:\n print(kou)\n break\n\nprint(-1)\n', 'k = int(input())\nt = 7\nkou = 1\n\nwhile t % k == 0:\n kou += 1\n t = 10 * t + 7\n \nprint(kou)', 'K = int(input(... | ['Runtime Error', 'Wrong Answer', 'Accepted'] | ['s590217488', 's797904447', 's843363526'] | [8932.0, 9116.0, 9100.0] | [25.0, 2205.0, 188.0] | [176, 97, 174] |
p02596 | u080885857 | 2,000 | 1,048,576 | Takahashi loves the number 7 and multiples of K. Where is the first occurrence of a multiple of K in the sequence 7,77,777,\ldots? (Also see Output and Sample Input/Output below.) If the sequence contains no multiples of K, print `-1` instead. | ['import math\nt = int(input())\nif t%2==0 or t%5==0:\n print(-1)\nelse:\n i=1\n s=7%t\n while 1:\n if (s%t)==0:\n print(i)\n break\n i += 1\n\n s = (s * 10 + 7)%t\n print(s)\n continue', 'import math\nt = int(input())\nif t%2==0 or t%5==0:\n print... | ['Wrong Answer', 'Accepted'] | ['s063328781', 's810318947'] | [9940.0, 9176.0] | [560.0, 238.0] | [237, 221] |
p02596 | u087118202 | 2,000 | 1,048,576 | Takahashi loves the number 7 and multiples of K. Where is the first occurrence of a multiple of K in the sequence 7,77,777,\ldots? (Also see Output and Sample Input/Output below.) If the sequence contains no multiples of K, print `-1` instead. | ['k=int(input())\n\nl=[]\nfor i in range(1,k+1):\n x=7%k\n num=(x*10+7)%k\n x=num\n l.append(num)\n if num==0:\n \tprint(i)\n break\n if 0 not in l:\n print(-1)', 'import sys\nk=int(input())\nl=[]\nx=7%k\nif x == 0:\n print(1)\nsys.exit()\nfor i in range(2,k+1):\n x=7%k\n num=(x*10+7)%k\n x=num\n l.ap... | ['Runtime Error', 'Wrong Answer', 'Wrong Answer', 'Runtime Error', 'Wrong Answer', 'Runtime Error', 'Wrong Answer', 'Accepted'] | ['s111602958', 's172380167', 's239676887', 's260082463', 's508914663', 's679844566', 's827234876', 's735748123'] | [8928.0, 9120.0, 16896.0, 8960.0, 16956.0, 9032.0, 48628.0, 48572.0] | [23.0, 31.0, 288.0, 33.0, 298.0, 23.0, 300.0, 307.0] | [158, 204, 154, 154, 206, 190, 152, 198] |
p02596 | u092104621 | 2,000 | 1,048,576 | Takahashi loves the number 7 and multiples of K. Where is the first occurrence of a multiple of K in the sequence 7,77,777,\ldots? (Also see Output and Sample Input/Output below.) If the sequence contains no multiples of K, print `-1` instead. | ['k = int(input())\nd1 = k % 10\nmae = 0\nsd = [0]*10\ncnt = 0\nif not d1 in (1, 3, 7, 9):\n print(-1)\n exit()\nfor i in range(1,10) :\n sd[d1 * i % 10] = i\nprint(sd)\n\nd2 = 7 - mae % 10\ns = str(sd[d2] * k)\nfor j in range(9):\n print("s1=",s)\n for i in range(len(s)-1, -1, -1):\n print("s[",i,"]=",s[i])\n ... | ['Wrong Answer', 'Runtime Error', 'Accepted'] | ['s233995994', 's591846873', 's784254067'] | [9232.0, 9164.0, 9224.0] | [28.0, 24.0, 1017.0] | [487, 167, 538] |
p02596 | u094191970 | 2,000 | 1,048,576 | Takahashi loves the number 7 and multiples of K. Where is the first occurrence of a multiple of K in the sequence 7,77,777,\ldots? (Also see Output and Sample Input/Output below.) If the sequence contains no multiples of K, print `-1` instead. | ['k=int(input())\n\nif k%2==0 or k%5==0:\n print(-1)\n exit()\n\nnum=7\nnum%=k\nans=1\n\nwhile k!=0:\n num=(10*num+7)%k+7\n\nprint(ans)', 'k=int(input())\n\nif k%2==0 or k%5==0:\n print(-1)\n exit()\n\nans=1\nnum=7\nwhile num%k!=0:\n num=10*num+7\n num%=k\n ans+=1\n\nprint(ans)'] | ['Time Limit Exceeded', 'Accepted'] | ['s160544907', 's355383101'] | [9084.0, 9092.0] | [2206.0, 247.0] | [123, 131] |
p02596 | u094213642 | 2,000 | 1,048,576 | Takahashi loves the number 7 and multiples of K. Where is the first occurrence of a multiple of K in the sequence 7,77,777,\ldots? (Also see Output and Sample Input/Output below.) If the sequence contains no multiples of K, print `-1` instead. | ['a = 7\nb = int(inout())\n\nlist = [7]\nfor i in range(b):\n list.append(list[-1]*10 +7)\n\nfor l in range(len(list)):\n if list[l] % b == 0:\n print(l+1)\n exit()\n', 's = 7\na = int(input())\n\nfor i in range(10**6):\n if s%a == 0:\n print(i+1)\n exit()\n s = (s*10+7) % a\npri... | ['Runtime Error', 'Accepted'] | ['s889340837', 's230738334'] | [9064.0, 9072.0] | [26.0, 213.0] | [173, 129] |
p02596 | u098436028 | 2,000 | 1,048,576 | Takahashi loves the number 7 and multiples of K. Where is the first occurrence of a multiple of K in the sequence 7,77,777,\ldots? (Also see Output and Sample Input/Output below.) If the sequence contains no multiples of K, print `-1` instead. | ['import numpy as np\nK=int(input()) \n\nS=""\ncount=-1\n\nfor i in range(K):\n S += "7"\n M = int(S)\n if( M%K == 0):\n count = i\n break\n\nprint(count)', 'import numpy as np\nK=int(input()) \n\nS=""\ncount=-1\n\nfor i in range(K):\n S += "7"\n M = int(S):\n if( M%K == 0):\n count = i+1\n break\n\np... | ['Wrong Answer', 'Runtime Error', 'Accepted'] | ['s205395390', 's562221514', 's421146780'] | [27148.0, 8892.0, 27136.0] | [2206.0, 22.0, 366.0] | [148, 151, 152] |
p02596 | u102655885 | 2,000 | 1,048,576 | Takahashi loves the number 7 and multiples of K. Where is the first occurrence of a multiple of K in the sequence 7,77,777,\ldots? (Also see Output and Sample Input/Output below.) If the sequence contains no multiples of K, print `-1` instead. | ["import sys\nk = int(input())\n\nremainders = set()\ncurrent_remainder = 7 % k\nremainders.add(current_remainder)\n\ncounter = 1\nwhile True:\n counter += 1\n remainder = remainder * 10 % k\n if remainder in remainders:\n print('-1')\n sys.exit()\n remainders.add(remainder)\n print(remaind... | ['Runtime Error', 'Runtime Error', 'Wrong Answer', 'Accepted'] | ['s004276929', 's250721671', 's877827899', 's268116562'] | [9184.0, 138916.0, 9116.0, 77748.0] | [36.0, 2842.0, 30.0, 488.0] | [382, 366, 368, 313] |
p02596 | u104282757 | 2,000 | 1,048,576 | Takahashi loves the number 7 and multiples of K. Where is the first occurrence of a multiple of K in the sequence 7,77,777,\ldots? (Also see Output and Sample Input/Output below.) If the sequence contains no multiples of K, print `-1` instead. | ['def solve(k):\n a_mod = 0\n for i in range(1000000):\n a_mod += 7 * pow(10, i, k)\n a_mod %= k\n if a_mod == 0:\n return i + 1\n return -1\n\n\ndef main():\n k = int(input())\n res = solve(k)\n print(res)\n\n\ndef test():\n assert solve(101) == 4\n assert solve(... | ['Time Limit Exceeded', 'Accepted'] | ['s827424219', 's744508981'] | [8832.0, 9072.0] | [2206.0, 456.0] | [395, 440] |
p02596 | u104405612 | 2,000 | 1,048,576 | Takahashi loves the number 7 and multiples of K. Where is the first occurrence of a multiple of K in the sequence 7,77,777,\ldots? (Also see Output and Sample Input/Output below.) If the sequence contains no multiples of K, print `-1` instead. | ['K = int(input())\nif K % 2 == 0:\n print(-1)\n\na = 0\nfor i in range(K):\n a = 7 * 10**(i) + a\n if a % K == 0:\n\n print(i)\n break\n\n else:\n continue', 'K = int(input())\n\nif K % 2 == 0:\n print(-1)\n\na = 0\nif K < 900000:\n for i in range(K):\n a = 7 * 10**(i) + a\n if a %... | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s424922330', 's673608850', 's473850950'] | [9172.0, 9084.0, 9100.0] | [2205.0, 2205.0, 137.0] | [168, 193, 152] |
p02596 | u108650331 | 2,000 | 1,048,576 | Takahashi loves the number 7 and multiples of K. Where is the first occurrence of a multiple of K in the sequence 7,77,777,\ldots? (Also see Output and Sample Input/Output below.) If the sequence contains no multiples of K, print `-1` instead. | ['#!/usr/bin/env python3\n\nk = int(input())\n\nif k % 2 == 0:\n print(-1)\n #print("a")\n exit(0)\n\nd1 = k % 10\nprint(d1)\nif d1 != 1 and d1 != 7 and d1 != 3 and d1 != 9:\n print(-1)\n #print("b")\n exit(0)\n\ndef PrimeJudge(n):\n ret = True\n for i in range(2, int(n ** 0.5)+1):\n if n... | ['Runtime Error', 'Accepted'] | ['s324611846', 's656264393'] | [9320.0, 9156.0] | [2205.0, 191.0] | [646, 172] |
p02596 | u109632368 | 2,000 | 1,048,576 | Takahashi loves the number 7 and multiples of K. Where is the first occurrence of a multiple of K in the sequence 7,77,777,\ldots? (Also see Output and Sample Input/Output below.) If the sequence contains no multiples of K, print `-1` instead. | ['\nk = int(input())\nans = 0\nai = 7\nfor i in range(k):\n ai = ((ai * 10) + 7) % k\n if ai == 0:\n ans = i\n break\n if i == k:\n ans = -1\n\nprint(ans)\n\n', 'k = int(input())\nans = 0\n\nai = 0\nfor i in range(k+2):\n ai = ((ai * 10) + 7) % k\n if ai == 0:\n ans = i + 1\n ... | ['Wrong Answer', 'Accepted'] | ['s596978291', 's010076823'] | [9056.0, 9060.0] | [208.0, 175.0] | [172, 176] |
p02596 | u112007848 | 2,000 | 1,048,576 | Takahashi loves the number 7 and multiples of K. Where is the first occurrence of a multiple of K in the sequence 7,77,777,\ldots? (Also see Output and Sample Input/Output below.) If the sequence contains no multiples of K, print `-1` instead. | ['k=int(input())\nk *= 9\namari = 63\nfor i in range(1, 10 ** 6 + 1):\n amari %= k\n if amari == 0:\n print(i)\n break\n else:\n amari = amari * 70 + 63\nelse:\n print(-1)', 'k=int(input())\nk *= 9\namari = 63\nfor i in range(1, 10 ** 6 + 1):\n amari %= k\n if amari == 0:\n print(i)\n break\n else... | ['Wrong Answer', 'Accepted'] | ['s493090630', 's441804420'] | [8996.0, 9096.0] | [203.0, 207.0] | [171, 171] |
p02596 | u121799456 | 2,000 | 1,048,576 | Takahashi loves the number 7 and multiples of K. Where is the first occurrence of a multiple of K in the sequence 7,77,777,\ldots? (Also see Output and Sample Input/Output below.) If the sequence contains no multiples of K, print `-1` instead. | ['import math\nx = int(input())\nif math.gcd(x, 10) != 1:\n\tprint(-1)\n\texit()\nphi = x\nq = x\nl = q\t\nfor i in range(3, int(math.sqrt(l)) + 1, 2):\n\tif q % i == 0:\n\t\tphi //= i\n\t\tphi *= (i - 1)\n\t\twhile q % i == 0:\n\t\t\tq //= i\nif q != 1:\n\tphi //= q\n\tphi *= (q - 1)\nprint(phi)', 'import math\nx = in... | ['Wrong Answer', 'Accepted'] | ['s054748127', 's427322621'] | [9200.0, 9176.0] | [30.0, 236.0] | [263, 161] |
p02596 | u123579949 | 2,000 | 1,048,576 | Takahashi loves the number 7 and multiples of K. Where is the first occurrence of a multiple of K in the sequence 7,77,777,\ldots? (Also see Output and Sample Input/Output below.) If the sequence contains no multiples of K, print `-1` instead. | ['K = int(input())\nif K%2==0 or K%5==0:\n print(-1)\nelse:\n n = 1\n while True:\n if 7*(10**n-1)/9%K==0:\n print(n)\n break', 'K = int(input())\nif K%2==0 or K%5==0:\n print(-1)\nelse:\n n = 1\n Rem = 7%K\n while Rem!=0:\n Rem = (Rem*10+7)%K\n n+=1\n print(n)'] | ['Time Limit Exceeded', 'Accepted'] | ['s926282104', 's488518776'] | [9220.0, 9172.0] | [2206.0, 203.0] | [131, 134] |
p02596 | u125348436 | 2,000 | 1,048,576 | Takahashi loves the number 7 and multiples of K. Where is the first occurrence of a multiple of K in the sequence 7,77,777,\ldots? (Also see Output and Sample Input/Output below.) If the sequence contains no multiples of K, print `-1` instead. | ['N=int(input())\n\ndef waru(N):\n if N%2==0:\n print("-1")\n return\n a="7"\n for i in range(1,100000000):\n ia=int(a)\n if N>ia:\n a+="7"\n continue\n if N%ia==0:\n print(i)\n return\n a+="7"\n\n print("-1")\n\nwaru(N)',... | ['Time Limit Exceeded', 'Accepted'] | ['s500126594', 's091798331'] | [9080.0, 48400.0] | [2205.0, 244.0] | [297, 280] |
p02596 | u137226361 | 2,000 | 1,048,576 | Takahashi loves the number 7 and multiples of K. Where is the first occurrence of a multiple of K in the sequence 7,77,777,\ldots? (Also see Output and Sample Input/Output below.) If the sequence contains no multiples of K, print `-1` instead. | ["k = int(input())\n\nif k%2 ==0:\n print(-1)\n\nfor i in range(1, 10**12):\n n = int(('7'*i))\n print(n)\n if n%k == 0:\n print(i)\n exit(0)\n\nprint(-1)", 'k = int(input())\n\nm = 0\n\nfor i in range(1, 10**6):\n n = m *10 +7\n m = n % k\n if m == 0:\n print(i)\n exit(... | ['Wrong Answer', 'Accepted'] | ['s431728180', 's130255420'] | [27884.0, 9100.0] | [2253.0, 215.0] | [166, 140] |
p02596 | u141419468 | 2,000 | 1,048,576 | Takahashi loves the number 7 and multiples of K. Where is the first occurrence of a multiple of K in the sequence 7,77,777,\ldots? (Also see Output and Sample Input/Output below.) If the sequence contains no multiples of K, print `-1` instead. | ['K = int(input())\nmod = []\na[0] = 7%K\nif a[0] == 0:\n print(a[0])\n exit()\nfor i in range(1,K+1):\n a[i] = (a[i-1]*10 + 7)%K\n if a[i] == 0:\n print("%d",a[i])\n break\n\nelse:\n print(-1)', 'K = int(input())\nk = str(K)\nnum = -1\n\nif K % 2 == 0:\n print("-1")\nelse:\n while Tr... | ['Runtime Error', 'Wrong Answer', 'Runtime Error', 'Runtime Error', 'Wrong Answer', 'Runtime Error', 'Accepted'] | ['s029262251', 's072388338', 's457330874', 's655190878', 's711099015', 's927353300', 's682113957'] | [9152.0, 9696.0, 9100.0, 9116.0, 9148.0, 9176.0, 9116.0] | [26.0, 2206.0, 28.0, 31.0, 178.0, 28.0, 175.0] | [207, 282, 205, 184, 139, 181, 134] |
p02596 | u152566588 | 2,000 | 1,048,576 | Takahashi loves the number 7 and multiples of K. Where is the first occurrence of a multiple of K in the sequence 7,77,777,\ldots? (Also see Output and Sample Input/Output below.) If the sequence contains no multiples of K, print `-1` instead. | ["def euclid(a, b):\n if b == 0:\n return a\n else:\n return euclid(b, a%b)\n\ndef main():\n\n k = int(input())\n if k % 2 == 0:\n print('-1')\n else:\n for i in range(1, k + 1):\n target = int('1' * i) * 7\n if euclid(target, k) != 1:\n pr... | ['Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s248241311', 's267153049', 's458153005', 's661266013'] | [27716.0, 9112.0, 9112.0, 48344.0] | [2243.0, 108.0, 29.0, 215.0] | [353, 185, 203, 316] |
p02596 | u152741807 | 2,000 | 1,048,576 | Takahashi loves the number 7 and multiples of K. Where is the first occurrence of a multiple of K in the sequence 7,77,777,\ldots? (Also see Output and Sample Input/Output below.) If the sequence contains no multiples of K, print `-1` instead. | ['k= int(input())\n \nif k % 2 == 0 or k % 5 == 0:\n print("-1")\n \nelse:\n ans = 1\n s = 7\n while True:\n if s % k == 0:\n print(ans)\n break\n else:\n s = (s % k)*10 + 7\n ans += 1', 'k= int(input())\n \nif k % 2 == 0 or k % 5 == 0:\n print... | ['Runtime Error', 'Accepted'] | ['s337798828', 's807005958'] | [9028.0, 9152.0] | [26.0, 250.0] | [243, 242] |
p02596 | u155687575 | 2,000 | 1,048,576 | Takahashi loves the number 7 and multiples of K. Where is the first occurrence of a multiple of K in the sequence 7,77,777,\ldots? (Also see Output and Sample Input/Output below.) If the sequence contains no multiples of K, print `-1` instead. | ["def main():\n k = int(input())\n init = 7%k\n an = [init]\n for _ in range(k):\n a = an[-1]\n an.append((10*a+7) % k)\n\n for ind, a in enumerate(an):\n if a==0:\n print(ind)\n return\n print(-1)\nif __name__ == '__main__':\n main()", "def main():\n k... | ['Wrong Answer', 'Accepted'] | ['s204087587', 's197820999'] | [48400.0, 48544.0] | [228.0, 230.0] | [282, 284] |
p02596 | u158380546 | 2,000 | 1,048,576 | Takahashi loves the number 7 and multiples of K. Where is the first occurrence of a multiple of K in the sequence 7,77,777,\ldots? (Also see Output and Sample Input/Output below.) If the sequence contains no multiples of K, print `-1` instead. | ['i = 0;\nmod = 0;\nwhile True:\n mod = (mod*10 + 7) % k;\n if mod == 0:\n break;\n i += 1;\n if i == k:\n j = -2\n break;\n\nprint(i+1)', 'k = int(input())\n\n\ni = 0;\nmod = 0;\nwhile True:\n mod = (mod*10 + 7) % k;\n print(mod)\n if mod == 0:\n break;\n i += 1;\n ... | ['Runtime Error', 'Wrong Answer', 'Accepted'] | ['s794777551', 's831568586', 's506817330'] | [9028.0, 9972.0, 9172.0] | [26.0, 527.0, 238.0] | [156, 190, 175] |
p02596 | u163529815 | 2,000 | 1,048,576 | Takahashi loves the number 7 and multiples of K. Where is the first occurrence of a multiple of K in the sequence 7,77,777,\ldots? (Also see Output and Sample Input/Output below.) If the sequence contains no multiples of K, print `-1` instead. | ['import sys\ndef input():\n return sys.stdin.readline()[:-1]\n\n\ndef main():\n K = int(input())\n x = 0\n if K % 2 == 0 or K % 5 == 0:\n print(-1)\n \n while True:\n x = (x * 10 + 7) % K\n i += 1\n if x == 0:\n print(i + 1)\n break\n\n\n \n\nif __n... | ['Runtime Error', 'Accepted'] | ['s774094880', 's333132857'] | [9180.0, 9108.0] | [23.0, 135.0] | [328, 351] |
p02596 | u166340293 | 2,000 | 1,048,576 | Takahashi loves the number 7 and multiples of K. Where is the first occurrence of a multiple of K in the sequence 7,77,777,\ldots? (Also see Output and Sample Input/Output below.) If the sequence contains no multiples of K, print `-1` instead. | ['K=int(input())\nm=7\ncount=1\nflag=0\nfor i in range(K):\n if m%K==0:\n flag=1\n break\n else:\n m*=10\n m+=7\n m%=K\n count+=1\nif flag:\n print("-1")\nelse:\n print(count)', 'K=int(input())\nm=7\ncount=1\nflag=0\nfor i in range(K):\n if m%K==0:\n flag=1\n break\n else:\n m*=10\n ... | ['Wrong Answer', 'Accepted'] | ['s830932168', 's556824241'] | [9032.0, 9172.0] | [341.0, 344.0] | [179, 183] |
p02596 | u167681994 | 2,000 | 1,048,576 | Takahashi loves the number 7 and multiples of K. Where is the first occurrence of a multiple of K in the sequence 7,77,777,\ldots? (Also see Output and Sample Input/Output below.) If the sequence contains no multiples of K, print `-1` instead. | ['k = int(input())\n\nif k % 2 == 0:\n print(-1)\n exit()\n\na = [7]\nans = 0\nfor i in a:\n if i % k == 0:\n ans += 1\n break\n else:\n a += [i*10 + 7]\n ans += 1\n ', 'k = int(input())\n\nif k % 2 == 0:\n print(-1)\n exit()\n\na = [7]\nans = 0\nfor i in a:\n if i % k == 0:\n ans += 1\n bre... | ['Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s030392986', 's757491916', 's895290227', 's458789964'] | [604096.0, 9172.0, 9168.0, 9116.0] | [2221.0, 28.0, 29.0, 309.0] | [168, 176, 188, 215] |
p02596 | u171654347 | 2,000 | 1,048,576 | Takahashi loves the number 7 and multiples of K. Where is the first occurrence of a multiple of K in the sequence 7,77,777,\ldots? (Also see Output and Sample Input/Output below.) If the sequence contains no multiples of K, print `-1` instead. | ['import copy\n\n# a = get_int()\ndef get_int():\n return int(input())\n\n# a = get_string()\ndef get_string():\n return input()\n\n\ndef get_int_list():\n return [int(x) for x in input().split()]\n\n\ndef get_string_list():\n return input().split()\n\n\ndef get_int_multi(): \n return map(int, input().s... | ['Wrong Answer', 'Accepted'] | ['s836139790', 's057112571'] | [9348.0, 9260.0] | [1844.0, 183.0] | [898, 1054] |
p02596 | u192165107 | 2,000 | 1,048,576 | Takahashi loves the number 7 and multiples of K. Where is the first occurrence of a multiple of K in the sequence 7,77,777,\ldots? (Also see Output and Sample Input/Output below.) If the sequence contains no multiples of K, print `-1` instead. | ["K=int(input())\ni=0\nif K%2==0 or K%5==0:\n print('-1')\nelse:\n for d in range(K):\n i=(10*i+7)%K\n if i==0:\n print(i+1)\n break\n", "\nK=int(input())\ni=0\nif K%2==0 or K%5==0:\n print('-1')\n\nelse:\n for d in range(K):\n i=(10*i+7)%K\n if i==0:\n ... | ['Wrong Answer', 'Accepted'] | ['s897053527', 's383678832'] | [9164.0, 9092.0] | [180.0, 181.0] | [164, 166] |
p02596 | u193927973 | 2,000 | 1,048,576 | Takahashi loves the number 7 and multiples of K. Where is the first occurrence of a multiple of K in the sequence 7,77,777,\ldots? (Also see Output and Sample Input/Output below.) If the sequence contains no multiples of K, print `-1` instead. | ['K=input()\nketa = len(K)\nk=int(K)\nif k%2==0:\n print(-1)\nelse:\n seven = "7"*keta\n s = int(seven)\n ans=0\n while (1):\n ans+=1\n s = s%k\n if s==0:\n print(ans)\n break\n else:\n s = s*10+7', 'k=int(input())\nif k%2==0 or k%5==0:\n print(-1)\nelse:\n s=7\n for i in range(k):\n ... | ['Wrong Answer', 'Accepted'] | ['s021364801', 's565705225'] | [9212.0, 9000.0] | [2206.0, 215.0] | [210, 155] |
p02596 | u195355592 | 2,000 | 1,048,576 | Takahashi loves the number 7 and multiples of K. Where is the first occurrence of a multiple of K in the sequence 7,77,777,\ldots? (Also see Output and Sample Input/Output below.) If the sequence contains no multiples of K, print `-1` instead. | ['print(999983 * 7) \nprint(999983 * 17)\nprint(999983 * 817)\nprint(999983 * 5817)\nprint(999983 * 75817)\nprint(999983 * 875817)\nprint(999983 * 3875817)\nprint(999983 * 23875817)\n', 'N = int(input())\n\nmod_first = 7 % N\nmod_next = mod_first * 11 % N\n\nif mod_first == 0:\n print("1")\n exit()\nif mod_next =... | ['Wrong Answer', 'Accepted'] | ['s931693850', 's284972967'] | [9012.0, 9056.0] | [30.0, 1611.0] | [173, 302] |
p02596 | u228288852 | 2,000 | 1,048,576 | Takahashi loves the number 7 and multiples of K. Where is the first occurrence of a multiple of K in the sequence 7,77,777,\ldots? (Also see Output and Sample Input/Output below.) If the sequence contains no multiples of K, print `-1` instead. | ['k=int(input())\ncount=1\nif k%2==0:\n print(-1)\nelse:\n while True:\n if a%k==0:\n print(count)\n break\n else:\n a=a*10+7\n count+=1\n', 'k=int(input())\na=0\nfor i in range(k):\n a=(a*10+7)%k\n if a==0:\n print(i+1)\n exit()\n \nprint(-1)'] | ['Runtime Error', 'Accepted'] | ['s592957859', 's095720014'] | [9136.0, 9160.0] | [32.0, 179.0] | [152, 104] |
p02596 | u248996551 | 2,000 | 1,048,576 | Takahashi loves the number 7 and multiples of K. Where is the first occurrence of a multiple of K in the sequence 7,77,777,\ldots? (Also see Output and Sample Input/Output below.) If the sequence contains no multiples of K, print `-1` instead. | ['K=int(input())\n\nflag=0\u3000\n\na=7 \ni=0 #index\n\nif (K%2 !=\u30000):\n print(-1)\n\nelse:\n while(flag==0):\n if(a%k==0):\n flag==1\n i += 1\n a=10*a+7\n\n print(i)', 'K=int(input())\n\na=7 \nb=10\ni=0 #index\n\nif (K%7 == 0):\n L = 9*K/7\nelse:\n L = 9*K\n \nif ... | ['Runtime Error', 'Accepted'] | ['s310805298', 's122471238'] | [8932.0, 9196.0] | [27.0, 249.0] | [233, 267] |
p02596 | u253205825 | 2,000 | 1,048,576 | Takahashi loves the number 7 and multiples of K. Where is the first occurrence of a multiple of K in the sequence 7,77,777,\ldots? (Also see Output and Sample Input/Output below.) If the sequence contains no multiples of K, print `-1` instead. | ['k = int(input())\ns = 7\nif k%2 == 0:\n\tprint(-1)\nelif k%5 == 0:\n\tprint(-1)\nelse:\n\twhile s%k != 0:\n\t\ts = 10*s+7\n\t\ts = str(s)\n\tprint(len(s))', 'k = int(input())\nif k%2 == 0:\n\tprint(-1)\nelif k%5 == 0:\n\tprint(-1)\nelse:\n\ts = 7\n\twhile s%k != 0:\n\t\ts = 10*s+7\n\tprint(len(s))', 'k = int(input())... | ['Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted'] | ['s179738899', 's472631236', 's560686393', 's822590382', 's893122105', 's611059678'] | [9168.0, 9200.0, 9180.0, 9196.0, 8940.0, 9164.0] | [34.0, 2206.0, 2205.0, 2206.0, 26.0, 180.0] | [136, 124, 124, 123, 122, 122] |
p02596 | u264707846 | 2,000 | 1,048,576 | Takahashi loves the number 7 and multiples of K. Where is the first occurrence of a multiple of K in the sequence 7,77,777,\ldots? (Also see Output and Sample Input/Output below.) If the sequence contains no multiples of K, print `-1` instead. | ['K = int(input())\nnana = [7,77,777,7777,77777,777777,7777777,77777777,777777777]\nwarikireta = 0\nif K == 2 or K == 5:\n print(-1)\nelse:\n for i in range(9):\n if nana[i] % K == 0:\n warikireta = i + 1\n else:\n pass\nif warikireta != 0:\n print(warikireta)\nelif warikireta == 0:\n if K == 2:\n ... | ['Wrong Answer', 'Accepted'] | ['s217751072', 's134016549'] | [9160.0, 9176.0] | [35.0, 230.0] | [356, 247] |
p02596 | u268402865 | 2,000 | 1,048,576 | Takahashi loves the number 7 and multiples of K. Where is the first occurrence of a multiple of K in the sequence 7,77,777,\ldots? (Also see Output and Sample Input/Output below.) If the sequence contains no multiples of K, print `-1` instead. | ['K=int(input())\namari_list = []\namari = 7%K\namari_list.append(amari)\nfor i in range(1,K):\n amari = (amari * 10 + 7)% K\n if amari == 0:\n print(i+1)\n break\n if amari in amari_list:a\n print(-1)\n break\n if i == (K-1):\n print(-1)\n else:\n amari_list.app... | ['Runtime Error', 'Accepted'] | ['s373637637', 's654178819'] | [9040.0, 9168.0] | [28.0, 233.0] | [322, 162] |
p02596 | u273339216 | 2,000 | 1,048,576 | Takahashi loves the number 7 and multiples of K. Where is the first occurrence of a multiple of K in the sequence 7,77,777,\ldots? (Also see Output and Sample Input/Output below.) If the sequence contains no multiples of K, print `-1` instead. | ['k = int(input())\nx = 7%k\ns = []\nif k%2 == 0:\n print(-1)\n\nelse:\n while s.count(x) == 0:\n s.append(x)\n if x == 0:\n print(len(s))\n break\n x = (10*x + 7)%k\n\n \n if s.count(x) != 0:\n print(-1)', 'k = int(input())\nx = 7%k\ns = []\n\nwhile x not in s:\n if x == 0:\n print(len(s+... | ['Wrong Answer', 'Runtime Error', 'Runtime Error', 'Wrong Answer', 'Runtime Error', 'Runtime Error', 'Wrong Answer', 'Runtime Error', 'Accepted'] | ['s044784181', 's045017044', 's161034630', 's184711584', 's638818546', 's783060688', 's892378556', 's924233806', 's553439425'] | [9620.0, 9644.0, 9072.0, 9732.0, 48420.0, 48604.0, 9604.0, 9108.0, 48552.0] | [2205.0, 2206.0, 28.0, 2206.0, 277.0, 265.0, 2206.0, 27.0, 268.0] | [212, 158, 88, 228, 146, 146, 166, 143, 141] |
p02596 | u282333488 | 2,000 | 1,048,576 | Takahashi loves the number 7 and multiples of K. Where is the first occurrence of a multiple of K in the sequence 7,77,777,\ldots? (Also see Output and Sample Input/Output below.) If the sequence contains no multiples of K, print `-1` instead. | ['k = int(input())\na = [None]*1000001\na[1]=7%k\nn=0\n\nfor i in range(2:k+1):\n a[i]=(a[i-1]*10+7)%k\n if a[i]==0 and n==0:\n print("{}".format(i))\n n=1\nif n==0:\n print("-1")\n', 'k = int(input())\na = [None]*1000001\na[1]=7%k\nn=0\n\nif a[1]==0:\n print("1")\n n=1\n\nfor i in range(2,... | ['Runtime Error', 'Accepted'] | ['s544794260', 's111612892'] | [8928.0, 48536.0] | [26.0, 291.0] | [190, 226] |
p02596 | u283929013 | 2,000 | 1,048,576 | Takahashi loves the number 7 and multiples of K. Where is the first occurrence of a multiple of K in the sequence 7,77,777,\ldots? (Also see Output and Sample Input/Output below.) If the sequence contains no multiples of K, print `-1` instead. | ['k = int(input())\nlis = []\nc = 0\na = 0\nwhile(True):\n a = (a*10 + 7) & k\n if a == 0:\n print(c+1)\n quit()\n if c > k:\n print(-1)\n quit()\n c += 1', 'k = int(input())\nlis = []\nc = 1\na = 0\nwhile(True):\n a = (a*10 + 7) % k\n if a == 0:\n print(c)\n ... | ['Wrong Answer', 'Accepted'] | ['s035123393', 's164139829'] | [9172.0, 9068.0] | [217.0, 221.0] | [180, 178] |
p02596 | u290886932 | 2,000 | 1,048,576 | Takahashi loves the number 7 and multiples of K. Where is the first occurrence of a multiple of K in the sequence 7,77,777,\ldots? (Also see Output and Sample Input/Output below.) If the sequence contains no multiples of K, print `-1` instead. | ['K = int(input())\ni = 0\nret = -1\nif K % 5 != 0 and K % 2 != 0:\n N = 1\n if K % 7 == 0:\n L = K * 9 // 7\n else:\n L = K * 9\n while True:\n if N % L == 1:\n ret = i\n break\n N = (N * 10 )% L\n i += 1\nprint(ret)\n', 'K = int(input())\ni = 1\nret = -1\nif K % 5 != 0 and K % 2 != 0:\n ... | ['Wrong Answer', 'Accepted'] | ['s662339895', 's223539080'] | [9124.0, 9124.0] | [29.0, 206.0] | [230, 231] |
p02596 | u290887281 | 2,000 | 1,048,576 | Takahashi loves the number 7 and multiples of K. Where is the first occurrence of a multiple of K in the sequence 7,77,777,\ldots? (Also see Output and Sample Input/Output below.) If the sequence contains no multiples of K, print `-1` instead. | ["k = int(input())\nnum = 0\nans = 0\nseven = ''\n\n\nfor i in range(k):\n seven += '7'\n num = int(seven) % k\n if num == 0:\n ans = i\n break\nprint(ans)", "k = int(input())\nseven = 7\ncount = 0\n\ndef main():\n for i in range(1000000):\n if k % 2 == 0:\n count = -1\n ... | ['Wrong Answer', 'Runtime Error', 'Runtime Error', 'Accepted'] | ['s310066924', 's431740594', 's642787414', 's552919178'] | [9088.0, 9112.0, 8972.0, 9204.0] | [2206.0, 26.0, 25.0, 262.0] | [164, 365, 236, 201] |
p02596 | u291460595 | 2,000 | 1,048,576 | Takahashi loves the number 7 and multiples of K. Where is the first occurrence of a multiple of K in the sequence 7,77,777,\ldots? (Also see Output and Sample Input/Output below.) If the sequence contains no multiples of K, print `-1` instead. | ['#200802C\nX = int(input())\nL = len(str(X))\n#print(L)\n\n\n\nfor l in range(L):\n Y += 7*10**l\n \nflag = 0\nfor i in range(10000000):\n Y = Y%X\n #print(i)\n\n if Y == 0:\n ans = L+i\n flag = 1\n break\n else: \n Z = Y * 10 + 7\n if Z == Y:\n break\n ... | ['Runtime Error', 'Accepted'] | ['s023546571', 's554501469'] | [9192.0, 9164.0] | [25.0, 283.0] | [377, 381] |
p02596 | u301272559 | 2,000 | 1,048,576 | Takahashi loves the number 7 and multiples of K. Where is the first occurrence of a multiple of K in the sequence 7,77,777,\ldots? (Also see Output and Sample Input/Output below.) If the sequence contains no multiples of K, print `-1` instead. | ['K = int(input())\n\nn = 17\nfor i in range(n):\n if i == n-1:\n print(-1)\n elif int(7 * (10 ** (i + 1) - 1 ) / 9) % K == 0:\n print(i+1)\n break\nprint (int(7 * (10 ** (i + 1) - 1 ) / 9))', 'K = int(input())\nif K % 2 == 0:\n print(-1)\nelse:\n m = 0\n for i in range(K):\n ... | ['Wrong Answer', 'Accepted'] | ['s169213624', 's376537984'] | [9112.0, 9144.0] | [29.0, 227.0] | [206, 236] |
p02596 | u309120194 | 2,000 | 1,048,576 | Takahashi loves the number 7 and multiples of K. Where is the first occurrence of a multiple of K in the sequence 7,77,777,\ldots? (Also see Output and Sample Input/Output below.) If the sequence contains no multiples of K, print `-1` instead. | ['K = int(input())\n \ni, a = 0, 0\nl = []\nfor i in range(K):\n a = (10*a + 7) % K\n print(a)\n l.append(a)\n \nj, ans = 0, 0\nfor j in range(K):\n if l[j] == 0:\n ans = j\n break\n else: \n ans = -1\n\nprint(ans)', 'K = int(input())\n\ni, a = 0, 0\nl = []\nfor i in range(K):\n a = 10*a + 7\n l.append... | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s217324731', 's379722909', 's217350949'] | [49688.0, 11268.0, 48344.0] | [624.0, 2206.0, 312.0] | [210, 196, 487] |
p02596 | u314089899 | 2,000 | 1,048,576 | Takahashi loves the number 7 and multiples of K. Where is the first occurrence of a multiple of K in the sequence 7,77,777,\ldots? (Also see Output and Sample Input/Output below.) If the sequence contains no multiples of K, print `-1` instead. | ['K = int(input())\n\nif K%2 == 0:\n print(-1)\n\nsuretu = 7\ni = 1\nfor i in range(10**7 + 9):\n if suretu%K == 0:\n print(i)\n break\n else:\n i += 1\n suretu *= 10\n suretu += 7', 'K = int(input())\nremainder_set = set()\nsequence = 7\ni = 1\nfor i in range(10**7 + 9):\n ... | ['Wrong Answer', 'Runtime Error', 'Runtime Error', 'Accepted'] | ['s092499200', 's500706264', 's516523361', 's627548435'] | [9172.0, 9080.0, 8992.0, 77752.0] | [2206.0, 28.0, 22.0, 531.0] | [208, 316, 207, 393] |
p02596 | u314395569 | 2,000 | 1,048,576 | Takahashi loves the number 7 and multiples of K. Where is the first occurrence of a multiple of K in the sequence 7,77,777,\ldots? (Also see Output and Sample Input/Output below.) If the sequence contains no multiples of K, print `-1` instead. | ['def main():\n K = int(input())\n\n crawler = 7\n i = 1\n\n if (K % 2 ==0) or (K % 5 == 0):\n print(-1)\n else:\n a = [0 for i in range (K+1)]\n a[0] = 7\n for i in range (1, K+1):\n a[i] = (a[i-1]*10 + 7) % K\n for i in a:\n if i == 0:\n ... | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s505833001', 's521298261', 's791210315'] | [48448.0, 48460.0, 48308.0] | [236.0, 324.0, 237.0] | [400, 296, 480] |
p02596 | u327421986 | 2,000 | 1,048,576 | Takahashi loves the number 7 and multiples of K. Where is the first occurrence of a multiple of K in the sequence 7,77,777,\ldots? (Also see Output and Sample Input/Output below.) If the sequence contains no multiples of K, print `-1` instead. | ['import sys\n\ninput = sys.stdin.readline\n\n#k = int(input())\nfor k in range(1, 100):\n if k == 7 or k == 1:\n print(k, 1)\n elif k % 2 == 0 or k % 5 == 0: print(k, -1)\n else:\n if k % 7 == 0: k = k // 7\n mod = 9*k\n i = 1;\n result = 10;\n while result != 1:\n ... | ['Wrong Answer', 'Accepted'] | ['s722007545', 's317798969'] | [9076.0, 9140.0] | [31.0, 285.0] | [396, 229] |
p02596 | u330661451 | 2,000 | 1,048,576 | Takahashi loves the number 7 and multiples of K. Where is the first occurrence of a multiple of K in the sequence 7,77,777,\ldots? (Also see Output and Sample Input/Output below.) If the sequence contains no multiples of K, print `-1` instead. | ["def main():\n K = int(input())\n l = [False] * K\n ans = 1\n now = 0\n while True:\n now = now * 10 + 7\n now %= 7\n if now == 0:\n print(ans)\n break\n\n if l[now]:\n print(-1)\n break\n \n l[now] = True\n ans... | ['Wrong Answer', 'Accepted'] | ['s903961715', 's013683233'] | [16676.0, 16748.0] | [34.0, 206.0] | [345, 345] |
p02596 | u345621867 | 2,000 | 1,048,576 | Takahashi loves the number 7 and multiples of K. Where is the first occurrence of a multiple of K in the sequence 7,77,777,\ldots? (Also see Output and Sample Input/Output below.) If the sequence contains no multiples of K, print `-1` instead. | ['import math\nK = int(input())\nseven = int("7" * int(math.log10(K) + 1))\ncount = 1\nwhile True:\n if seven % K == 0:\n print(count)\n break\n count += 1\n seven = seven * 10 + 7', 'K = int(input())\na = [0] * 1000000000\na[1] = 7 % K\nfor i in range(2,K):\n a[i] = (a[i-1]*10 + 7) % K\nfor i... | ['Wrong Answer', 'Runtime Error', 'Accepted'] | ['s721130997', 's811742747', 's088661346'] | [9236.0, 8816.0, 48456.0] | [2205.0, 24.0, 284.0] | [192, 185, 152] |
p02596 | u350491208 | 2,000 | 1,048,576 | Takahashi loves the number 7 and multiples of K. Where is the first occurrence of a multiple of K in the sequence 7,77,777,\ldots? (Also see Output and Sample Input/Output below.) If the sequence contains no multiples of K, print `-1` instead. | ['L = int(input())\n\nfor K in range(1, L + 1, 2):\n \n ans = -1\n a = 0\n\n if K % 2 == 0:\n ans = -1\n elif K % 5 == 0:\n ans = -1\n else:\n for i in range(0, K):\n a = (10 * a + 7) % K\n if a == 0:\n ans = i + 1\n break\n p... | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s236724992', 's491841385', 's520879649'] | [9220.0, 9156.0, 9180.0] | [2206.0, 2206.0, 178.0] | [329, 370, 222] |
p02596 | u354174235 | 2,000 | 1,048,576 | Takahashi loves the number 7 and multiples of K. Where is the first occurrence of a multiple of K in the sequence 7,77,777,\ldots? (Also see Output and Sample Input/Output below.) If the sequence contains no multiples of K, print `-1` instead. | ['param_k = int(input())\n \n#param_k = 4\n \nif param_k % 2 == 0:\n print(-1)\n \nelif param_k % 5 == 0:\n print(-1)\n \nelse:\n n=0\n for i in range(param_k + 10):\n n = 10*n + 7\n if n % 7 == 0:\n print(i+1)\n break\n if i == param_k + 10 - 1:\n print(-1)', 'param_k = int(input())\n ... | ['Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Runtime Error', 'Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s044785765', 's272969215', 's378444296', 's409311571', 's553285422', 's630222430', 's707463406', 's718738853'] | [9052.0, 9124.0, 35280.0, 8848.0, 33940.0, 35304.0, 10900.0, 8972.0] | [27.0, 225.0, 2241.0, 25.0, 2238.0, 2241.0, 547.0, 272.0] | [271, 263, 290, 250, 295, 314, 346, 273] |
p02596 | u363421241 | 2,000 | 1,048,576 | Takahashi loves the number 7 and multiples of K. Where is the first occurrence of a multiple of K in the sequence 7,77,777,\ldots? (Also see Output and Sample Input/Output below.) If the sequence contains no multiples of K, print `-1` instead. | ["k = int(input())\n\nif k == 2 or k == 5:\n print(-1)\n exit()\n\nfor i in range(1, 10**6):\n x = int('7'*i)\n if x % k == 0:\n print(i+1)\n exit()\n", 'k = int(input())\n\nmod = 7 % k\nfor i in range(1, 10**6):\n if mod == 0:\n print(i)\n exit()\n mod = (mod * 10 + 7) % k... | ['Wrong Answer', 'Accepted'] | ['s384679646', 's082388577'] | [9148.0, 9172.0] | [2206.0, 185.0] | [163, 144] |
p02596 | u367965715 | 2,000 | 1,048,576 | Takahashi loves the number 7 and multiples of K. Where is the first occurrence of a multiple of K in the sequence 7,77,777,\ldots? (Also see Output and Sample Input/Output below.) If the sequence contains no multiples of K, print `-1` instead. | ['print(-1)', 'k = int(input())\n\nif k % 2 == 0 or k % 5 == 0:\n print(-1)\nelse:\n i = 1\n m = 7 % k\n while True:\n if m == 0:\n print(i)\n break\n m = (10 * m + 7) % k\n i += 1\n'] | ['Wrong Answer', 'Accepted'] | ['s152243576', 's437066723'] | [9052.0, 9120.0] | [33.0, 203.0] | [9, 209] |
p02596 | u369133448 | 2,000 | 1,048,576 | Takahashi loves the number 7 and multiples of K. Where is the first occurrence of a multiple of K in the sequence 7,77,777,\ldots? (Also see Output and Sample Input/Output below.) If the sequence contains no multiples of K, print `-1` instead. | ['k=int(input())\nans=-1\ns="7"\ncnt=1\nif k%2!=0 and k%5!=0:\n if k%3!=0:\n ans=k-1\n else:\n while int(s)%k!=0:\n s+="7"\n cnt+=1\n ans=cnt\nprint(ans)', 'k=int(input())\na=0\ncnt=-1\nfor i in range(1,k+1):\n a=(10*a+7)%k\n if a==0:\n cnt=i\n break\nprint(cnt)'] | ['Wrong Answer', 'Accepted'] | ['s967751309', 's088341395'] | [8940.0, 9168.0] | [2205.0, 182.0] | [160, 105] |
p02596 | u373047809 | 2,000 | 1,048,576 | Takahashi loves the number 7 and multiples of K. Where is the first occurrence of a multiple of K in the sequence 7,77,777,\ldots? (Also see Output and Sample Input/Output below.) If the sequence contains no multiples of K, print `-1` instead. | ['k, R = int(input()), 1\nfor i in range(1, k+10):\n if not R:\n print(i)\n R = (R * 10 % 7 + 7) % k', 'k, R = int(input()), 1\nfor i in range(1, k+10):\n if R % k == 0:\n print(i)\n R = R * 10 + 7', 'k, R, a = int(input()), 7, -1\nfor i in range(1, k+1):\n if not R%k:\n a = i\n ... | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s040190064', 's949208750', 's665868793'] | [9104.0, 9192.0, 8960.0] | [171.0, 2206.0, 214.0] | [107, 102, 131] |
p02596 | u380791283 | 2,000 | 1,048,576 | Takahashi loves the number 7 and multiples of K. Where is the first occurrence of a multiple of K in the sequence 7,77,777,\ldots? (Also see Output and Sample Input/Output below.) If the sequence contains no multiples of K, print `-1` instead. | ['N=int(input())\nnum=0\nif (N%2==0)or(N%5==0):\n print(-1)\nelse:\n for i in range(1,N):\n num+=i*7\n if num%N==0:\n break\n print(i)', 'N=int(input())\nnum = 7\nplus = 70\ni=1\na=[]\nif (N%2==0)or(N%5==0):\n print(-1)\nelse:\n while num%N!=0:\n if num%N in a:\n ... | ['Runtime Error', 'Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s720520446', 's750547706', 's779033639', 's803432080', 's996936822', 's193677615'] | [9140.0, 31096.0, 30528.0, 29936.0, 35276.0, 9168.0] | [228.0, 2235.0, 2234.0, 2237.0, 2241.0, 253.0] | [157, 317, 242, 223, 293, 174] |
p02596 | u382639013 | 2,000 | 1,048,576 | Takahashi loves the number 7 and multiples of K. Where is the first occurrence of a multiple of K in the sequence 7,77,777,\ldots? (Also see Output and Sample Input/Output below.) If the sequence contains no multiples of K, print `-1` instead. | ['x = int(input())\n\nng = np.array([2,4,5,6,8])\n\nimport numpy as np\n\ndef prime_factorize(n):\n a = []\n while n % 2 == 0:\n a.append(2)\n n //= 2\n f = 3\n while f * f <= n:\n if n % f == 0:\n a.append(f)\n n //= f\n else:\n f += 2\n if n ... | ['Runtime Error', 'Accepted'] | ['s639834042', 's969347190'] | [9232.0, 9084.0] | [27.0, 255.0] | [719, 250] |
p02596 | u388971072 | 2,000 | 1,048,576 | Takahashi loves the number 7 and multiples of K. Where is the first occurrence of a multiple of K in the sequence 7,77,777,\ldots? (Also see Output and Sample Input/Output below.) If the sequence contains no multiples of K, print `-1` instead. | ["K = int(input())\nif(K%2==0):\n print(-1)\n exit()\ncheck=list(str(K))\nif(check[-1]=='5'):\n print(-1)\n exit()\nelse:\n seven=7\n if(int(''.join(['7']*(K-1)))%K==0):\n print(K-1)\n exit()\n while True:\n if(seven%K==0):\n print(len(str(seven)))\n break... | ['Runtime Error', 'Wrong Answer', 'Accepted'] | ['s397897673', 's884334315', 's198972529'] | [17840.0, 9944.0, 9088.0] | [2206.0, 475.0, 204.0] | [347, 189, 168] |
p02596 | u395202850 | 2,000 | 1,048,576 | Takahashi loves the number 7 and multiples of K. Where is the first occurrence of a multiple of K in the sequence 7,77,777,\ldots? (Also see Output and Sample Input/Output below.) If the sequence contains no multiples of K, print `-1` instead. | ["\nimport collections\n\n\ndef main():\n k = int(input())\n a = 0\n ans = 0\n for i in range(10000000):\n a = 10 * a + 7\n a %= k\n if a == 0:\n ans = i\n break\n print(ans)\n\n\nif __name__ == '__main__':\n main()\n", "\nimport collections\n\n\ndef main():\... | ['Wrong Answer', 'Accepted'] | ['s935315775', 's243553091'] | [9428.0, 9452.0] | [1069.0, 237.0] | [257, 264] |
p02596 | u395672550 | 2,000 | 1,048,576 | Takahashi loves the number 7 and multiples of K. Where is the first occurrence of a multiple of K in the sequence 7,77,777,\ldots? (Also see Output and Sample Input/Output below.) If the sequence contains no multiples of K, print `-1` instead. | ['k = int(input())\nmo = 7\nmo = mo % k\nfor i in range(k + 1):\n if mo == 0:\n print(i + 1)\n break\n if mo != 0:\n mo = (mo*10 + 7) * k\nelse:\n print(-1)\n \n \n ', 'k = int(input())\nmo = 0\nfor i in range(1, k + 1):\n mo = mo * 10 + 7\n k = mo % k\n if mod == 0:\n print(i)\n ... | ['Wrong Answer', 'Runtime Error', 'Accepted'] | ['s358859110', 's755922954', 's960128494'] | [9556.0, 9112.0, 9120.0] | [2205.0, 22.0, 200.0] | [167, 153, 158] |
p02596 | u400147727 | 2,000 | 1,048,576 | Takahashi loves the number 7 and multiples of K. Where is the first occurrence of a multiple of K in the sequence 7,77,777,\ldots? (Also see Output and Sample Input/Output below.) If the sequence contains no multiples of K, print `-1` instead. | ['k = int(input())\nn = 0\nfrag = 0\nsevens = ""\n\nif k%2==1:\n print(-1)\n exit()\n\nwhile frag==0:\n sevens = sevens + "7"\n n+=1\n if int(sevens)%k==0 or n>1000000:\n frag=1\nprint(n)', 'k = int(input())\n\nx = 7\n\nfor i in range(k):\n if x%k==0:\n print(i+1)\n exit()\n x ... | ['Wrong Answer', 'Accepted'] | ['s141933285', 's521887912'] | [9172.0, 9168.0] | [2206.0, 215.0] | [193, 125] |
p02596 | u402428218 | 2,000 | 1,048,576 | Takahashi loves the number 7 and multiples of K. Where is the first occurrence of a multiple of K in the sequence 7,77,777,\ldots? (Also see Output and Sample Input/Output below.) If the sequence contains no multiples of K, print `-1` instead. | ['num=int(input())\na=7\nflag=0\nfor i in range(num):\n a=(a*10+7)\n if a%num==0:\n print(i)\n flag=1\n break\n \nif flag==0:\n print("-1")', 'num=int(input())\na=7\nflag=0\nfor i in range(num):\n if a%num==0:\n print(i+1)\n flag=1\n break\n a=(a*10+7)%num\nif... | ['Wrong Answer', 'Accepted'] | ['s848605663', 's588069173'] | [9124.0, 9104.0] | [2206.0, 207.0] | [159, 158] |
p02596 | u402629484 | 2,000 | 1,048,576 | Takahashi loves the number 7 and multiples of K. Where is the first occurrence of a multiple of K in the sequence 7,77,777,\ldots? (Also see Output and Sample Input/Output below.) If the sequence contains no multiples of K, print `-1` instead. | ["import sys\nsys.setrecursionlimit(1000000000)\nimport math\nfrom math import gcd\ndef lcm(a, b): return a * b // gcd(a, b)\nfrom itertools import count, permutations, chain, product\nfrom functools import lru_cache\nfrom collections import deque, defaultdict\nfrom pprint import pprint\nii = lambda: int(input())\nmis ... | ['Wrong Answer', 'Accepted'] | ['s435767241', 's225714994'] | [78672.0, 78664.0] | [387.0, 386.0] | [2263, 2275] |
p02596 | u405534002 | 2,000 | 1,048,576 | Takahashi loves the number 7 and multiples of K. Where is the first occurrence of a multiple of K in the sequence 7,77,777,\ldots? (Also see Output and Sample Input/Output below.) If the sequence contains no multiples of K, print `-1` instead. | ['k = int(input())\n\nif k % 2 == 0:\n print(-1)\nelif k % 5 == 0:\n print(-1)\nelse:\n if k % 7 == 0:\n l = k * 9 / 7\n else:\n l = k * 9\n \n tmp = 1\n for i in range(l):\n tmp = tmp * 10 % l\n if tmp == 1:\n flg == 1\n print(i+1)\n break\n \n if flg != 1\n \tprint(-1)', 'k = in... | ['Runtime Error', 'Runtime Error', 'Accepted'] | ['s010357713', 's842537554', 's144546035'] | [8996.0, 9028.0, 9176.0] | [27.0, 166.0, 258.0] | [286, 253, 280] |
p02596 | u405660020 | 2,000 | 1,048,576 | Takahashi loves the number 7 and multiples of K. Where is the first occurrence of a multiple of K in the sequence 7,77,777,\ldots? (Also see Output and Sample Input/Output below.) If the sequence contains no multiples of K, print `-1` instead. | ['k=int(input())\nnum=k%7\nfor i in range(1, 10**7+1):\n if num%k==0:\n print(i)\n exit()\n else:\n num=(num*10+7)%k\nprint(-1)\n', 'k=int(input())\nnum=k%7\nfor i in range(1, 10**6+2):\n if num%k==0:\n print(i)\n exit()\n else:\n num=(num*10+7)%k\nprint(-1)\n', 'k=... | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s078852573', 's531549735', 's489325944'] | [9132.0, 9152.0, 9196.0] | [1851.0, 220.0, 1809.0] | [145, 145, 145] |
p02596 | u406138190 | 2,000 | 1,048,576 | Takahashi loves the number 7 and multiples of K. Where is the first occurrence of a multiple of K in the sequence 7,77,777,\ldots? (Also see Output and Sample Input/Output below.) If the sequence contains no multiples of K, print `-1` instead. | ['k=int(input())\ni=k\nif(k%2==0 or k%5==0):\n print(-1)\nwhile(1):\n if(7*(10**i-1)%(9*k)==0):\n break\n i-=1\nprint(i)', 'k=int(input())\ni=1\nwhile(1):\n if(7*(10**i-1)%9k==0):\n break\n i++\nprint(i)', 'K = int(input())\n\nt = 7\nfor i in range(K):\n if t % K == 0:\n print(i + 1)\n ... | ['Wrong Answer', 'Runtime Error', 'Accepted'] | ['s041352392', 's209925515', 's209241348'] | [10744.0, 8936.0, 9096.0] | [2206.0, 28.0, 209.0] | [126, 78, 141] |
p02596 | u408375121 | 2,000 | 1,048,576 | Takahashi loves the number 7 and multiples of K. Where is the first occurrence of a multiple of K in the sequence 7,77,777,\ldots? (Also see Output and Sample Input/Output below.) If the sequence contains no multiples of K, print `-1` instead. | ['k = int(input())\nsieve = [True] * 10**6\nfor i in range(2, 10**6):\n if i <= 10**3 and sieve[i]:\n for j in range(i*i, 10**6, i):\n sieve[j] = False\n\nif k % 2 == 0 or k % 5 == 0:\n print(-1)\nelse:\n if k == 7 or k == 1:\n print(1)\n else:\n if k % 7 == 0:\n k //= 7\n if sieve[k]:\n ... | ['Wrong Answer', 'Accepted'] | ['s051969315', 's449528174'] | [16844.0, 9160.0] | [2206.0, 217.0] | [481, 216] |
p02596 | u408620326 | 2,000 | 1,048,576 | Takahashi loves the number 7 and multiples of K. Where is the first occurrence of a multiple of K in the sequence 7,77,777,\ldots? (Also see Output and Sample Input/Output below.) If the sequence contains no multiples of K, print `-1` instead. | ["def main():\n import sys\n input = sys.stdin.readline\n sys.setrecursionlimit(10**6)\n K = int(input())\n if K % 2 == 0 or K % 5 == 0:\n print(-1)\n return True\n ans = 1\n K1 = K % 10\n t = K\n while t:\n # print(ans)\n for i in range(10):\n if (t + K... | ['Wrong Answer', 'Accepted'] | ['s239697647', 's465936991'] | [9132.0, 9108.0] | [755.0, 767.0] | [554, 554] |
p02596 | u411923565 | 2,000 | 1,048,576 | Takahashi loves the number 7 and multiples of K. Where is the first occurrence of a multiple of K in the sequence 7,77,777,\ldots? (Also see Output and Sample Input/Output below.) If the sequence contains no multiples of K, print `-1` instead. | ['K = input()\nK = int(K)\n\ndef seven():\n seven_i = 0\n count = 0\n for i in range(K):\n seven_i += (10**i*7)\n seven_i %= K\n count += 1\n print(seven_i)\n if seven_i % K == 0:\n return count\n return -1\n\nprint(seven())', 'K = input()\nK = int(K)\n\ndef sev... | ['Wrong Answer', 'Accepted'] | ['s800517986', 's208299747'] | [9280.0, 9168.0] | [2206.0, 180.0] | [265, 233] |
p02596 | u413960612 | 2,000 | 1,048,576 | Takahashi loves the number 7 and multiples of K. Where is the first occurrence of a multiple of K in the sequence 7,77,777,\ldots? (Also see Output and Sample Input/Output below.) If the sequence contains no multiples of K, print `-1` instead. | ['K = int(input())\nseven = 7\ncount = 0\n\nif(K % 2 == 0 or K % 5 == 0):\n print(-1)\nelse:\n while(seven % K != 0):\n count += 1\n seven += 7 * (10 ** count)\n print(count)\n\n if(count >= 1): \n print(count + 1)', 'K = int(input())\nseven = 0\ncount = 0\n\nif(K % 2 == 0 or K % 5 ... | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s709861352', 's936595824', 's602496241'] | [9264.0, 9164.0, 9192.0] | [2206.0, 25.0, 208.0] | [236, 351, 403] |
p02596 | u414050834 | 2,000 | 1,048,576 | Takahashi loves the number 7 and multiples of K. Where is the first occurrence of a multiple of K in the sequence 7,77,777,\ldots? (Also see Output and Sample Input/Output below.) If the sequence contains no multiples of K, print `-1` instead. | ['k=int(input())\nans=1\ns_1=7%k\ns_2=10%k\nm=0\nj=0\nif k%2==0 or k%5==0:\n print(-1)\nelif k==1 or k==7:\n print(1)\nelse:\n i=0\n while j==0:\n m=(m+(s_1*(((s_2)**i)%k)))%k\n if m==0:\n j==1\n else:\n ans+=1\n i+=1\n print(ans)', '\nk=int(input())\nans=2\ns_1=7%k\ns_2=10%k\nm=0\nj=0\nif ... | ['Time Limit Exceeded', 'Runtime Error', 'Runtime Error', 'Time Limit Exceeded', 'Accepted'] | ['s295036508', 's497208055', 's525420507', 's552978991', 's818439594'] | [9188.0, 9184.0, 9124.0, 9204.0, 9140.0] | [2206.0, 2206.0, 30.0, 2205.0, 233.0] | [238, 388, 390, 397, 127] |
p02596 | u423389475 | 2,000 | 1,048,576 | Takahashi loves the number 7 and multiples of K. Where is the first occurrence of a multiple of K in the sequence 7,77,777,\ldots? (Also see Output and Sample Input/Output below.) If the sequence contains no multiples of K, print `-1` instead. | ['import sys\nk = int(input())\nfor i in range(k+1):\n d = 7\n d = (10*d) + 7\n d %= k\n if d == 0:\n print(i+1)\n sys.exit()\nprint(-1)', 'k = int(input())\ni = 1\nif a%2 ==1:\n while True:\n s = 0\n for j in range(i):\n s += (10**j)*7\n if s % k == 0:\n print(i)... | ['Wrong Answer', 'Runtime Error', 'Accepted'] | ['s049912364', 's111829527', 's787657331'] | [9080.0, 9168.0, 9124.0] | [194.0, 27.0, 210.0] | [135, 215, 133] |
p02596 | u427231601 | 2,000 | 1,048,576 | Takahashi loves the number 7 and multiples of K. Where is the first occurrence of a multiple of K in the sequence 7,77,777,\ldots? (Also see Output and Sample Input/Output below.) If the sequence contains no multiples of K, print `-1` instead. | ['k = int(input())\na = 0\nfor i in range(10**6):\n a += 7*(10**i)\n if a%k == 0:\n print(i)\n exit()\n\n \nprint(-1)', 'k = int(input())\nmod = 7\ncnt = 1\nfor i in range(k):\n if mod % k == 0:\n break\n cnt += 1\n mod = (10*mod + 7) % k\nif mod % k == 0:\n print(cnt)\nelse:\n ... | ['Wrong Answer', 'Accepted'] | ['s516882798', 's939840212'] | [9168.0, 9172.0] | [2206.0, 269.0] | [127, 178] |
p02596 | u427623367 | 2,000 | 1,048,576 | Takahashi loves the number 7 and multiples of K. Where is the first occurrence of a multiple of K in the sequence 7,77,777,\ldots? (Also see Output and Sample Input/Output below.) If the sequence contains no multiples of K, print `-1` instead. | ['K = int(input())\na1 = 7\nai = 0\nfor i in range(K + 1):\n ai = a1 % K\n a1 = (a1 * 10 + 7)\n if ai == 0:\n break\n \nprint(i + 1)', 'K = int(input())\na1 = 7\nai = 0\nfor i in range(K + 1):\n if i == 0:\n ai = a1 % K\n else:\n ai = (ai * 10 + 7) % K\n if ai == 0:\n break\nelse:\n ... | ['Runtime Error', 'Accepted'] | ['s370723093', 's361722990'] | [8936.0, 9080.0] | [27.0, 214.0] | [145, 171] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.