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
p02642
u152741807
2,000
1,048,576
Given is a number sequence A of length N. Find the number of integers i \left(1 \leq i \leq N\right) with the following property: * For every integer j \left(1 \leq j \leq N\right) such that i \neq j , A_j does not divide A_i.
['import numpy as np\nn = int(input())\na = np.sort(np.array(list(map(int, input().split()))))\nmax_num = np.max(a)+1\ndp = np.array([True]*(max_num))\n\nif np.all(a==a[0]):\n print(0)\nelse:\n for i in range(1,max_num):\n if dp[i] and i in a:\n for j in np.arange(i*2, max_num, i):\n ...
['Runtime Error', 'Wrong Answer', 'Wrong Answer', 'Accepted']
['s519128975', 's636780303', 's875138104', 's478535182']
[51312.0, 51588.0, 51696.0, 51324.0]
[2207.0, 2206.0, 2206.0, 1936.0]
[433, 430, 380, 378]
p02642
u153094838
2,000
1,048,576
Given is a number sequence A of length N. Find the number of integers i \left(1 \leq i \leq N\right) with the following property: * For every integer j \left(1 \leq j \leq N\right) such that i \neq j , A_j does not divide A_i.
['# -*- coding: utf-8 -*-\n"""\nCreated on Sun Jun 14 21:14:26 2020\n\n@author: NEC-PCuser\n"""\n\nN = int(input())\nA = list(map(int, input().split()))\n\nA.sort()\n\n\nli = []\nli2 = []\nbefore_value = 0\nnext_flg = False\nfor n in A:\n if len(li) == 0:\n li.append(n)\n li2.append(n)\n next_fl...
['Wrong Answer', 'Wrong Answer', 'Accepted']
['s479082831', 's985499919', 's506059859']
[33212.0, 31028.0, 32012.0]
[235.0, 206.0, 954.0]
[730, 733, 453]
p02642
u156815136
2,000
1,048,576
Given is a number sequence A of length N. Find the number of integers i \left(1 \leq i \leq N\right) with the following property: * For every integer j \left(1 \leq j \leq N\right) such that i \neq j , A_j does not divide A_i.
["#from statistics import median\n#import collections\n\n#from fractions import gcd\n#from itertools import combinations # (string,3) 3回\n#from collections import deque\nfrom collections import deque,defaultdict\n\n#\n# d = m - k[i] - k[j]\n\n#\n#\n#\n\n#\n#\n\nimport sys\nsys.setrecursionlimit(10000000)\nmod = 10**...
['Runtime Error', 'Accepted']
['s844876628', 's741494534']
[35176.0, 54928.0]
[178.0, 1856.0]
[1224, 1280]
p02642
u161164709
2,000
1,048,576
Given is a number sequence A of length N. Find the number of integers i \left(1 \leq i \leq N\right) with the following property: * For every integer j \left(1 \leq j \leq N\right) such that i \neq j , A_j does not divide A_i.
['N = int(input())\nA = sorted(list(map(int, input().split())))\n\ndata = [True]*N\n\nfor i in range(N):\n if data[i]:\n for j in range(i,N):\n if A[i]==A[j]:\n data[i]=False\n data[j]=False\n elif A[j]%A[i]==0:\n data[j]=False\n\nprint(data.c...
['Wrong Answer', 'Accepted']
['s036337422', 's867606517']
[32144.0, 52432.0]
[2206.0, 480.0]
[316, 337]
p02642
u164471280
2,000
1,048,576
Given is a number sequence A of length N. Find the number of integers i \left(1 \leq i \leq N\right) with the following property: * For every integer j \left(1 \leq j \leq N\right) such that i \neq j , A_j does not divide A_i.
["from collections import deque\nn = int(input())\nL = []\nfor i in range(n):\n L.append(input())\n\nANS = ['blank page']\nd = deque()\nd.append('blank page')\n\nfor i in range(1, n):\n if L[i] == 'use the back button':\n d.pop()\n t = d.pop()\n ANS.append(t)\n d.append(t)\n else:\n...
['Runtime Error', 'Accepted']
['s795235955', 's838779458']
[13596.0, 44664.0]
[30.0, 623.0]
[504, 590]
p02642
u167908302
2,000
1,048,576
Given is a number sequence A of length N. Find the number of integers i \left(1 \leq i \leq N\right) with the following property: * For every integer j \left(1 \leq j \leq N\right) such that i \neq j , A_j does not divide A_i.
['# coding:utf-8\nn = int(input())\na = list(map(int, input().split()))\nm = max(a)\ncount = [0 for _ in range(m + 1)]\nans = 0\n\nfor i in a:\n if count[i] != 0:\n count[i] = 2\n continue\n for j in range(i, m + 1, i):\n count[j] += 1\n\nprint(count)\n\nfor i in a:\n if count[i] == 1:\n ...
['Wrong Answer', 'Accepted']
['s805465629', 's724835524']
[32936.0, 32168.0]
[565.0, 440.0]
[344, 333]
p02642
u169678167
2,000
1,048,576
Given is a number sequence A of length N. Find the number of integers i \left(1 \leq i \leq N\right) with the following property: * For every integer j \left(1 \leq j \leq N\right) such that i \neq j , A_j does not divide A_i.
['from sys import stdin\nimport numpy as np\ninput = stdin.readline\n\nN = int(input())\nA_list = list(map(int, input().split()))\n# ans_list =np.ones(N)\n# A_list = np.array(A_list)\n\n\n# for j in range(i+1,N):\n# if A_list[i] % A_list[j] == 0:\n# ans_list[i] = 0\n# if (A_list[j] ...
['Wrong Answer', 'Accepted']
['s238842954', 's080122222']
[53592.0, 60652.0]
[1850.0, 1613.0]
[890, 890]
p02642
u173148629
2,000
1,048,576
Given is a number sequence A of length N. Find the number of integers i \left(1 \leq i \leq N\right) with the following property: * For every integer j \left(1 \leq j \leq N\right) such that i \neq j , A_j does not divide A_i.
['N=int(input())\nA=list(map(int,input().split()))\n\nM=max(A)\ncheck=[0]*(M+1)\nfor i in range(N):\n a=A[i]\n if check[a]>0:\n continue\n while a<=M:\n check[a]+=1\n a+=A[i]\nans=0\nfor i in range(N):\n if check[A[i]]==1:\n ans+=1\n\nprint(ans)', 'N=int(input())\nA=list(map(int,...
['Wrong Answer', 'Accepted']
['s010237084', 's019946723']
[32316.0, 32220.0]
[578.0, 614.0]
[266, 276]
p02642
u175034939
2,000
1,048,576
Given is a number sequence A of length N. Find the number of integers i \left(1 \leq i \leq N\right) with the following property: * For every integer j \left(1 \leq j \leq N\right) such that i \neq j , A_j does not divide A_i.
['n = int(input())\nA = list(map(int,input().split()))\nA.sort()\n\nac = A.count(1)\nif ac == 1:\n print(1)\n exit()\nif ac >= 2:\n print(0):\n exit()\n\nnum = [0]*1000005\nfor a in A:\n num[a] += 1\n\nb = [False]*1000005\nseen = [False]*1000005\ncnt = 0\nA = list(set(A))\nA.sort()\nfor a in A:\n if s...
['Runtime Error', 'Accepted']
['s117402227', 's815069370']
[9020.0, 47812.0]
[25.0, 347.0]
[490, 310]
p02642
u179376941
2,000
1,048,576
Given is a number sequence A of length N. Find the number of integers i \left(1 \leq i \leq N\right) with the following property: * For every integer j \left(1 \leq j \leq N\right) such that i \neq j , A_j does not divide A_i.
['n = int(input())\nlst = [int(i) for i in input().split()]\nlst.sort()\n#print(lst)\n\nif lst[0] == 1:\n if n > 1:\n if lst[0] == lst[1]:\n print(0)\n else:\n print(1)\n else:\n print(1)\nelse:\n tf_lst = [1] * lst[n - 1]\n count = 0\n if n > 1:\n pre = 0\n for i in range(n):\n if tf...
['Wrong Answer', 'Accepted']
['s414851129', 's354706965']
[43080.0, 41740.0]
[2206.0, 481.0]
[714, 731]
p02642
u185896732
2,000
1,048,576
Given is a number sequence A of length N. Find the number of integers i \left(1 \leq i \leq N\right) with the following property: * For every integer j \left(1 \leq j \leq N\right) such that i \neq j , A_j does not divide A_i.
['import sys\ninput=sys.stdin.readline\nsys.setrecursionlimit(10**6)\nfrom numba import jit\n\n@jit\ndef Ed(num):\n ret=set()\n for i in range(1,int(num**0.5)+1):\n if num%i==0:\n ret.add(i)\n if num//i!=i:\n ret.add(num//i)\n return ret\n\n@jit\ndef main():\n n=i...
['Time Limit Exceeded', 'Time Limit Exceeded', 'Accepted']
['s464719133', 's684877317', 's480151201']
[137424.0, 153200.0, 31476.0]
[2208.0, 2211.0, 471.0]
[663, 508, 257]
p02642
u188827677
2,000
1,048,576
Given is a number sequence A of length N. Find the number of integers i \left(1 \leq i \leq N\right) with the following property: * For every integer j \left(1 \leq j \leq N\right) such that i \neq j , A_j does not divide A_i.
['n = int(input())\na = list(map(int, input().split()))\n\nans = 0\nfor i in range(n):\n for j in range(n):\n if a[i] != a[j]:\n if a[i]%a[j] == 0:\n ans += 1\n break\nprint(ans)', 'n = int(input())\na = sorted(list(map(int, input().split())))\n\nm = max(a)+1\ndp = [1]*m\nfor i in a:\n if dp[i-1...
['Wrong Answer', 'Accepted']
['s373924563', 's677763738']
[32296.0, 32180.0]
[2206.0, 383.0]
[189, 459]
p02642
u193264896
2,000
1,048,576
Given is a number sequence A of length N. Find the number of integers i \left(1 \leq i \leq N\right) with the following property: * For every integer j \left(1 \leq j \leq N\right) such that i \neq j , A_j does not divide A_i.
["import sys\nreadline = sys.stdin.buffer.readline\nfrom collections import Counter\nsys.setrecursionlimit(10 ** 8)\nINF = float('inf')\nMOD = 10 ** 9 + 7\n\n\ndef main():\n N = int(readline())\n A = list(map(int, readline().split()))\n\n count = Counter(A)\n S = list(set(A))\n S.sort()\n max_A = max(...
['Wrong Answer', 'Accepted']
['s925031437', 's122127414']
[45384.0, 45164.0]
[245.0, 336.0]
[690, 630]
p02642
u193771328
2,000
1,048,576
Given is a number sequence A of length N. Find the number of integers i \left(1 \leq i \leq N\right) with the following property: * For every integer j \left(1 \leq j \leq N\right) such that i \neq j , A_j does not divide A_i.
['def main():\n n=int(input())\n a=sorted(map(int,input().split()))\n maxa=a[-1]+1\n tf=[False]*maxa\n r=0\n n-=1\n for i in range(n):\n a_i=a[i]\n if tf[a_i] ==False:\n for j in range(a_i,maxa,a_i):\n tf[j]=True\n if a_i <a[i+1]:\n #print(a_i)\n r+=1\n if tf[-1] ==False:\n...
['Runtime Error', 'Accepted']
['s146705521', 's988832455']
[8908.0, 32248.0]
[28.0, 210.0]
[330, 329]
p02642
u199290844
2,000
1,048,576
Given is a number sequence A of length N. Find the number of integers i \left(1 \leq i \leq N\right) with the following property: * For every integer j \left(1 \leq j \leq N\right) such that i \neq j , A_j does not divide A_i.
['from collections import Counter\nn = int(input())\na = list(map(int, input().split()))\nc = Counter(a)\ndp = [True] * (10 ** 6 + 1)\ns = list(set(a))\nfor x in s:\n e = x * 2\n while e <= 10 ** 6:\n dp[e] = False\n e += x\nret = 0\nfor x in a:\n if c[x] == 1 and dp[x] == True:\n ret += 1...
['Runtime Error', 'Accepted']
['s199244029', 's503559356']
[52572.0, 51328.0]
[2172.0, 653.0]
[316, 309]
p02642
u206541745
2,000
1,048,576
Given is a number sequence A of length N. Find the number of integers i \left(1 \leq i \leq N\right) with the following property: * For every integer j \left(1 \leq j \leq N\right) such that i \neq j , A_j does not divide A_i.
['n=int(input())\na = list(map(int, input().strip().split()))\na.sort()\nlim=10**6+3\nans=0\nmultiples=[False]*lim\n\nfor i in range(n):\n if multiples[i]==True:\n continue\n if i!=n-1 and a[i]==a[i+1]:\n pass\n else:\n ans+=1\n\n for j in range(a[i],lim,a[i]):\n multiples[j]=Tru...
['Wrong Answer', 'Accepted']
['s667927435', 's167188705']
[32044.0, 32244.0]
[320.0, 332.0]
[314, 319]
p02642
u206890818
2,000
1,048,576
Given is a number sequence A of length N. Find the number of integers i \left(1 \leq i \leq N\right) with the following property: * For every integer j \left(1 \leq j \leq N\right) such that i \neq j , A_j does not divide A_i.
['import numpy as np\nimport math\nimport collections\nimport bisect\n#import sympy\n\n\ndef divisor(n):\n i = 1\n lower_divisors, upper_divisors = [], []\n while(i * i <= n):\n if n % i == 0:\n lower_divisors.append(i)\n if i != n // i:\n upper_divisors.append(n // ...
['Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Accepted']
['s561893628', 's627953188', 's941825450', 's939474581']
[51440.0, 51496.0, 51476.0, 120048.0]
[2216.0, 2216.0, 2219.0, 869.0]
[778, 700, 792, 392]
p02642
u207850265
2,000
1,048,576
Given is a number sequence A of length N. Find the number of integers i \left(1 \leq i \leq N\right) with the following property: * For every integer j \left(1 \leq j \leq N\right) such that i \neq j , A_j does not divide A_i.
['\n#include <algorithm>\n\n\nusing namespace std;\n\n\nint main(void) {\n int n;\n cin >> n;\n\n auto a = vector<int>(n);\n for (int i = 0; i < n; i++)\n {\n cin >> a[i];\n }\n sort(a.begin(), a.end());\n \n int cnt = 0;\n auto flags = vector<bool>(n, true);\n\n for (int i = 0; ...
['Runtime Error', 'Accepted']
['s093049636', 's196903916']
[8960.0, 38308.0]
[24.0, 600.0]
[745, 288]
p02642
u209911545
2,000
1,048,576
Given is a number sequence A of length N. Find the number of integers i \left(1 \leq i \leq N\right) with the following property: * For every integer j \left(1 \leq j \leq N\right) such that i \neq j , A_j does not divide A_i.
['N = int(input())\nL = list(map(int,input().split()))\nL.sort(reverse=True)\ncount = 0\nfor n in np.array(range(N)):\n print(f"N:{n}")\n if n != N-1:\n L_s = L[n+1:]\n else:\n L_s = L[n:]\n print(f"L_s:{L_s}")\n for l_s in L_s:\n print(l_s)\n if L[n]%l_s == 0:\n br...
['Runtime Error', 'Wrong Answer', 'Wrong Answer', 'Accepted']
['s023906733', 's056570436', 's501826162', 's824573882']
[32088.0, 51432.0, 142284.0, 32200.0]
[100.0, 2207.0, 2376.0, 446.0]
[350, 306, 258, 236]
p02642
u214515556
2,000
1,048,576
Given is a number sequence A of length N. Find the number of integers i \left(1 \leq i \leq N\right) with the following property: * For every integer j \left(1 \leq j \leq N\right) such that i \neq j , A_j does not divide A_i.
['def resolve():\n n = int(input())\n aaa = list(map(int, input().split()))\n aaa.sort()\n judge = [1] * len(aaa)\n for i in range(len(aaa) - 1):\n if judge[i]:\n for j in range(i + 1, len(aaa)):\n if aaa[j] % aaa[i] == 0:\n judge[j] = 0\n if...
['Wrong Answer', 'Accepted']
['s299680581', 's819033935']
[16736.0, 38652.0]
[71.0, 617.0]
[1273, 356]
p02642
u216015528
2,000
1,048,576
Given is a number sequence A of length N. Find the number of integers i \left(1 \leq i \leq N\right) with the following property: * For every integer j \left(1 \leq j \leq N\right) such that i \neq j , A_j does not divide A_i.
['n = int(input())\na = list(map(int, input().split()))\na_max = max(a)\nlst = [0] * (a_max + 1)\ncnt = 0\nfor i in a:\n if lst[i] > 1: \n continue\n lst[1::i] += 1\n \n # lst[i * j] += 1\nfor i in a:\n if lst[i] == 1:\n cnt += 1\nprint(cnt)', 'n = int(input())\na = list(map(int, input...
['Runtime Error', 'Wrong Answer', 'Runtime Error', 'Accepted']
['s080869439', 's923450971', 's989556898', 's993495707']
[32188.0, 32240.0, 32184.0, 32180.0]
[84.0, 2206.0, 85.0, 486.0]
[422, 259, 418, 420]
p02642
u216928054
2,000
1,048,576
Given is a number sequence A of length N. Find the number of integers i \left(1 \leq i \leq N\right) with the following property: * For every integer j \left(1 \leq j \leq N\right) such that i \neq j , A_j does not divide A_i.
['N = int(input())\nAS = [int(x) for x in input().split()]\n\nAS.sort()\n\nok = []\nfor i in range(N):\n for j in range(N):\n if AS[i] == AS[j]:\n break\n if i <= j:\n break\n if AS[i] % AS[j] == 0:\n break\n else:\n ok.append(i)\n\nprint(len(ok))\n', '...
['Wrong Answer', 'Accepted']
['s842923310', 's749506053']
[32336.0, 43700.0]
[2206.0, 659.0]
[296, 429]
p02642
u217732870
2,000
1,048,576
Given is a number sequence A of length N. Find the number of integers i \left(1 \leq i \leq N\right) with the following property: * For every integer j \left(1 \leq j \leq N\right) such that i \neq j , A_j does not divide A_i.
['n = int(input())\nA = sorted(map(int, input().split()))\n\nB = [1 for _ in range(n)]\n\nfor i in range(n):\n if A[i]*2 > A[n-1] and A[i] <= A[n-1]:\n if i < n-1 and A[i] == A[i+1]:\n B[i] = 0\n B[i+1] = 0\n for j in range(n)[i+2:]:\n if A[j] == A[i]:\n B[j] = 0\n else:\n ...
['Wrong Answer', 'Runtime Error', 'Accepted']
['s324140423', 's832617963', 's908929882']
[32332.0, 42788.0, 42928.0]
[2206.0, 651.0, 729.0]
[679, 300, 312]
p02642
u219494936
2,000
1,048,576
Given is a number sequence A of length N. Find the number of integers i \left(1 \leq i \leq N\right) with the following property: * For every integer j \left(1 \leq j \leq N\right) such that i \neq j , A_j does not divide A_i.
['import numpy as np\n\nN = int(input())\nA = [int(x) for x in input().split(" ")]\nAmax = max(A)\ndp = np.ones(Amax, dtype=bool)\nappear = np.zeros(Amax, dtype=int)\nfor a in A:\n appear[a-1] += 1\n\nfor i in range(1, len(dp)+1):\n if not dp[i-1]:\n continue\n if appear[i-1] != 0:\n j = 2\n while j * i <= ...
['Runtime Error', 'Accepted']
['s333612608', 's403125905']
[51664.0, 51316.0]
[1155.0, 1133.0]
[466, 459]
p02642
u221272125
2,000
1,048,576
Given is a number sequence A of length N. Find the number of integers i \left(1 \leq i \leq N\right) with the following property: * For every integer j \left(1 \leq j \leq N\right) such that i \neq j , A_j does not divide A_i.
['N = int(input())\nA = list(map(int,input().split()))\nA.sort()\nd = {}\nn = A[-1]\ndef makePrimeChecker(n):\n isPrime = [True] * (n + 1)\n isPrime[0] = False\n isPrime[1] = False\n i = 0\n for j in A:\n if i == j:\n d[i] = 1\n i = j\n if i > 10**3:\n break\n ...
['Runtime Error', 'Runtime Error', 'Wrong Answer', 'Runtime Error', 'Wrong Answer', 'Accepted']
['s011420583', 's149141099', 's339840959', 's553688449', 's949648056', 's857165352']
[33228.0, 25296.0, 33416.0, 33224.0, 32372.0, 32376.0]
[145.0, 2206.0, 208.0, 107.0, 2206.0, 299.0]
[606, 351, 586, 586, 548, 521]
p02642
u228232845
2,000
1,048,576
Given is a number sequence A of length N. Find the number of integers i \left(1 \leq i \leq N\right) with the following property: * For every integer j \left(1 \leq j \leq N\right) such that i \neq j , A_j does not divide A_i.
['import sys\n\n\ndef input(): return sys.stdin.readline().strip()\ndef I(): return int(input())\ndef LI(): return list(map(int, input().split()))\n\n\nn = I()\na = LI()\n\ncnt = [0] * ((10 ** 6) + 1)\nunique = []\n\nfor i in range((10 ** 6) + 1):\n if cnt[i] == 1:\n unique.append(i)\n\n\na = list(set(a)) \n...
['Wrong Answer', 'Wrong Answer', 'Accepted']
['s142440669', 's303370556', 's210919988']
[41568.0, 39880.0, 47528.0]
[1634.0, 1504.0, 1600.0]
[751, 484, 465]
p02642
u228303592
2,000
1,048,576
Given is a number sequence A of length N. Find the number of integers i \left(1 \leq i \leq N\right) with the following property: * For every integer j \left(1 \leq j \leq N\right) such that i \neq j , A_j does not divide A_i.
['import numpy as np\n\ndef main():\n N = int(input())\n A = list(map(int,input().split()))\n A.sort()\n d = np.zeros(A[-1]+1, dtype=np.uint64)\n \n for i in range(N):\n a = A[i]\n a1 = A[i-1]\n if a != a1:\n d[a::a] += 1\n else:\n d[a] += 1\n print(np.count_nonzero(d[A] == 1))\n \nprint(m...
['Wrong Answer', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted']
['s036607686', 's139126637', 's372782415', 's376124430', 's732184550', 's595726781']
[51604.0, 9044.0, 51332.0, 51644.0, 51600.0, 51472.0]
[680.0, 24.0, 195.0, 191.0, 193.0, 647.0]
[307, 307, 331, 308, 325, 300]
p02642
u233107306
2,000
1,048,576
Given is a number sequence A of length N. Find the number of integers i \left(1 \leq i \leq N\right) with the following property: * For every integer j \left(1 \leq j \leq N\right) such that i \neq j , A_j does not divide A_i.
['def main():\n n = int(input())\n a = list(map(int, input().split()))\n a = sorted(a)\n\n max_a = a[-1]\n dp = [True] * max_a\n\n for i in a:\n x = 1\n while i * x <= max_a:\n dp[i * x] = False\n x += 1\n\n ans = 0\n for i in a:\n if dp[i]:\n ...
['Runtime Error', 'Accepted']
['s277564122', 's760986052']
[32108.0, 32380.0]
[417.0, 492.0]
[367, 490]
p02642
u238084414
2,000
1,048,576
Given is a number sequence A of length N. Find the number of integers i \left(1 \leq i \leq N\right) with the following property: * For every integer j \left(1 \leq j \leq N\right) such that i \neq j , A_j does not divide A_i.
['import math\n\ndef isPrime(n):\n if n == 1:\n return False\n for k in range(2, int(math.sqrt(n)) + 1):\n if n % k == 0:\n return False\n return True\n\ndef isDiv(x, y):\n if x % y == 0:\n return True\n else:\n return False\n\nN = int(input())\nA = sorted(list(map(int, input().split())))\ncnt = N...
['Wrong Answer', 'Wrong Answer', 'Accepted']
['s168460191', 's278613961', 's996456917']
[33204.0, 32564.0, 32384.0]
[2206.0, 2206.0, 357.0]
[733, 695, 204]
p02642
u242580186
2,000
1,048,576
Given is a number sequence A of length N. Find the number of integers i \left(1 \leq i \leq N\right) with the following property: * For every integer j \left(1 \leq j \leq N\right) such that i \neq j , A_j does not divide A_i.
["import sys\nread = sys.stdin.readline\nimport time\nimport math\nimport itertools as it\ndef inp():\n return int(input())\ndef inpl():\n return list(map(int, input().split()))\nst = time.perf_counter()\n# ------------------------------\n\nN = inp()\nA = inpl()\nA.sort()\ndp = [False] * 1001001\nnt = -1\nfor i i...
['Runtime Error', 'Accepted']
['s738956146', 's283776841']
[33012.0, 32296.0]
[320.0, 562.0]
[645, 705]
p02642
u243714267
2,000
1,048,576
Given is a number sequence A of length N. Find the number of integers i \left(1 \leq i \leq N\right) with the following property: * For every integer j \left(1 \leq j \leq N\right) such that i \neq j , A_j does not divide A_i.
['n = int(input())\na = list(map(int, input().split()))\nli = [1]*(10**6+5)\na.sort()\nans = 1\n\nfor i in range(a[0], len(li), a[0]):\n li[i] = [0]\n\nflag = False\nfor i in range(1, len(a)):\n if a[i-1] == a[i]:\n flag = True\n continue\n else:\n flag = False\n ans -= 1\n if li[a[i]] == 1:\n ans +=...
['Wrong Answer', 'Accepted']
['s959586981', 's358736835']
[104616.0, 104496.0]
[736.0, 686.0]
[390, 483]
p02642
u244416763
2,000
1,048,576
Given is a number sequence A of length N. Find the number of integers i \left(1 \leq i \leq N\right) with the following property: * For every integer j \left(1 \leq j \leq N\right) such that i \neq j , A_j does not divide A_i.
['n = int(input())\na = list(map(int,input().split()))\nr = [0 for _ in range(max(a)+1)]\nl = [1 for _ in range(max(a)+1)]\nans = 0\nfor i in a:\n r[i] += 1\nfor i in range(len(r)):\n if r[i]:\n for j in range(2*i,len(r),i):\n if 1 < r[j]:\n break\n elif (r[j] == 1 and ...
['Wrong Answer', 'Accepted']
['s567192101', 's309219176']
[35284.0, 35032.0]
[591.0, 627.0]
[373, 341]
p02642
u253011685
2,000
1,048,576
Given is a number sequence A of length N. Find the number of integers i \left(1 \leq i \leq N\right) with the following property: * For every integer j \left(1 \leq j \leq N\right) such that i \neq j , A_j does not divide A_i.
['X,N = map(int, input().split())\nif N==0:\n print(X)\nelse:\n p=list(map(int,input().split()))\n A=[i for i in range(100) if i not in p]\n\nmini=101\nminip=101\nfor i in range(N):\n if abs(p[i]-X) <=mini:\n mini= abs(p[i]-X)\n minip=p[i]\n \n\nminimini=101\nanswer=101\nfor a in A:\n ...
['Runtime Error', 'Accepted']
['s882954923', 's263266299']
[9236.0, 32252.0]
[24.0, 483.0]
[389, 199]
p02642
u263660661
2,000
1,048,576
Given is a number sequence A of length N. Find the number of integers i \left(1 \leq i \leq N\right) with the following property: * For every integer j \left(1 \leq j \leq N\right) such that i \neq j , A_j does not divide A_i.
['N = int(input())\nA = sorted(list(map(int, input().split())))\n\ncnt = 1\nfor i in range(N):\n for j in range(i):\n print(i, j)\n if A[i] % A[j] == 0:\n break\n elif j == i - 1:\n cnt += 1\n\nprint(cnt)\n', 'N = int(input())\nA = list(map(int, input().split()))\n\ncnt = N...
['Wrong Answer', 'Wrong Answer', 'Accepted']
['s406823810', 's730911814', 's003257029']
[40964.0, 33100.0, 32252.0]
[2266.0, 2206.0, 472.0]
[237, 340, 207]
p02642
u263753244
2,000
1,048,576
Given is a number sequence A of length N. Find the number of integers i \left(1 \leq i \leq N\right) with the following property: * For every integer j \left(1 \leq j \leq N\right) such that i \neq j , A_j does not divide A_i.
['n=int(input())\na=list(map(int,input().split()))\na.sort()\nM=max(a)\np=[]\nfor i in range(n):\n if i+1<=n-1:\n if a[i]==a[i+1]:\n p+=[j for j in range(a[i],M+1,a[i])]\n else:\n p+=[j for j in range(a[i]*2,M+1,a[i])]\n\nprint(len(set(set(a)-set(p))))', 'import math\nimport sys\nn=int(in...
['Wrong Answer', 'Runtime Error', 'Accepted']
['s145563940', 's440752143', 's232230371']
[66092.0, 153236.0, 192024.0]
[368.0, 526.0, 638.0]
[269, 192, 334]
p02642
u264395947
2,000
1,048,576
Given is a number sequence A of length N. Find the number of integers i \left(1 \leq i \leq N\right) with the following property: * For every integer j \left(1 \leq j \leq N\right) such that i \neq j , A_j does not divide A_i.
['import math\n\nN = int(input())\nA = sorted(list(set(map(int, input().split()))))\nans = 0\n\nif len(A) > 1:\n for i in range(len(A)):\n for j in range(i+1):\n if A[j] > math.sqrt(A[i]):\n ans += 1\n break\n if A[i] % A[j] == 0:\n if j != i:...
['Wrong Answer', 'Wrong Answer', 'Accepted']
['s190058472', 's744174328', 's999134762']
[41552.0, 42988.0, 32252.0]
[2206.0, 2206.0, 647.0]
[378, 890, 334]
p02642
u271469978
2,000
1,048,576
Given is a number sequence A of length N. Find the number of integers i \left(1 \leq i \leq N\right) with the following property: * For every integer j \left(1 \leq j \leq N\right) such that i \neq j , A_j does not divide A_i.
['N = int(input())\nA = list(map(int, input().split()))\nMAX = max(A)\ndp = [True for _ in range(MAX+1)]\n\nfor a in set(A):\n for k in range(2*a,MAX+1,a):\n dp[k] = False\nB = sorted(A)\nfor i in range(len(B)-1):\n if B[i] == B[i+1]:\n dp[B[i]] = False\n\nprint(sum(dp[a] for a in set(A)))\nprint(dp...
['Wrong Answer', 'Accepted']
['s132536937', 's107513766']
[45024.0, 41992.0]
[477.0, 441.0]
[305, 295]
p02642
u277236383
2,000
1,048,576
Given is a number sequence A of length N. Find the number of integers i \left(1 \leq i \leq N\right) with the following property: * For every integer j \left(1 \leq j \leq N\right) such that i \neq j , A_j does not divide A_i.
['import bisect\nn = int(input())\na = list(map(int, input().split()))\na.sort()\nans = 0\nfor i in range(n):\n if a[i] != 0:\n if i == n-1:\n ans +=1\n else: \n if a[i] == a[i+1]:\n for j in range(i+1, n):\n if a[j]%a[i]==0:\n a[j]=0\n else:\n ans += 1\n f...
['Wrong Answer', 'Accepted']
['s445996337', 's341336049']
[32300.0, 33096.0]
[2206.0, 697.0]
[421, 330]
p02642
u277556971
2,000
1,048,576
Given is a number sequence A of length N. Find the number of integers i \left(1 \leq i \leq N\right) with the following property: * For every integer j \left(1 \leq j \leq N\right) such that i \neq j , A_j does not divide A_i.
['import sys\ninput = sys.stdin.readline\nimport math\nfrom collections import defaultdict\n\nn = map(int, input())\na = list(map(int, input().split()))\nN = 1000005\nb = [0] * N\n\nd = defaultdict(int)\nfor x in a:\n d[x] += 1\n\nfor x in d:\n for j in list(range(2, N)):\n if x * j >= N || b[x * j] == 1: ...
['Runtime Error', 'Runtime Error', 'Accepted']
['s393812104', 's592057572', 's417065653']
[8852.0, 8956.0, 64976.0]
[24.0, 31.0, 612.0]
[523, 2267, 310]
p02642
u285022453
2,000
1,048,576
Given is a number sequence A of length N. Find the number of integers i \left(1 \leq i \leq N\right) with the following property: * For every integer j \left(1 \leq j \leq N\right) such that i \neq j , A_j does not divide A_i.
["x, n = map(int, input().split())\np = list(map(int, input().split()))\n\np_all = set(range(0, 102)) - set(p)\n# print(p_all)\n\nmi = float('inf')\nans = 0\nfor i in p_all:\n if abs(x - i) < mi:\n mi = abs(x - i)\n ans = i\n\nprint(ans)\n", 'import sys\nimport math\n\nn = int(input())\na = list(map(in...
['Runtime Error', 'Accepted']
['s444532593', 's709992719']
[9116.0, 40232.0]
[28.0, 767.0]
[240, 398]
p02642
u291988695
2,000
1,048,576
Given is a number sequence A of length N. Find the number of integers i \left(1 \leq i \leq N\right) with the following property: * For every integer j \left(1 \leq j \leq N\right) such that i \neq j , A_j does not divide A_i.
['n=int(input())\nl=list(map(int,input().split()))\nl.sort()\nans=0\nfor i in range(n):\n flag=True\n s=l[-1-i]\n for j in range(n):\n if n-1-i==j:\n pass\n else:\n if s%l[j]==0:\n flag=False\n break\n if flag:\n ans+=1', 'n=int(input())\nl=list(map(int,input().split()))\nl.sort()\n...
['Wrong Answer', 'Accepted']
['s867485012', 's778643015']
[32384.0, 32168.0]
[2206.0, 624.0]
[239, 283]
p02642
u294385082
2,000
1,048,576
Given is a number sequence A of length N. Find the number of integers i \left(1 \leq i \leq N\right) with the following property: * For every integer j \left(1 \leq j \leq N\right) such that i \neq j , A_j does not divide A_i.
['from collections import Counter\n\nn = int(input())\na = list(map(int,input().split()))\na.sort()\nA = list(set(a))\nA.sort()\n\ndef nd():\n ans = 0\n l = [1 for _ in range(len(A))]\n print(l)\n ind = 0\n i = A[ind]\n \n while i <= A[-1]//2:\n if l[A.index(i)] == 1:\n j = 2 * i\n ...
['Wrong Answer', 'Accepted']
['s599355079', 's906669360']
[42700.0, 48816.0]
[2207.0, 545.0]
[644, 386]
p02642
u303739137
2,000
1,048,576
Given is a number sequence A of length N. Find the number of integers i \left(1 \leq i \leq N\right) with the following property: * For every integer j \left(1 \leq j \leq N\right) such that i \neq j , A_j does not divide A_i.
['import numpy as np\nn = int(input())\naa = list(map(int, input().split()))\naa.sort()\n\nfrom collections import Counter\ndic = Counter(aa)\ntimes = np.array(list(dic.keys()))[np.array(list(dic.values())) > 1]\n\naa = list(set(aa) - set(times))\noks = np.ones(len(aa))\nfor i in range(len(aa)):\n for j in range(i+1...
['Wrong Answer', 'Accepted']
['s547331588', 's660872926']
[69200.0, 63152.0]
[2208.0, 481.0]
[392, 358]
p02642
u307622233
2,000
1,048,576
Given is a number sequence A of length N. Find the number of integers i \left(1 \leq i \leq N\right) with the following property: * For every integer j \left(1 \leq j \leq N\right) such that i \neq j , A_j does not divide A_i.
["import sys\ninput = sys.stdin.readline\n\n\ndef main():\n n = int(input())\n A = [int(i) for i in input().split()]\n\n # MOD = 10 ** 9 + 7\n A.sort()\n s = set()\n\n ans = 0\n if A[0] != A[1]:\n ans += 1\n\n for i in range(1, n):\n if A[i - 1] == A[i]:\n continue\n\n ...
['Runtime Error', 'Runtime Error', 'Wrong Answer', 'Wrong Answer', 'Runtime Error', 'Wrong Answer', 'Accepted']
['s064561961', 's164087956', 's284569106', 's533604671', 's568716157', 's680928413', 's113337831']
[9076.0, 32132.0, 27172.0, 51536.0, 31308.0, 27172.0, 32164.0]
[24.0, 130.0, 106.0, 1532.0, 102.0, 109.0, 266.0]
[575, 331, 349, 395, 374, 352, 333]
p02642
u312025627
2,000
1,048,576
Given is a number sequence A of length N. Find the number of integers i \left(1 \leq i \leq N\right) with the following property: * For every integer j \left(1 \leq j \leq N\right) such that i \neq j , A_j does not divide A_i.
["from numba import njit, int32\nimport numpy as np\n\n\n@njit(int32(int32[:], int32[:]))\ndef main(A, B):\n ans = 0\n\n for a in A:\n B[a] += 1\n\n for a in set(A):\n v = 2*a\n while v <= 10**6:\n B[v] += 1\n v += a\n\n for a in A:\n if B[a] == 1:\n ...
['Runtime Error', 'Accepted']
['s559222539', 's639620703']
[139496.0, 143952.0]
[902.0, 788.0]
[498, 615]
p02642
u312158169
2,000
1,048,576
Given is a number sequence A of length N. Find the number of integers i \left(1 \leq i \leq N\right) with the following property: * For every integer j \left(1 \leq j \leq N\right) such that i \neq j , A_j does not divide A_i.
['n = int(input())\na = [int(x) for x in input().split()]\n\na.sort()\n\nif n == 1:\n print(1)\n exit()\n\nans = [1] * (a[n-1]+1)\n\nfor i in range(n):\n if i >= 1 and a[i] == a[i-1]:\n ans[a[i]] = 0\n\n else:\n j = 2\n while j*a[i] <= a[n-1]:\n ans[j*a[i]] = 0\n j...
['Wrong Answer', 'Accepted']
['s274732993', 's467267711']
[32108.0, 32168.0]
[905.0, 935.0]
[327, 369]
p02642
u312695001
2,000
1,048,576
Given is a number sequence A of length N. Find the number of integers i \left(1 \leq i \leq N\right) with the following property: * For every integer j \left(1 \leq j \leq N\right) such that i \neq j , A_j does not divide A_i.
['def main():\n\n N = int(input())\n A = list(map(int, input().split()))\n\n A = sorted(A)\n Amax = A[-1]\n count = [0 for _ in range(Amax+1)]\n\n for a in A:\n for i in range(1, Amax//a+1):\n count[i*a] += 1\n\n ans = 0\n for i in range(N):\n a = A[i]\n if count[...
['Wrong Answer', 'Wrong Answer', 'Runtime Error', 'Accepted']
['s257041402', 's445220654', 's838922205', 's773702772']
[32272.0, 32376.0, 9000.0, 32232.0]
[427.0, 2206.0, 24.0, 429.0]
[570, 465, 453, 549]
p02642
u314089899
2,000
1,048,576
Given is a number sequence A of length N. Find the number of integers i \left(1 \leq i \leq N\right) with the following property: * For every integer j \left(1 \leq j \leq N\right) such that i \neq j , A_j does not divide A_i.
['import collections\n\n#N = int(input())\n\n\nimport random\nN = 2 * 10**5\nA_list = [random.randrange(1,10**6) for _ in range(N+1)]\n\nA_counter = collections.Counter(A_list)\n\nmax_A = max(A_list)\n\nA_list.sort(reverse=False)\nOK_set = set(A_list)\n\nans = list()\n\n\n\nfor i in range(0,N):\n A = A_list[i]\n\n ...
['Wrong Answer', 'Accepted']
['s787703455', 's233525979']
[134100.0, 100236.0]
[812.0, 489.0]
[681, 682]
p02642
u316733945
2,000
1,048,576
Given is a number sequence A of length N. Find the number of integers i \left(1 \leq i \leq N\right) with the following property: * For every integer j \left(1 \leq j \leq N\right) such that i \neq j , A_j does not divide A_i.
['n = int(input())\na = list(map(int, input().split()))\na.sort()\nnum = 0\nl = []\n\nfor i in range(n):\n flag = 0\n if i == 0:\n if a[0]==a[1]:\n l.append(a[0])\n continue\n else:\n l.append(a[0])\n num += 1\n continue\n for j in l:\n ...
['Runtime Error', 'Accepted']
['s306524901', 's248538867']
[32160.0, 32180.0]
[218.0, 1344.0]
[449, 282]
p02642
u317423698
2,000
1,048,576
Given is a number sequence A of length N. Find the number of integers i \left(1 \leq i \leq N\right) with the following property: * For every integer j \left(1 \leq j \leq N\right) such that i \neq j , A_j does not divide A_i.
['import sys\nfrom itertools import groupby\n\nreadline = sys.stdin.buffer.readline\nreadline()\nb = list(map(int, readline().split()))\n\nb.sort(reverse=True)\n# print(b)\n\nx = len(b)\nc = [(k, len(tuple(L))) for k, L in groupby(b)]\n# print(c)\nfor i, v in enumerate(c):\n if v[1] > 1:\n x -= v[1]\n continue\n...
['Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Accepted']
['s296971396', 's362056424', 's366411649', 's322643816']
[67948.0, 34168.0, 32644.0, 38640.0]
[2279.0, 2206.0, 2206.0, 337.0]
[406, 403, 395, 416]
p02642
u321035578
2,000
1,048,576
Given is a number sequence A of length N. Find the number of integers i \left(1 \leq i \leq N\right) with the following property: * For every integer j \left(1 \leq j \leq N\right) such that i \neq j , A_j does not divide A_i.
["def main():\n n = int(input())\n a = list(map(int,input().split()))\n\n ans = 0\n from collections import Counter\n cnt = Counter(a)\n lim = max(a) + 1\n tmp = [0] * (lim)\n # set_a = list(set(a))\n # set_a.sort()\n a.sort()\n\n for aa in a:\n if tmp[aa] == 0:\n for ...
['Wrong Answer', 'Accepted']
['s233783984', 's880160844']
[38676.0, 38564.0]
[286.0, 281.0]
[552, 498]
p02642
u331105860
2,000
1,048,576
Given is a number sequence A of length N. Find the number of integers i \left(1 \leq i \leq N\right) with the following property: * For every integer j \left(1 \leq j \leq N\right) such that i \neq j , A_j does not divide A_i.
['import numba\nfrom numba import njit, b1, i4, i8, f8\nimport numpy as np \n\nN = int(input())\nA = np.array(sorted([int(x) for x in input().split()]))\n\nprint(A)\n\n\n@njit((i8[:], ), cache=True)\ndef main(A):\n ans = 0\n for i in range(len(A) - 1, 0, -1):\n for j in range(i):\n if A[i] == A...
['Wrong Answer', 'Accepted']
['s297601548', 's359031754']
[115144.0, 121484.0]
[2208.0, 739.0]
[557, 423]
p02642
u340040203
2,000
1,048,576
Given is a number sequence A of length N. Find the number of integers i \left(1 \leq i \leq N\right) with the following property: * For every integer j \left(1 \leq j \leq N\right) such that i \neq j , A_j does not divide A_i.
["import sys\nimport numpy as np\ninput = lambda: sys.stdin.readline().rstrip()\n\ndef main():\n n = int(input())\n a = list(map(int, input().split()))\n a = sorted([i for i in a if a.count(i) == 1])\n a = np.array(a)\n ans = []\n if let(set(a)) == 1:\n print(0)\n return\n while a != ...
['Runtime Error', 'Accepted']
['s089398874', 's652129197']
[51556.0, 38220.0]
[2206.0, 362.0]
[425, 509]
p02642
u343021464
2,000
1,048,576
Given is a number sequence A of length N. Find the number of integers i \left(1 \leq i \leq N\right) with the following property: * For every integer j \left(1 \leq j \leq N\right) such that i \neq j , A_j does not divide A_i.
['n = int(input())\na = list(map(int, input().split()))\ncounter = [0 for _ in range(n)]\nfor i in range(n):\n for j in range(n):\n if i == j:\n continue\n else:\n if counter[i] > 0:\n continue\n else:\n if a[i] % a[j] == 0:\n ...
['Runtime Error', 'Wrong Answer', 'Accepted']
['s658874350', 's791946031', 's688687280']
[9048.0, 51708.0, 59408.0]
[27.0, 1266.0, 545.0]
[352, 336, 272]
p02642
u347203174
2,000
1,048,576
Given is a number sequence A of length N. Find the number of integers i \left(1 \leq i \leq N\right) with the following property: * For every integer j \left(1 \leq j \leq N\right) such that i \neq j , A_j does not divide A_i.
['import numpy as np\n\nN = int(input())\nMAXX = 10**6 + 5\nnum = np.array(input().split(), np.int32)[:]\nmark = np.zeros(MAXX, np.int32)\n\nnum = np.sort(num)\nfor n in num:\n if mark[n::n] < 2:\n mark[n::n] += 1\n\ncount = 0\nfor n in num:\n if mark[n] == 1:\n count += 1\n\nprint(count)', 'import ...
['Runtime Error', 'Accepted']
['s732528072', 's338361679']
[49932.0, 49780.0]
[1062.0, 1117.0]
[290, 287]
p02642
u347600233
2,000
1,048,576
Given is a number sequence A of length N. Find the number of integers i \left(1 \leq i \leq N\right) with the following property: * For every integer j \left(1 \leq j \leq N\right) such that i \neq j , A_j does not divide A_i.
['n = int(input())\na = sorted([int(i) for i in input().split()])\ncnt_d = [0] * (max(a) + 1)\ncnt_nd = 0\nfor ai in a:\n if cnt_d[ai] >= 1:\n continue\n else:\n cnt_d[ai] += 1\n cnt_nd += 1\n multi = 2\n while ai*multi <= max_a:\n cnt_d[ai*multi] += 1\n multi += 1\nprint(...
['Runtime Error', 'Wrong Answer', 'Accepted']
['s387393923', 's771304092', 's474849491']
[32200.0, 32104.0, 31992.0]
[126.0, 470.0, 428.0]
[311, 209, 218]
p02642
u347640436
2,000
1,048,576
Given is a number sequence A of length N. Find the number of integers i \left(1 \leq i \leq N\right) with the following property: * For every integer j \left(1 \leq j \leq N\right) such that i \neq j , A_j does not divide A_i.
['N = int(input())\nA = list(map(int, input().split()))\n\nA = sorted(set(A))\nt = [True] * (10 ** 6 + 1)\n\nfor a in A:\n for i in range(a, 10 ** 6 + 1, a):\n t[i] = False\n\nresult = 0\nfor a in A:\n if t[a]:\n result += 1\nprint(result)\n', 'N = int(input())\nA = list(map(int, input().split()))\n...
['Wrong Answer', 'Wrong Answer', 'Accepted']
['s489882341', 's637024465', 's614569389']
[32256.0, 52052.0, 44212.0]
[1163.0, 1246.0, 1820.0]
[244, 286, 304]
p02642
u348432940
2,000
1,048,576
Given is a number sequence A of length N. Find the number of integers i \left(1 \leq i \leq N\right) with the following property: * For every integer j \left(1 \leq j \leq N\right) such that i \neq j , A_j does not divide A_i.
['# D - Not Divisible\ndef aline_mintomax(arr, N):\n for i in reversed(range(1,N)):\n for j in range(i):\n if arr[j] > arr[j+1]:\n arr[j], arr[j+1] = arr[j+1], arr[j]\n return arr\n\nN = int(input()) \nnum_list = list(map(int, input().split())) \nind_list = [i for i in range(N)]\n...
['Wrong Answer', 'Wrong Answer', 'Accepted']
['s102731465', 's401387224', 's949867041']
[32356.0, 32244.0, 32232.0]
[2206.0, 2206.0, 413.0]
[708, 706, 292]
p02642
u350248178
2,000
1,048,576
Given is a number sequence A of length N. Find the number of integers i \left(1 \leq i \leq N\right) with the following property: * For every integer j \left(1 \leq j \leq N\right) such that i \neq j , A_j does not divide A_i.
['import numpy as np\nn,*a=map(int,open(0).read().split())\nl=np.zeros(max(a)+1)\na.sort()\na+=[10**7]\nr=0\nfor i,j in zip(a,a[1:]):\n if l[i]==0:\n l[::i]=1\n if i!=j:\n r+=1\n print(i)\nprint(r)', 'import numpy as np\nn,*a=map(int,open(0).read().split())\nl=np.zeros(max(a)+1)\n...
['Wrong Answer', 'Accepted']
['s506562187', 's140034278']
[50460.0, 50528.0]
[494.0, 394.0]
[222, 201]
p02642
u350997995
2,000
1,048,576
Given is a number sequence A of length N. Find the number of integers i \left(1 \leq i \leq N\right) with the following property: * For every integer j \left(1 \leq j \leq N\right) such that i \neq j , A_j does not divide A_i.
['from collections import Counter\nN = int(input())\nA = list(map(int,input().split()))\nC = Counter(A).most_common()\n\nMAXN = max(A)\nB = [False]*(MAXN+1)\nfor c in C:\n B[c[0]] = True\nans = 0\nfor i in range(MAXN + 1):\n if B[i]:\n if C[i]==1:\n ans += 1\n B[i::i] = [False]*(MAXN//i)\...
['Runtime Error', 'Accepted']
['s797493598', 's047066780']
[52248.0, 52196.0]
[241.0, 302.0]
[314, 314]
p02642
u354804355
2,000
1,048,576
Given is a number sequence A of length N. Find the number of integers i \left(1 \leq i \leq N\right) with the following property: * For every integer j \left(1 \leq j \leq N\right) such that i \neq j , A_j does not divide A_i.
['def main():\n n=int(input())\n a=sorted(map(int,input().split()))\n maxa=a[-1]\n tf=[True]*maxa\n r=0\n n-=1\n for i in range(n): \n a_i=a[i]\n if tf[a_i-1] ==True: \n for j in range(a_i - 1,maxa,a_i):\n tf[j]=False\n if a_i < a[i+1]: \n print(a_i)\n r+=1\n if tf[-1] == Tr...
['Wrong Answer', 'Accepted']
['s341578773', 's140248764']
[32136.0, 32248.0]
[262.0, 282.0]
[463, 444]
p02642
u355078864
2,000
1,048,576
Given is a number sequence A of length N. Find the number of integers i \left(1 \leq i \leq N\right) with the following property: * For every integer j \left(1 \leq j \leq N\right) such that i \neq j , A_j does not divide A_i.
['from sys import stdin\n\nn = [int(x) for x in stdin.readline().rstrip().split()]\nP = [int(x) for x in stdin.readline().rstrip().split()]\n\nrest_lists = []\n\nP.sort()\n\ndef return_filtered(div, rl):\n new = []\n protect = True\n for tgt in rl:\n if protect and tgt == div:\n new.append(tg...
['Wrong Answer', 'Runtime Error', 'Accepted']
['s830132207', 's837758624', 's622457077']
[103724.0, 98248.0, 47404.0]
[3349.0, 2912.0, 1984.0]
[693, 692, 1373]
p02642
u357751375
2,000
1,048,576
Given is a number sequence A of length N. Find the number of integers i \left(1 \leq i \leq N\right) with the following property: * For every integer j \left(1 \leq j \leq N\right) such that i \neq j , A_j does not divide A_i.
['n = int(input())\na = list(map(int,input().split()))\na.sort(reverse = True)\np = 0\nif 1 in a:\n if a.count(1) >= 2:\n print(0)\n exit(0)\n else:\n print(1)\n exit(0)\n\nfor i in range(n):\n if a.count(a[i]) >= 2:\n pass\n else:\n for j in range(n):\n ...
['Wrong Answer', 'Runtime Error', 'Wrong Answer', 'Runtime Error', 'Accepted']
['s200006687', 's212409072', 's506286264', 's910073165', 's559073912']
[32376.0, 9032.0, 32072.0, 9044.0, 37292.0]
[2206.0, 19.0, 2206.0, 25.0, 533.0]
[442, 350, 314, 311, 312]
p02642
u364774090
2,000
1,048,576
Given is a number sequence A of length N. Find the number of integers i \left(1 \leq i \leq N\right) with the following property: * For every integer j \left(1 \leq j \leq N\right) such that i \neq j , A_j does not divide A_i.
['N = int(input())\nA = list(map(int, input().split()))\nA.sort()\nB = [0] * (2 * 10 ** 5 + 1)\nM = max(A)\n\nfor a in A:\n\tB[a] += 1\n\nif sum(B) == N:\n\tprint(0)\nelse:\n\tfor a in A:\n\t\tif B[a] > 0:\n\t\t\ti = 2\n\t\t\tb = a * i\n\t\t\twhile b <= M:\n\t\t\t\tB[b] = 0\n\t\t\t\ti += 1\n\t\t\t\tb = a * i\n\tfor b i...
['Runtime Error', 'Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted']
['s071693228', 's080340058', 's243400627', 's352017469', 's674146303', 's745307093', 's901148431', 's163609700']
[32160.0, 32096.0, 32172.0, 32236.0, 32380.0, 32164.0, 32292.0, 32256.0]
[144.0, 2206.0, 112.0, 106.0, 235.0, 141.0, 134.0, 735.0]
[314, 213, 120, 100, 262, 177, 124, 334]
p02642
u366996583
2,000
1,048,576
Given is a number sequence A of length N. Find the number of integers i \left(1 \leq i \leq N\right) with the following property: * For every integer j \left(1 \leq j \leq N\right) such that i \neq j , A_j does not divide A_i.
['import collections\nn=int(input())\nl=list(map(int,input().split()))\nc=collections.Counter(l)\ndef j(n):\n j=1\n for k in c.keys():\n if n%k==0:\n if n!=k:\n j=0\n break\ncount=0\nfor i in c.keys():\n if j(i)==1:\n count+=1\nprint(count)', 'n=int(input())\na=list(map(int,input()....
['Wrong Answer', 'Accepted']
['s314349501', 's308340895']
[36108.0, 32016.0]
[2206.0, 446.0]
[260, 195]
p02642
u372501464
2,000
1,048,576
Given is a number sequence A of length N. Find the number of integers i \left(1 \leq i \leq N\right) with the following property: * For every integer j \left(1 \leq j \leq N\right) such that i \neq j , A_j does not divide A_i.
['N = int(input())\nAl = [int(i) for i in input().split()]\n\nans = 0\ndivjl = []\n\nfor i in range(len(Al)):\n if i in divjl:\n continue\n flag = True\n for j in range(len(Al)):\n if i == j:\n continue\n if Al[i] % Al[j] == 0:\n flag = False\n divjl.append...
['Wrong Answer', 'Accepted']
['s467582190', 's821215173']
[32016.0, 32192.0]
[2206.0, 466.0]
[365, 325]
p02642
u373047809
2,000
1,048,576
Given is a number sequence A of length N. Find the number of integers i \left(1 \leq i \leq N\right) with the following property: * For every integer j \left(1 \leq j \leq N\right) such that i \neq j , A_j does not divide A_i.
['from collections import Counter\nn, *A = map(int, open(0).read().split())\nA.sort()\nc, s = Counter(A), set()\nM = max(A) + 1\nans = 0\nfor a in A:\n if a in s:\n continue\n ans += c[a] == 1\n for i in range(a * a, M, a):\n s.add(i)\nprint(ans)', 'from collections import Counter\nn, *A = map(in...
['Wrong Answer', 'Accepted']
['s276396956', 's460315199']
[94292.0, 104604.0]
[472.0, 665.0]
[255, 251]
p02642
u374082254
2,000
1,048,576
Given is a number sequence A of length N. Find the number of integers i \left(1 \leq i \leq N\right) with the following property: * For every integer j \left(1 \leq j \leq N\right) such that i \neq j , A_j does not divide A_i.
['N = int(input())\nA = list(map(int, input().split()))\n\nsetA = set(A)\nresult = 0\n\nif N == 1:\n print(0)\nelse:\n for i in range(N):\n tmp = A[i]\n A[i] = 0\n setA = set(A)\n A[i] = tmp\n if 1 in setA:\n continue\n\n for a in setA:\n if a == 0:\...
['Wrong Answer', 'Runtime Error', 'Wrong Answer', 'Accepted']
['s121252204', 's509349915', 's739138095', 's856358404']
[42300.0, 42480.0, 138644.0, 40084.0]
[2207.0, 2207.0, 2513.0, 645.0]
[447, 386, 467, 377]
p02642
u381959472
2,000
1,048,576
Given is a number sequence A of length N. Find the number of integers i \left(1 \leq i \leq N\right) with the following property: * For every integer j \left(1 \leq j \leq N\right) such that i \neq j , A_j does not divide A_i.
['import sys\ninput = sys.stdin.readline\n\nN = int(input())\n\nAList = list(map(int, input().split()))\n\nAList.sort()\n\ndp = [0] * (AList[-1] + 1)\n\nfor i in AList:\n dp[i] += 1\n \n if dp[i] == 1:\n for p in range(2 * i, len(dp), i):\n dp[j] += 2\n\nprint(dp.count(1))', 'import sys\ninp...
['Runtime Error', 'Accepted']
['s190350380', 's627153457']
[31296.0, 31456.0]
[217.0, 400.0]
[281, 281]
p02642
u382639013
2,000
1,048,576
Given is a number sequence A of length N. Find the number of integers i \left(1 \leq i \leq N\right) with the following property: * For every integer j \left(1 \leq j \leq N\right) such that i \neq j , A_j does not divide A_i.
['N = int(input())\nA = list(map(int, input().split()))\n\nimport numpy as np\n\nans = 0\nfor i in range(N):\n if len(A_re) == 0:\n ans = 0\n break\n break\n c = [j for j in A[i]/np.array(A) if j.is_integer() ]\n print(c)\n if len(c) == 1:\n ans += 1\nprint(ans)', 'n = int(input(...
['Runtime Error', 'Wrong Answer', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted']
['s282289652', 's293209032', 's424337677', 's692144689', 's987298995', 's920855753']
[34524.0, 32068.0, 34428.0, 34400.0, 34424.0, 52736.0]
[155.0, 2206.0, 156.0, 164.0, 152.0, 1791.0]
[285, 257, 255, 255, 286, 312]
p02642
u386850803
2,000
1,048,576
Given is a number sequence A of length N. Find the number of integers i \left(1 \leq i \leq N\right) with the following property: * For every integer j \left(1 \leq j \leq N\right) such that i \neq j , A_j does not divide A_i.
["N = int(input().strip())\nA = list(map(int, input().strip().split()))\nA.sort()\nAMAX = max(A)\nans = 0\nis_div = [True for i in range(AMAX+1)]\nprint(A)\nfor i in range(N):\n a = A[i]\n if is_div[a]:\n if not ((i > 0 and A[i] == A[i-1]) or (i < N-1 and A[i] == A[i+1])):\n ans += 1\n for j in range(a, AM...
['Wrong Answer', 'Accepted']
['s701155833', 's077048063']
[32232.0, 32224.0]
[417.0, 360.0]
[355, 341]
p02642
u391328897
2,000
1,048,576
Given is a number sequence A of length N. Find the number of integers i \left(1 \leq i \leq N\right) with the following property: * For every integer j \left(1 \leq j \leq N\right) such that i \neq j , A_j does not divide A_i.
['import sys\nimport math\n\n\ndef int1(x): return int(x) - 1\ndef ii(): return int(sys.stdin.readline())\ndef mi(): return map(int, sys.stdin.readline().split())\ndef mi1(): return map(int1, sys.stdin.readline().split())\ndef li(): return list(map(int, sys.stdin.readline().split()))\ndef lli(rows_number): return [li()...
['Wrong Answer', 'Accepted']
['s443463295', 's730605920']
[46368.0, 31424.0]
[319.0, 267.0]
[752, 534]
p02642
u393224521
2,000
1,048,576
Given is a number sequence A of length N. Find the number of integers i \left(1 \leq i \leq N\right) with the following property: * For every integer j \left(1 \leq j \leq N\right) such that i \neq j , A_j does not divide A_i.
['import sys\nn = int(sys.stdin.readline().rstrip("\\n"))\na = [int(s) for s in sys.stdin.readline().rstrip("\\n").split()]\na.sort()\na_true = [True]*n\na_set = set(a)\nif 1 in a or len(a_set) == 1:\n print(0)\nelse:\n a_max = a[n-1]\n i = 0\n while a[i]*2 <= a_max:\n while i < n-1:\n if ...
['Runtime Error', 'Accepted']
['s795419327', 's601445759']
[35524.0, 104256.0]
[194.0, 1229.0]
[697, 388]
p02642
u394950523
2,000
1,048,576
Given is a number sequence A of length N. Find the number of integers i \left(1 \leq i \leq N\right) with the following property: * For every integer j \left(1 \leq j \leq N\right) such that i \neq j , A_j does not divide A_i.
['N = int(input())\nA = list(map(int, input().split()))\n\nS = sorted(A)\nprint(S)\n\nans = 0\nif S[0] == S[1]:\n for i in range(1, N):\n j = 0\n while S[i] % S[j] > 0:\n j += 1\n if i <= j:\n ans += 1\n break\nelse:\n ans = 1\n for i in range(1...
['Runtime Error', 'Accepted']
['s228078789', 's642206071']
[33416.0, 86600.0]
[2206.0, 717.0]
[451, 308]
p02642
u395620499
2,000
1,048,576
Given is a number sequence A of length N. Find the number of integers i \left(1 \leq i \leq N\right) with the following property: * For every integer j \left(1 \leq j \leq N\right) such that i \neq j , A_j does not divide A_i.
['n = int(input())\na = map(int, input().split())\na = list(sorted(a))\nbig = a[n-1]\nmark = [0]*big\nfor x in a:\n mark[x] += 1\n if mark[x] > 1:\n continue\n for j in range(x*2, big+1, x):\n mark[j] += 1\n\nans = 0\nfor x in a:\n if mark[x] == 1:\n ans += 1\n\nprint(ans)', 'n = int(input())\na = map(int,...
['Runtime Error', 'Accepted']
['s277225287', 's457314476']
[32244.0, 32336.0]
[381.0, 358.0]
[267, 292]
p02642
u401452016
2,000
1,048,576
Given is a number sequence A of length N. Find the number of integers i \left(1 \leq i \leq N\right) with the following property: * For every integer j \left(1 \leq j \leq N\right) such that i \neq j , A_j does not divide A_i.
["#170D\ndef main():\n import sys\n from collections import deque\n N = int(sys.stdin.readline())\n A = list(map(int, sys.stdin.readline().split()))\n A = list(set(A))\n A.sort(reverse=True)\n A = deque(A)\n def era(A):\n if len(A)==1:\n print(0)\n return\n fo...
['Wrong Answer', 'Accepted']
['s634723814', 's191923757']
[33936.0, 45300.0]
[2206.0, 287.0]
[617, 594]
p02642
u402428218
2,000
1,048,576
Given is a number sequence A of length N. Find the number of integers i \left(1 \leq i \leq N\right) with the following property: * For every integer j \left(1 \leq j \leq N\right) such that i \neq j , A_j does not divide A_i.
['N =int(input())\nX = [int(i) for i in input().split()]\nY = sorted(X)\ncount=0\n\nANS=[]\nfor i in range(N):\n for j in range(N):\n if Y[i]!=Y[j]:\n if Y[i]%Y[j]==0:\n if Y[i] not in ANS:\n ANS.append(Y[i])\n # print("i",Y[i])\n ...
['Wrong Answer', 'Accepted']
['s373915853', 's441862061']
[32012.0, 32220.0]
[2206.0, 524.0]
[486, 709]
p02642
u406355300
2,000
1,048,576
Given is a number sequence A of length N. Find the number of integers i \left(1 \leq i \leq N\right) with the following property: * For every integer j \left(1 \leq j \leq N\right) such that i \neq j , A_j does not divide A_i.
['from copy import deepcopy\nN = int(input())\nA = list(map(int,input().split()))\ncount = 0\nAas = sorted(A)\nfor i,a in enumerate(A):\n flag = 0\n A2 = deepcopy(A)\n del A2[i]\n if a not in A2:\n for b in Aas:\n if a % b == 0:\n flag = 1\n break\n ...
['Wrong Answer', 'Wrong Answer', 'Accepted']
['s439694619', 's726501803', 's772444755']
[33144.0, 33144.0, 32024.0]
[2206.0, 2206.0, 552.0]
[391, 430, 265]
p02642
u408262366
2,000
1,048,576
Given is a number sequence A of length N. Find the number of integers i \left(1 \leq i \leq N\right) with the following property: * For every integer j \left(1 \leq j \leq N\right) such that i \neq j , A_j does not divide A_i.
['def factorization(n):\n arr = []\n temp = n\n for i in range(2, int(-(-n**0.5//1))+1):\n if temp%i==0:\n cnt=0\n while temp%i==0:\n cnt+=1\n temp //= i\n arr.append([i, cnt])\n\n if temp!=1:\n arr.append([temp, 1])\n\n if arr=...
['Wrong Answer', 'Accepted']
['s709575397', 's426461914']
[46772.0, 39516.0]
[2206.0, 595.0]
[1037, 357]
p02642
u408375121
2,000
1,048,576
Given is a number sequence A of length N. Find the number of integers i \left(1 \leq i \leq N\right) with the following property: * For every integer j \left(1 \leq j \leq N\right) such that i \neq j , A_j does not divide A_i.
['n = int(input())\na = list(map(int, input().split()))\na.sort()\nl = [True] * (10**6 + 1)\ncnt = 0\nfor i in range(n):\n d = a[i]\n if l[d]:\n if i < n-1 and a[i] != a[i+1]:\n cnt += 1\n elif i == n-1:\n cnt += 1\n for j in range(d, 10**6 + 1, d):\n l[d] = False\nprint(cnt)', 'n = int(input(...
['Wrong Answer', 'Accepted']
['s307284659', 's637425241']
[32024.0, 32372.0]
[1086.0, 409.0]
[286, 287]
p02642
u410715775
2,000
1,048,576
Given is a number sequence A of length N. Find the number of integers i \left(1 \leq i \leq N\right) with the following property: * For every integer j \left(1 \leq j \leq N\right) such that i \neq j , A_j does not divide A_i.
['n = int(input())\nlst = list(map(int,input().split()))\ndct = {}\nfor i in lst:\n dct[i] = dct.get(i, 0) + 1\nans = 0\nfor i in dct:\n ans += (dct[i] == 1)\nprint(ans)', 'n = int(input())\nlst = list(map(int, input().split()))\nlst.sort()\nk = lst[-1]+1\ndp = [0 for i in range(k)]\nans = 0\nfor i in lst:\n i...
['Wrong Answer', 'Accepted']
['s902552134', 's147957707']
[35692.0, 32012.0]
[153.0, 314.0]
[165, 306]
p02642
u411923565
2,000
1,048,576
Given is a number sequence A of length N. Find the number of integers i \left(1 \leq i \leq N\right) with the following property: * For every integer j \left(1 \leq j \leq N\right) such that i \neq j , A_j does not divide A_i.
['#D - Div Game\nN = int(input())\n\ndef Prime_factorize(n):\n cnt = 0\n A = set()\n \n z = 2\n while n%2==0 and (n>=z):\n cnt += 1\n n //= z\n\n A.add(z)\n \n z *= 2\n \n f = 3\n z = 3\n \n while f*f <= n:\n if n%z == 0:\n cnt += 1\n ...
['Wrong Answer', 'Wrong Answer', 'Accepted']
['s017191273', 's697907014', 's678207944']
[9216.0, 9232.0, 37324.0]
[29.0, 29.0, 778.0]
[927, 915, 354]
p02642
u414050834
2,000
1,048,576
Given is a number sequence A of length N. Find the number of integers i \left(1 \leq i \leq N\right) with the following property: * For every integer j \left(1 \leq j \leq N\right) such that i \neq j , A_j does not divide A_i.
['n=int(input())\na=list(map(int,input().split()))\na.sort()\nm=a[n-1]\ndp=[0]*(m)\nans=0\nfor i in a:\n for j in range(i,m+1,i):\n dp[j]+=1\nfor i in a:\n if dp[i]==1:\n ans+=1\nprint(ans)\n', 'n=int(input())\na=list(map(int,input().split()))\na.sort()\nm=a[n-1]\ndp=[0]*(m+1)\nans=0\nfor i in a:\n for j in ra...
['Runtime Error', 'Accepted']
['s412355271', 's416019392']
[32052.0, 32232.0]
[413.0, 570.0]
[184, 185]
p02642
u414980766
2,000
1,048,576
Given is a number sequence A of length N. Find the number of integers i \left(1 \leq i \leq N\right) with the following property: * For every integer j \left(1 \leq j \leq N\right) such that i \neq j , A_j does not divide A_i.
['N = int(input())\nA = list(map(int, input().split()))\nM = 1000005\ncnt = [0]*M\nfor a in A:\n if cnt[a]!=0:\n cnt[a]+=1\n continue\n \n for i in range(a, M, a):\n cnt[a]+=1\n \nans = 0\nfor a in A:\n if cnt[a] == 1:\n ans+=1\nprint(ans)', 'N = int(input())\nA = lis...
['Wrong Answer', 'Accepted']
['s781647756', 's821930224']
[32148.0, 32196.0]
[1302.0, 584.0]
[273, 273]
p02642
u416258526
2,000
1,048,576
Given is a number sequence A of length N. Find the number of integers i \left(1 \leq i \leq N\right) with the following property: * For every integer j \left(1 \leq j \leq N\right) such that i \neq j , A_j does not divide A_i.
["import numpy as np\nN = int(input())\nAs = list(map(int, input().split(' ')))\nAs = np.unique(np.array(As))\n\ndivisible = np.sum(np.sum((As[None]%As[:,None])==0, 0)>1)\nprint(divisible)", 'n = int(input())\na = list(map(int, input().split()))\n\nmax_a = max(a)\ndp = [0] * (max_a + 1)\n\nfor i in a:\n dp[i] += 1\n...
['Runtime Error', 'Wrong Answer', 'Accepted']
['s692936857', 's863842659', 's182014413']
[147676.0, 32232.0, 32224.0]
[282.0, 404.0, 403.0]
[180, 211, 202]
p02642
u418197217
2,000
1,048,576
Given is a number sequence A of length N. Find the number of integers i \left(1 \leq i \leq N\right) with the following property: * For every integer j \left(1 \leq j \leq N\right) such that i \neq j , A_j does not divide A_i.
['n = int(input())\nls = sorted(list(map(int, input().split())))\ndead = []\nfor i in range(round(n ** 0.5) + 1):\n if ls[i] not in dead:\n for j in range(ls[i], ls[-1] + 1, ls[i]):\n if j in ls: \n dead.append(j)\n\nprint(n - len(dead))\n', 'n = int(input())\nls = sorted(list(map(in...
['Runtime Error', 'Accepted']
['s363653735', 's164426328']
[32096.0, 31972.0]
[2206.0, 429.0]
[263, 221]
p02642
u424241608
2,000
1,048,576
Given is a number sequence A of length N. Find the number of integers i \left(1 \leq i \leq N\right) with the following property: * For every integer j \left(1 \leq j \leq N\right) such that i \neq j , A_j does not divide A_i.
['n = int(input())\narr = [int(x) for x in input().split()]\nd = {}\nfor x in arr:\n d[x] = d.get(x,0)+1\n\nmxN = 10**6 + 1\nrp = [True]*mxN\n\n\nfor i in range(2,len(rp)):\n if i not in d or not rp[i]:continue\n for j in range(i+i,mxN,i):\n if j in d: rp[j] = False\n\n#reason for tle\n\n\n\nfor k,v in d.items():...
['Runtime Error', 'Accepted']
['s450208934', 's232418925']
[38560.0, 38208.0]
[598.0, 446.0]
[387, 467]
p02642
u426649993
2,000
1,048,576
Given is a number sequence A of length N. Find the number of integers i \left(1 \leq i \leq N\right) with the following property: * For every integer j \left(1 \leq j \leq N\right) such that i \neq j , A_j does not divide A_i.
['def main():\n N = int(input())\n A = list(map(int, input().split()))\n\n A.sort()\n\n ans = 1\n modlist = [A[0]]\n for i in range(1, N):\n flag = True\n for j, m in enumerate(modlist):\n if A[i] % m == 0:\n flag = False\n break\n if flag:...
['Wrong Answer', 'Wrong Answer', 'Accepted']
['s440710585', 's861424831', 's679621901']
[32192.0, 32060.0, 43476.0]
[242.0, 170.0, 1053.0]
[406, 382, 446]
p02642
u430726059
2,000
1,048,576
Given is a number sequence A of length N. Find the number of integers i \left(1 \leq i \leq N\right) with the following property: * For every integer j \left(1 \leq j \leq N\right) such that i \neq j , A_j does not divide A_i.
['n=int(input())\na=list(map(int,input().split()))\nm=max(a)\nalsit=[0]*(m+1)\nfor i in a:\n for j in range(i,m+1,i):\n alist[j]+=1\ncnt=0\nfor i in a:\n if alist[i]==1:\n cnt+=1\nprint(cnt)', 'n=int(input())\na=list(map(int,input().split()))\nm=max(a)\nalist=[0]*(m+1)\nfor i in a:\n for j in range(i,m+1,i):\n...
['Runtime Error', 'Accepted']
['s255648258', 's669015816']
[32072.0, 32156.0]
[77.0, 499.0]
[185, 185]
p02642
u433375322
2,000
1,048,576
Given is a number sequence A of length N. Find the number of integers i \left(1 \leq i \leq N\right) with the following property: * For every integer j \left(1 \leq j \leq N\right) such that i \neq j , A_j does not divide A_i.
['s = list(map(int,input().split()))\nt = s.pop(0)\ns.sort()\nc = 1\nd = 0\nfor i in range(t):\n for k in range(0,i):\n if s[i]%s[k]==0:\n c = 0\n break\n if c == 1:\n d = d+1\nprint(d)\n \n ', 's = list(map(int,input().split()))\nt = s.pop(0)\ns.sort()\nd = 0\nfor i in range(0,t):\n c = 1\n for...
['Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted']
['s091462766', 's508394823', 's823587250', 's853210398']
[9196.0, 9092.0, 9224.0, 32024.0]
[20.0, 26.0, 23.0, 547.0]
[197, 202, 212, 258]
p02642
u434609232
2,000
1,048,576
Given is a number sequence A of length N. Find the number of integers i \left(1 \leq i \leq N\right) with the following property: * For every integer j \left(1 \leq j \leq N\right) such that i \neq j , A_j does not divide A_i.
['N = int(input())\nA = list(map(int, input().split()))\nS = set(A)\nM = max(S)\nA.sort()\n\nfor a in A:\n if a == pre_a:\n S.discard(a)\n if a in S:\n j = a * 2\n while j <= M:\n S.discard(j)\n j += a\n pre_a = a\nprint(len(S))', 'N = int(input())\nA = list(map(int, ...
['Runtime Error', 'Accepted']
['s368074725', 's942519108']
[32140.0, 32280.0]
[133.0, 509.0]
[263, 273]
p02642
u436519884
2,000
1,048,576
Given is a number sequence A of length N. Find the number of integers i \left(1 \leq i \leq N\right) with the following property: * For every integer j \left(1 \leq j \leq N\right) such that i \neq j , A_j does not divide A_i.
['import collections\nn=int(input())\nList=list(map(int,input().split()))\ncontainer=collections.Counter(List)\nif(1 in container):\n if(container[1]==1):\n print(1)\n else:\n print(0)\nelse:\n List.sort()\n seive=[True]*(List[~0]+1)\n count=0\n for each in List:\n i=2\n if...
['Wrong Answer', 'Wrong Answer', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted']
['s501353510', 's666293241', 's740032552', 's792244791', 's925414806', 's999967019']
[49460.0, 49540.0, 36084.0, 35884.0, 35876.0, 32252.0]
[775.0, 728.0, 105.0, 102.0, 108.0, 518.0]
[505, 505, 402, 429, 409, 258]
p02642
u437215432
2,000
1,048,576
Given is a number sequence A of length N. Find the number of integers i \left(1 \leq i \leq N\right) with the following property: * For every integer j \left(1 \leq j \leq N\right) such that i \neq j , A_j does not divide A_i.
['def func(n, a):\n mx = max(a)\n x = [0] * (mx + 1) # len(x)\n for i in a:\n x[i] += 1\n for i in range(1, mx + 1):\n if x[i] != 0:\n for j in range(2 * i, mx + 1, i):\n x[j] = 0\n if x[i] > 1:\n x[i] = 0\n return sum(x) # 31401\n\nn = int(input(...
['Runtime Error', 'Wrong Answer', 'Accepted']
['s439389933', 's477377556', 's861721675']
[32324.0, 10132.0, 32240.0]
[70.0, 29.0, 262.0]
[352, 20, 355]
p02642
u439063038
2,000
1,048,576
Given is a number sequence A of length N. Find the number of integers i \left(1 \leq i \leq N\right) with the following property: * For every integer j \left(1 \leq j \leq N\right) such that i \neq j , A_j does not divide A_i.
['import numpy as np\n\nN = int(input())\nx_list = np.array(list(map(int, input().split())), reverse=True)\n\ncount = 0\nfor xi in x_list:\n if np.sum(xi%x_list==0) == 1:\n count += 1\nprint(count)', 'import numpy as np\n\nN = int(input())\na_list = list(map(int, input().split()))\n\nnum_array = np.zeros(max(a_li...
['Runtime Error', 'Runtime Error', 'Wrong Answer', 'Wrong Answer', 'Accepted']
['s077530581', 's160666796', 's218597729', 's231170409', 's908710718']
[51484.0, 51452.0, 51584.0, 32296.0, 51176.0]
[155.0, 764.0, 165.0, 2206.0, 641.0]
[192, 249, 181, 213, 240]
p02642
u440975163
2,000
1,048,576
Given is a number sequence A of length N. Find the number of integers i \left(1 \leq i \leq N\right) with the following property: * For every integer j \left(1 \leq j \leq N\right) such that i \neq j , A_j does not divide A_i.
['from collections import Counter\nimport bisect\nn = int(input()) \na = list(map(int, input().split())) \ncnt = Counter(a) \na.sort()\nans = 0\nmx = 10 ** 6\np = [0] * (mx + 1)\nfor i in a:\n if p[a] == 0:\n for j in range(mx + 1):\n x = i * j\n if x > mx:\n break\n ...
['Runtime Error', 'Wrong Answer', 'Accepted']
['s115778120', 's954491889', 's644481902']
[38532.0, 34084.0, 38676.0]
[142.0, 2206.0, 662.0]
[655, 384, 655]
p02642
u441254033
2,000
1,048,576
Given is a number sequence A of length N. Find the number of integers i \left(1 \leq i \leq N\right) with the following property: * For every integer j \left(1 \leq j \leq N\right) such that i \neq j , A_j does not divide A_i.
['# D\n\nN = int(input())\nA = list(map(int,input().split()))\n\n\nA.sort()\n\n\nans = 0\n\nfor i in range(N-1):\n for j in range(i+1,N):\n if A[j] % A[i] == 0:\n break\n elif A[j] >= 2 * A[i]:\n break\n else:\n ans += 1\n\nif N == 1:\n ans += 1\nelif A[N-2] != A[N-1]:\n ans += 1\n\nprint(ans)\n'...
['Wrong Answer', 'Accepted']
['s718151729', 's377729935']
[32168.0, 40220.0]
[2206.0, 431.0]
[314, 298]
p02642
u442877951
2,000
1,048,576
Given is a number sequence A of length N. Find the number of integers i \left(1 \leq i \leq N\right) with the following property: * For every integer j \left(1 \leq j \leq N\right) such that i \neq j , A_j does not divide A_i.
['N = int(input())\nA = list(map(int,input().split()))\nA.sort()\nimport math\nfrom functools import reduce\ndef lcm_base(x, y):\n return (x * y) // math.gcd(x, y)\n\ndef lcm(*numbers):\n return reduce(lcm_base, numbers, 1)\n\ndef lcm_list(numbers):\n return reduce(lcm_base, numbers, 1)\n\ndef factorization(n)...
['Runtime Error', 'Accepted']
['s338535403', 's189122105']
[33092.0, 51344.0]
[2206.0, 407.0]
[779, 232]
p02642
u444481227
2,000
1,048,576
Given is a number sequence A of length N. Find the number of integers i \left(1 \leq i \leq N\right) with the following property: * For every integer j \left(1 \leq j \leq N\right) such that i \neq j , A_j does not divide A_i.
['n= int(input())\nl=list(map(int,input().split()))\n\nl.sort()\nmaxnum=l[len(l)-1]\nflag=[0]*(maxnum+1)\n\nfor num in l:\n flag[num]+=1\n if flag[num]>1:\n continue\n for j in range(num*2, maxnum, num):\n flag[j]+=1\n#print(flag)\nans=0\n\nfor num in l:\n if flag[num]==1:\n ans+=1\npri...
['Wrong Answer', 'Accepted']
['s344334454', 's169926949']
[32384.0, 32236.0]
[389.0, 460.0]
[307, 309]
p02642
u451017206
2,000
1,048,576
Given is a number sequence A of length N. Find the number of integers i \left(1 \leq i \leq N\right) with the following property: * For every integer j \left(1 \leq j \leq N\right) such that i \neq j , A_j does not divide A_i.
['from collections import Counter\nfrom math import sqrt\nN = int(input())\nA = [int(v) for v in input().split()]\n\nm = max(A)\nl = [1 for i in range(m+1)]\nfor v in sorted(A):\n if v > sqrt(m):break\n for j in range(2*v, m+1, v):\n l[j] = 0\n\nans = 0\nc = Counter(A)\nfor a in A:\n if c[a] > 1:continu...
['Wrong Answer', 'Accepted']
['s740673156', 's116103083']
[44676.0, 44660.0]
[311.0, 451.0]
[331, 284]
p02642
u455408345
2,000
1,048,576
Given is a number sequence A of length N. Find the number of integers i \left(1 \leq i \leq N\right) with the following property: * For every integer j \left(1 \leq j \leq N\right) such that i \neq j , A_j does not divide A_i.
['n=int(input(""))\naa=input("").split(" ")\nlista=[]\nfor i in range(n):\n lista+=[int(aa[i])]\nlista.sort()\nlisttf=[]\ns=0\nfor i in range(lista[n-1]):\n listtf+=[True]\nfor i in range(n):\n if(listtf[i]):\n if(i<n-1 and lista[i]==lista[i+1]):\n s-=1\n s+=1\n t=1\n whi...
['Runtime Error', 'Wrong Answer', 'Runtime Error', 'Accepted']
['s192019103', 's837842544', 's925296864', 's234146998']
[41468.0, 32104.0, 32168.0, 41212.0]
[834.0, 2206.0, 216.0, 985.0]
[417, 468, 396, 458]