problem_id stringlengths 6 6 | buggy_code stringlengths 8 526k | fixed_code stringlengths 12 526k | labels listlengths 0 15 ⌀ | buggy_submission_id int64 1 1.54M | fixed_submission_id int64 2 1.54M | user_id stringlengths 10 10 | language stringclasses 8
values |
|---|---|---|---|---|---|---|---|
p02641 | import sys
input = sys.stdin.readline
def S():
return input().rstrip()
def I():
return int(input())
def MI():
return map(int, input().split())
x, n = MI()
pl = list(MI())
nums = set(list(range(1, 102))) - set(pl)
dmin = 1000000
for p in nums:
d = abs(x - p)
if d < dmin:
temp = []
... | import sys
input = sys.stdin.readline
def S():
return input().rstrip()
def I():
return int(input())
def MI():
return map(int, input().split())
x, n = MI()
pl = list(MI())
nums = set(list(range(102))) - set(pl)
dmin = 1000000
for p in nums:
d = abs(x - p)
if d < dmin:
temp = []
... | [
"call.arguments.change"
] | 363,057 | 363,058 | u876438858 | python |
p02641 | import bisect
x, n = map(int, input().split())
if n == 0:
print(x)
exit()
p = list(map(int, input().split()))
tmp = []
for i in range(1, 101):
if i not in p:
tmp.append((abs(i - x), i))
print(min(tmp)[1]) | x, n = map(int, input().split())
if n == 0:
print(x)
exit()
p = list(map(int, input().split()))
tmp = []
for i in range(-1, 103):
if i not in p:
tmp.append((abs(i - x), i))
print(min(tmp)[1]) | [
"expression.operation.unary.add",
"call.arguments.change",
"control_flow.loop.range.bounds.upper.change",
"literal.number.integer.change"
] | 363,068 | 363,069 | u183422236 | python |
p02641 | x,n=map(int,input().split())
if n!=0:
p=list(map(int,input().split()))
dif=1000
ans=-1
for i in range(0,101):
if i not in p:
if abs(x-i)<dif:
ans=i
dif=abs(x-i)
print(ans)
else:
print(x) | x,n=map(int,input().split())
if n!=0:
p=list(map(int,input().split()))
dif=1000
ans=-1
for i in range(0,102):
if i not in p:
if abs(x-i)<dif:
ans=i
dif=abs(x-i)
print(ans)
else:
print(x) | [
"literal.number.integer.change",
"call.arguments.change",
"control_flow.loop.range.bounds.upper.change"
] | 363,166 | 363,167 | u349444371 | python |
p02641 | x,n=map(int,input().split())
if n!=0:
p=list(map(int,input().split()))
dif=1000
ans=-1
for i in range(1,101):
if i not in p:
if abs(x-i)<dif:
ans=i
dif=abs(x-i)
print(ans)
else:
print(x) | x,n=map(int,input().split())
if n!=0:
p=list(map(int,input().split()))
dif=1000
ans=-1
for i in range(0,102):
if i not in p:
if abs(x-i)<dif:
ans=i
dif=abs(x-i)
print(ans)
else:
print(x) | [
"literal.number.integer.change",
"call.arguments.change",
"control_flow.loop.range.bounds.lower.change",
"control_flow.loop.range.bounds.upper.change"
] | 363,168 | 363,167 | u349444371 | python |
p02641 | X, N = map(int, input().split())
try:
P = list(map(int, input().split()))
except:
P = []
tmp = 10**9
ans = 10**9
if P:
for p in range(0, 101):
if p in P:
continue
abs_PX = abs(X-p)
if abs_PX < tmp:
ans = p
tmp = abs_PX
else:
ans = X
prin... | X, N = map(int, input().split())
try:
P = list(map(int, input().split()))
except:
P = []
tmp = 10**9
ans = 10**9
if P:
for p in range(-20, 110):
if p in P:
continue
abs_PX = abs(X-p)
if abs_PX < tmp:
ans = p
tmp = abs_PX
else:
ans = X
print(... | [
"call.arguments.change",
"control_flow.loop.range.bounds.lower.change",
"expression.operation.unary.add",
"control_flow.loop.range.bounds.upper.change",
"literal.number.integer.change"
] | 363,182 | 363,183 | u982591663 | python |
p02641 | import sys
sys.setrecursionlimit(10**6)
from math import floor,ceil,sqrt,factorial,log,gcd
from heapq import heappop, heappush, heappushpop
from collections import Counter,defaultdict,deque
from itertools import accumulate,permutations,combinations,product,combinations_with_replacement
from bisect import bisect_left,bi... | import sys
sys.setrecursionlimit(10**6)
from math import floor,ceil,sqrt,factorial,log,gcd
from heapq import heappop, heappush, heappushpop
from collections import Counter,defaultdict,deque
from itertools import accumulate,permutations,combinations,product,combinations_with_replacement
from bisect import bisect_left,bi... | [
"literal.number.integer.change",
"call.arguments.change",
"control_flow.loop.range.bounds.upper.change"
] | 363,193 | 363,194 | u404290207 | python |
p02641 | X, N = [int(i) for i in input().split(' ')]
if N>0:
p = [int(i) for i in input().split(' ')]
abs_list = {}
for i in range(-100,100):
if(i in p):
continue
abs_list[i] = abs(X - i)
min_k = min(abs_list, key=abs_list.get)
print(min_k)
else:
print(X)
| X, N = [int(i) for i in input().split(' ')]
if N>0:
p = [int(i) for i in input().split(' ')]
abs_list = {}
for i in range(-100,200):
if(i in p):
continue
abs_list[i] = abs(X - i)
min_k = min(abs_list, key=abs_list.get)
print(min_k)
else:
print(X)
| [
"literal.number.integer.change",
"call.arguments.change",
"control_flow.loop.range.bounds.upper.change"
] | 363,210 | 363,211 | u223264651 | python |
p02642 | n = int(input())
a = [int(i) for i in input().split(" ")]
a.sort()
dp = [True for i in range(a[-1]+1)]
count=0
for i in range(n):
if dp[a[i]]:
count+=1
for j in range(1,n-i):
if a[i]!=a[i+j]:
break
elif j==1:
count-=1
dp[a[i+j]]=F... | n = int(input())
a = [int(i) for i in input().split(" ")]
a.sort()
dp = [True for i in range(a[-1]+1)]
count=0
for i in range(n):
if dp[a[i]]:
count+=1
for j in range(1,n-i):
if a[i]!=a[i+j]:
break
elif j==1:
count-=1
dp[a[i+j]]=F... | [
"control_flow.loop.range.bounds.upper.change",
"expression.operation.binary.add"
] | 363,229 | 363,230 | u902544771 | python |
p02642 | n=int(input())
l=list(map(int,input().split()))
ml=max(l)
m=[0]*(ml+1)
for i in l:
m[i]+=1
for i in range(ml+1):
if m[i]>=1:
for j in range(i,ml+1,i):
if m[j]>0:
m[j]=0
for i in range(ml+1):
if m[i]>=2:
m[i]=0
print(sum(m)) | n=int(input())
l=list(map(int,input().split()))
ml=max(l)
m=[0]*(ml+1)
for i in l:
m[i]+=1
for i in range(ml+1):
if m[i]>=1:
for j in range(2*i,ml+1,i):
if m[j]>0:
m[j]=0
#print(j)
for i in range(ml+1):
if m[i]>=2:
m[i]=0
print(sum(m))
| [
"control_flow.loop.range.bounds.lower.change",
"expression.operation.binary.add"
] | 363,244 | 363,245 | u223904637 | python |
p02642 | from collections import deque,Counter
N = int(input())
A = list(map(int,input().split()))
memo = [0] * (10**6+10)
cnt = Counter(A)
for k,v in cnt.items():
if memo[k] > 1:
continue
for j in range(k,10**6+1,k):
memo[j] += v
ans = 0
for num in cnt:
ans += (memo[num] == 0)
print(ans)
| from collections import deque,Counter
N = int(input())
A = list(map(int,input().split()))
memo = [0] * (10**6+10)
cnt = Counter(A)
for k,v in cnt.items():
if memo[k] > 1:
continue
for j in range(k,10**6+1,k):
memo[j] += v
# print(memo[:max(A)+1])
ans = 0
for num in cnt:
ans += (memo[num... | [
"literal.number.integer.change"
] | 363,255 | 363,256 | u114641312 | python |
p02642 | n = int(input())
A = list(map(int, input().split()))
Cnt = [0 for i in range(10**6 + 7)]
for i in A:
if Cnt[i] != 0:
Cnt[i] = 2
continue
else:
pass
for j in range(i, 10**6 + 8, i):
Cnt[j] += 1
ans = 0
for i in A:
if Cnt[i] == 1:
ans += 1
else:
pass
... | n = int(input())
A = list(map(int, input().split()))
Cnt = [0 for i in range(10**6 + 8)]
for i in A:
if Cnt[i] != 0:
Cnt[i] = 2
continue
else:
pass
for j in range(i, 10**6 + 8, i):
Cnt[j] += 1
ans = 0
for i in A:
if Cnt[i] == 1:
ans += 1
else:
pass
... | [
"literal.number.integer.change",
"assignment.value.change",
"call.arguments.change",
"expression.operation.binary.change",
"control_flow.loop.range.bounds.upper.change"
] | 363,315 | 363,316 | u318233626 | python |
p02642 | n = int(input())
A = list(map(int, input().split()))
Cnt = [0 for i in range(10**6 + 7)]
for i in A:
if Cnt[i] != 0:
Cnt[i] = 2
continue
for j in range(i, 10**6 + 8, i):
Cnt[j] += 1
ans = 0
for i in A:
if Cnt[i] == 1:
ans += 1
else:
pass
print(ans) | n = int(input())
A = list(map(int, input().split()))
Cnt = [0 for i in range(10**6 + 8)]
for i in A:
if Cnt[i] != 0:
Cnt[i] = 2
continue
else:
pass
for j in range(i, 10**6 + 8, i):
Cnt[j] += 1
ans = 0
for i in A:
if Cnt[i] == 1:
ans += 1
else:
pass
... | [
"literal.number.integer.change",
"assignment.value.change",
"call.arguments.change",
"expression.operation.binary.change",
"control_flow.loop.range.bounds.upper.change",
"control_flow.pass.add"
] | 363,317 | 363,316 | u318233626 | python |
p02642 | from collections import Counter
max_=10**6+1
ans=0
n=int(input())
data=list(map(int,input().split()))
b=[True]*(max_+1)
data.sort()
c=Counter(data)
print(c)
for d in data:
if b[d]:
for j in range(d,max_,d):
b[j]=False
if c[d]==1:
ans+=1
print(ans)
| from collections import Counter
max_=10**6+1
ans=0
n=int(input())
data=list(map(int,input().split()))
b=[True]*(max_+1)
data.sort()
c=Counter(data)
#print(c)
for d in data:
if b[d]:
for j in range(d,max_,d):
b[j]=False
if c[d]==1:#複数存在考慮
ans+=1
print(ans)
| [
"call.remove"
] | 363,402 | 363,403 | u087731474 | python |
p02642 | from collections import Counter
max_=10**6+1
ans=0
n=int(input())
data=list(map(int,input().split()))
b=[True]*(max_+1)
data.sort()
c=Counter(data)
print(c)
for d in data:
if b[d]:
for j in range(d,max_,d):
b[j]=False
if c[d]==1:#複数存在考慮
ans+=1
print(ans)
| from collections import Counter
max_=10**6+1
ans=0
n=int(input())
data=list(map(int,input().split()))
b=[True]*(max_+1)
data.sort()
c=Counter(data)
#print(c)
for d in data:
if b[d]:
for j in range(d,max_,d):
b[j]=False
if c[d]==1:#複数存在考慮
ans+=1
print(ans)
| [
"call.remove"
] | 363,404 | 363,403 | u087731474 | python |
p02642 | N = int(input())
A = list(map(int, input().split())) + [10**7]
A.sort()
e = np.zeros(10**6 + 1)
ans = 0
for i in range(N):
if e[A[i]] == 0:
e[::A[i]] = 1 # スライスで倍数indexを一気に変更できる。すごい。
# 同じ値が重複していないか判定
if A[i] != A[i+1]:
ans += 1
print(ans) | import numpy as np
N = int(input())
A = list(map(int, input().split())) + [10**7]
A.sort()
e = np.zeros(10**6 + 1)
ans = 0
for i in range(N):
if e[A[i]] == 0:
e[::A[i]] = 1 # スライスで倍数indexを一気に変更できる。すごい。
# 同じ値が重複していないか判定
if A[i] != A[i+1]:
ans += 1
print(ans) | [] | 363,462 | 363,463 | u751277549 | python |
p02642 | import sys
import collections
input = sys.stdin.readline
def I(): return int(input())
def MI(): return map(int, input().split())
def LI(): return list(map(int, input().split()))
def main():
n = I()
mylist = list(MI())
max_a = max(mylist)
exlude_list = set()
tlist = [False] * (max_a+1)
for a in... | import sys
import collections
input = sys.stdin.readline
def I(): return int(input())
def MI(): return map(int, input().split())
def LI(): return list(map(int, input().split()))
def main():
n = I()
mylist = list(MI())
max_a = max(mylist)
exclude_set = set()
tlist = [False] * (max_a+1)
for a in... | [
"assignment.variable.change",
"identifier.change",
"control_flow.branch.if.condition.change"
] | 363,487 | 363,488 | u591808161 | python |
p02642 | n = int(input())
a = sorted(list(map(int, input().split())))
x = max(a)
dp = [0] * x
for ai in a:
i = 1
while i * ai < x:
dp[i * ai - 1] += 1
i += 1
ans = 0
for ai in a:
if dp[ai-1] <= 1:
ans += 1
print(ans) | n = int(input())
a = sorted(list(map(int, input().split())))
x = max(a)
dp = [0] * x
for ai in a:
i = 1
while i * ai <= x:
dp[i * ai - 1] += 1
i += 1
ans = 0
for ai in a:
if dp[ai-1] <= 1:
ans += 1
print(ans) | [
"expression.operator.compare.change",
"control_flow.loop.condition.change"
] | 363,493 | 363,494 | u832152513 | python |
p02642 | import sys
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
read = sys.stdin.buffer.read
sys.setrecursionlimit(10 ** 7)
INF = float('inf')
import collections
N = int(input())
A = list(map(int, input().split()))
cA = collections.Counter(A)
LIM = 10 ** 6 + 10
# LIM = 25
A.sort()
dp = [1] * L... | import sys
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
read = sys.stdin.buffer.read
sys.setrecursionlimit(10 ** 7)
INF = float('inf')
import collections
N = int(input())
A = list(map(int, input().split()))
cA = collections.Counter(A)
LIM = 10 ** 6 + 1
# LIM = 25
A.sort()
dp = [1] * LI... | [
"literal.number.integer.change",
"assignment.value.change",
"expression.operation.binary.change",
"expression.operator.compare.change",
"control_flow.loop.condition.change"
] | 363,502 | 363,503 | u016881126 | python |
p02642 | import sys
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
read = sys.stdin.buffer.read
sys.setrecursionlimit(10 ** 7)
INF = float('inf')
import collections
N = int(input())
A = list(map(int, input().split()))
cA = collections.Counter(A)
LIM = 10 ** 6 + 1
# LIM = 25
A.sort()
dp = [1] * LI... | import sys
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
read = sys.stdin.buffer.read
sys.setrecursionlimit(10 ** 7)
INF = float('inf')
import collections
N = int(input())
A = list(map(int, input().split()))
cA = collections.Counter(A)
LIM = 10 ** 6 + 1
# LIM = 25
A.sort()
dp = [1] * LI... | [
"expression.operator.compare.change",
"control_flow.loop.condition.change"
] | 363,504 | 363,503 | u016881126 | python |
p02642 | import sys
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
read = sys.stdin.buffer.read
sys.setrecursionlimit(10 ** 7)
INF = float('inf')
import collections
N = int(input())
A = list(map(int, input().split()))
cA = collections.Counter(A)
LIM = 10 ** 6 + 1
# LIM = 25
A.sort()
dp = [1] * LI... | import sys
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
read = sys.stdin.buffer.read
sys.setrecursionlimit(10 ** 7)
INF = float('inf')
import collections
N = int(input())
A = list(map(int, input().split()))
cA = collections.Counter(A)
LIM = 10 ** 6 + 1
# LIM = 25
A.sort()
dp = [1] * LI... | [
"expression.operator.compare.change",
"control_flow.loop.condition.change",
"call.remove"
] | 363,505 | 363,503 | u016881126 | python |
p02642 | import math
from collections import deque
from collections import defaultdict
import itertools as it
#自作関数群
def readInt():
return int(input())
def readInts():
return list(map(int, input().split()))
def readChar():
return input()
def readChars():
return input().split()
def factorization(n):
res = []
if n%2==0:
... | import math
from collections import deque
from collections import defaultdict
import itertools as it
#自作関数群
def readInt():
return int(input())
def readInts():
return list(map(int, input().split()))
def readChar():
return input()
def readChars():
return input().split()
def factorization(n):
res = []
if n%2==0:
... | [
"control_flow.loop.for.condition.change"
] | 363,509 | 363,510 | u509739538 | python |
p02642 | import math
from collections import deque
from collections import defaultdict
import itertools as it
#自作関数群
def readInt():
return int(input())
def readInts():
return list(map(int, input().split()))
def readChar():
return input()
def readChars():
return input().split()
def factorization(n):
res = []
if n%2==0:
... | import math
from collections import deque
from collections import defaultdict
import itertools as it
#自作関数群
def readInt():
return int(input())
def readInts():
return list(map(int, input().split()))
def readChar():
return input()
def readChars():
return input().split()
def factorization(n):
res = []
if n%2==0:
... | [
"control_flow.loop.for.condition.change"
] | 363,511 | 363,512 | u509739538 | python |
p02642 | import math
from collections import deque
from collections import defaultdict
import itertools as it
#自作関数群
def readInt():
return int(input())
def readInts():
return list(map(int, input().split()))
def readChar():
return input()
def readChars():
return input().split()
def factorization(n):
res = []
if n%2==0:
... | import math
from collections import deque
from collections import defaultdict
import itertools as it
#自作関数群
def readInt():
return int(input())
def readInts():
return list(map(int, input().split()))
def readChar():
return input()
def readChars():
return input().split()
def factorization(n):
res = []
if n%2==0:
... | [] | 363,511 | 363,513 | u509739538 | python |
p02642 | import math
from collections import deque
from collections import defaultdict
import itertools as it
#自作関数群
def readInt():
return int(input())
def readInts():
return list(map(int, input().split()))
def readChar():
return input()
def readChars():
return input().split()
def factorization(n):
res = []
if n%2==0:
... | import math
from collections import deque
from collections import defaultdict
import itertools as it
#自作関数群
def readInt():
return int(input())
def readInts():
return list(map(int, input().split()))
def readChar():
return input()
def readChars():
return input().split()
def factorization(n):
res = []
if n%2==0:
... | [
"control_flow.loop.for.condition.change"
] | 363,514 | 363,515 | u509739538 | python |
p02642 | N = int(input())
A = list(map(int,input().split()))
MAX = max(A) #Aの中の最大値
Adic={}
for i in range(N):
if A[i] not in Adic:
Adic[A[i]] = 1
else:
Adic[A[i]] += 1
Aset = set(A)
if 1 in Aset: #1がある場合
if Adic[1] == 1:
print(1)
else:
print(0)
exit()
ans = 0
for j in range(N):
Flag = True
temp = A... | N = int(input())
A = list(map(int,input().split()))
MAX = max(A) #Aの中の最大値
Adic={}
for i in range(N):
if A[i] not in Adic:
Adic[A[i]] = 1
else:
Adic[A[i]] += 1
Aset = set(A)
if 1 in Aset: #1がある場合
if Adic[1] == 1:
print(1)
else:
print(0)
exit()
ans = 0
for j in range(N):
temp = A[j]
if Adic[... | [
"literal.number.integer.change",
"call.arguments.change",
"expression.operation.binary.change",
"control_flow.loop.range.bounds.upper.change"
] | 363,528 | 363,529 | u197457087 | python |
p02642 | n = int(input())
A = list(map(int, input().split()))
A.sort()
A.append(-1)
x = A[0]
flag = True
for a in A:
if a % x != 0:
flag = False
if flag:
print(0)
exit()
used = [False] * A[-2]
ans = 0
for idx, a in enumerate(A[:-1]):
if used[a - 1]:
continue
if a != A[idx + 1]:
ans... | n = int(input())
A = list(map(int, input().split()))
A.sort()
A.append(-1)
x = A[0]
if x != 1:
flag = True
for a in A:
if a % x != 0:
flag = False
if flag:
print(0)
exit()
used = [False] * A[-2]
ans = 0
for idx, a in enumerate(A[:-1]):
if used[a - 1]:
conti... | [
"control_flow.branch.if.add"
] | 363,564 | 363,565 | u554954744 | python |
p02642 | #!python3.8
# -*- coding: utf-8 -*-
# abc170/abc170_d
import sys
from collections import Counter
i2s = sys.stdin.readline().rstrip
def main():
N = int(i2s())
A = sorted(map(int, i2s().split(' ')))
B = Counter(A)
for a in A:
if B[a] == 0:
continue
if B[a] > 1:
B[... | #!python3.8
# -*- coding: utf-8 -*-
# abc170/abc170_d
import sys
from collections import Counter
i2s = lambda: sys.stdin.readline().rstrip()
def main():
N = int(i2s())
A = sorted(map(int, i2s().split(' ')))
B = Counter(A)
for a in A:
if B[a] == 0:
continue
if B[a] > 1:
... | [
"call.add"
] | 363,570 | 363,571 | u106311097 | python |
p02642 | n = int(input())
a = list(map(int, input().split()))
s = ([0]*100)
a.sort()
for i in a:
s[i] += 1
ans = 0
for j in range(100):
if s[j] == 1:
ans += 1
if s[j] > 0:
for k in range(j, 100, j):
s[k] = 0
print(ans) | n = int(input())
a = list(map(int, input().split()))
s = ([0]*1000001)
a.sort()
for i in a:
s[i] += 1
ans = 0
for j in range(1000001):
if s[j] == 1:
ans += 1
if s[j] > 0:
for k in range(j, 1000001, j):
s[k] = 0
print(ans) | [
"literal.number.integer.change",
"assignment.value.change",
"expression.operation.binary.change",
"call.arguments.change",
"control_flow.loop.range.bounds.upper.change"
] | 363,595 | 363,594 | u277104886 | python |
p02642 | N=int(input())
#5
A=sorted(map(int,input().split()))
#24 11 8 3 16
dp = [1]*max(A)
l = len(dp)
for a in A:
if dp[a-1] == 1:
dp[a-1] = 2
for i in range(2*a, l+1, a):
dp[i-1] = 0
elif dp[a-1] == 2:
dp[a-1] = 0
sum([1 for a in A if dp[a-1] != 0]) | N=int(input())
#5
A=sorted(map(int,input().split()))
#24 11 8 3 16
dp = [1]*max(A)
l = len(dp)
for a in A:
if dp[a-1] == 1:
dp[a-1] = 2
for i in range(2*a, l+1, a):
dp[i-1] = 0
elif dp[a-1] == 2:
dp[a-1] = 0
print(sum([1 for a in A if dp[a-1] != 0]))
| [
"call.add",
"call.arguments.change"
] | 363,608 | 363,609 | u713914478 | python |
p02642 | from sys import stdin
import numpy as np
input = stdin.readline
N = int(input())
A_list = list(map(int, input().split()))
# ans_list =np.ones(N)
# A_list = np.array(A_list)
# for i in range(N-1):
# for j in range(i+1,N):
# if A_list[i] % A_list[j] == 0:
# ans_list[i] = 0
# if (A_l... | from sys import stdin
import numpy as np
input = stdin.readline
N = int(input())
A_list = list(map(int, input().split()))
# ans_list =np.ones(N)
# A_list = np.array(A_list)
# for i in range(N-1):
# for j in range(i+1,N):
# if A_list[i] % A_list[j] == 0:
# ans_list[i] = 0
# if (A_l... | [
"literal.number.integer.change"
] | 363,619 | 363,620 | u169678167 | python |
p02642 | n = int(input())
A = list(map(int,input().split()))
d = {}
for a in A:
d.setdefault(a,0)#setdefault(key,value):辞書の既存のkeyについては変更せず
d[a] += 1 #新規のkeyにのみ新たなvalueで要素を追加できる
#今は({A1:1,A2:1,...An:1}となっている)
A = sorted(set(A))#重複要素なくしてかつ昇順にする
t = [True] * (10 ** 6 + 1)#Aiの制約範囲最大までのTrueのリストを作る
print(d)
for a in ... | n = int(input())
A = list(map(int,input().split()))
d = {}
for a in A:
d.setdefault(a,0)#setdefault(key,value):辞書の既存のkeyについては変更せず
d[a] += 1 #新規のkeyにのみ新たなvalueで要素を追加できる
#今は({A1:1,A2:1,...An:1}となっている)
A = sorted(set(A))#重複要素なくしてかつ昇順にする
t = [True] * (10 ** 6 + 1)#Aiの制約範囲最大までのTrueのリストを作る
for a in A:
i... | [
"call.remove"
] | 363,628 | 363,629 | u880480312 | python |
p02642 | import sys
from collections import Counter
sys.setrecursionlimit(10 ** 7)
rl = sys.stdin.readline
def solve():
_ = int(rl())
A = list(map(int, rl().split()))
counter = Counter(A)
B = [True] * (10 ** 6 + 1)
ans = 0
for ai in A:
if B[ai]:
for i in range(ai, 10 ** 6 + 1,... | import sys
from collections import Counter
sys.setrecursionlimit(10 ** 7)
rl = sys.stdin.readline
def solve():
_ = int(rl())
A = list(map(int, rl().split()))
counter = Counter(A)
A.sort()
B = [True] * (10 ** 6 + 1)
ans = 0
for ai in A:
if B[ai]:
for i in range(ai,... | [
"call.add"
] | 363,641 | 363,642 | u935984175 | python |
p02642 | n = int(input())
a = list(map(int, input().split()))
a.sort()
l = [True] * (10**6 + 1)
cnt = 0
for i in range(n):
d = a[i]
if l[d]:
if i < n-1 and a[i] != a[i+1]:
cnt += 1
elif i == n-1:
cnt += 1
for j in range(d, 10**6 + 1, d):
l[d] = False
print(cnt) | n = int(input())
a = list(map(int, input().split()))
a.sort()
l = [True] * (10**6 + 1)
cnt = 0
for i in range(n):
d = a[i]
if l[d]:
if i < n-1 and a[i] != a[i+1]:
cnt += 1
elif i == n-1:
cnt += 1
for j in range(d, 10**6 + 1, d):
l[j] = False
print(cnt)
| [
"assignment.variable.change",
"identifier.change",
"variable_access.subscript.index.change"
] | 363,648 | 363,649 | u408375121 | python |
p02642 | import collections
N = int(input())
A = list(map(int,input().split()))
S = set()
D = set()
for a in A:
if a in S:
D.add(a)
else:
S.add(a)
M = max(S)
A = [0]*(M+1)
for s in S:
if s in D:
A[s] += 1
continue
else:
for i in range(2*s,M+1,s):
A[i]+=1
count ... | import collections
N = int(input())
A = list(map(int,input().split()))
S = set()
D = set()
for a in A:
if a in S:
D.add(a)
else:
S.add(a)
M = max(S)
A = [0]*(M+1)
for s in S:
if s in D:
A[s] += 1
for i in range(2*s,M+1,s):
A[i]+=1
count = 0
for s in S:
if A[s]==0:
... | [] | 363,652 | 363,653 | u800396927 | python |
p02642 | def main():
n, *a = map(int, open(0).read().split())
if n == 1:
print(1)
return
m = max(a) + 1
l = [0] * m
for i in a:
for j in range(i, m, i):
l[j] += 2
l[i] -= 1
ans = sum(l[i] == -1 for i in a)
print(ans)
if __name__ == "__main__":
main(... | def main():
n, *a = map(int, open(0).read().split())
if n == 1:
print(1)
return
m = max(a) + 1
l = [0] * m
for i in a:
for j in range(i, m, i):
l[j] += 2
l[i] -= 1
ans = sum(l[i] == 1 for i in a)
print(ans)
if __name__ == "__main__":
main()... | [
"expression.operation.unary.arithmetic.remove"
] | 363,693 | 363,694 | u127499732 | python |
p02642 | def main():
n, *a = map(int, open(0).read().split())
if n == 1:
print(1)
return
m = max(a) + 1
l = [0] * m
for i in a:
for j in range(i, m, i):
l[j] += 2
l[i] -= 1
ans = sum(a[i] == -1 for i in a)
print(ans)
if __name__ == "__main__":
main(... | def main():
n, *a = map(int, open(0).read().split())
if n == 1:
print(1)
return
m = max(a) + 1
l = [0] * m
for i in a:
for j in range(i, m, i):
l[j] += 2
l[i] -= 1
ans = sum(l[i] == 1 for i in a)
print(ans)
if __name__ == "__main__":
main()... | [
"assignment.value.change",
"identifier.change",
"expression.operation.unary.arithmetic.remove"
] | 363,695 | 363,694 | u127499732 | python |
p02642 | from collections import Counter
M=10**7
_,*l=map(int,open(0).read().split())
d=[1]*(sorted(M))
C=Counter(l)
s=0
for a,b in C.items():
if b != 1:d[a]=0
elif d[a]:s+=1
for j in range(a,M,a):d[j]=0
print(s)
| from collections import Counter
M=10**7
_,*l=map(int,open(0).read().split())
d=[1]*(M)
C=Counter(sorted(l))
s=0
for a,b in C.items():
if b != 1:d[a]=0
elif d[a]:s+=1
for j in range(a,M,a):d[j]=0
print(s)
| [
"call.remove",
"call.arguments.change",
"call.add"
] | 363,704 | 363,703 | u514118270 | python |
p02642 | from collections import Counter
M=10**7
_,*l=sorted(map(int,open(0).read().split()))
d=[1]*(M)
C=Counter(l)
s=0
for a,b in C.items():
if b != 1:d[a]=0
elif d[a]:s+=1
for j in range(a,M,a):d[j]=0
print(s)
| from collections import Counter
M=10**7
_,*l=map(int,open(0).read().split())
d=[1]*(M)
C=Counter(sorted(l))
s=0
for a,b in C.items():
if b != 1:d[a]=0
elif d[a]:s+=1
for j in range(a,M,a):d[j]=0
print(s)
| [
"call.remove",
"call.arguments.change",
"call.add"
] | 363,705 | 363,703 | u514118270 | python |
p02642 | n = int(input())
a = list(map(int,input().split()))
maxa = max(a)
d = {}
for ai in a:
if ai in d:
d[ai] += 1
else:
d[ai] = 1
d = sorted(d.items())
#print(d)
e = [True for _ in range(maxa+1)]
for ai,c in d:
if c > 1:
e[ai] = False
else:
for i in range(2,maxa//ai+1):
e[ai*i] = False
ans =... | n = int(input())
a = list(map(int,input().split()))
maxa = max(a)
d = {}
for ai in a:
if ai in d:
d[ai] += 1
else:
d[ai] = 1
d = sorted(d.items())
#print(d)
e = [True for _ in range(maxa+1)]
for ai,c in d:
if c > 1:
e[ai] = False
for i in range(2,maxa//ai+1):
e[ai*i] = False
ans = 0
for ai,_ ... | [] | 363,708 | 363,709 | u009348313 | python |
p02642 | N = int(input())
A = list(map(int,input().split()))
b = sorted(list(A))
dp = [0]*(max(A)+4)
m_a = max(A)
for i in b:
dp[i] += 1
if dp[i]==1 :
for j in range(i*2, m_a,i):
dp[j] +=100
print(dp.count(1)) | N = int(input())
A = list(map(int,input().split()))
b = sorted(list(A))
dp = [0]*(max(A)+1)
m_a = max(A)+1
for i in b:
dp[i] += 1
if dp[i]==1 :
for j in range(i*2, m_a,i):
dp[j] +=100
print(dp.count(1)) | [
"literal.number.integer.change",
"assignment.value.change",
"expression.operation.binary.change"
] | 363,710 | 363,711 | u846226907 | python |
p02642 | N = int(input())
A = list(map(int,input().split()))
b = sorted(list(A))
dp = [0]*(max(A)+4)
m_a = max(A)
for i in b:
dp[i] += 1
if dp[i]==1 :
for j in range(i*2, m_a,i):
dp[j*i] +=100
print(dp.count(1)) | N = int(input())
A = list(map(int,input().split()))
b = sorted(list(A))
dp = [0]*(max(A)+1)
m_a = max(A)+1
for i in b:
dp[i] += 1
if dp[i]==1 :
for j in range(i*2, m_a,i):
dp[j] +=100
print(dp.count(1)) | [
"literal.number.integer.change",
"assignment.value.change",
"expression.operation.binary.change",
"expression.operation.binary.remove"
] | 363,712 | 363,711 | u846226907 | python |
p02642 | n = int(input())
A = sorted(map(int, input().split()))
nux = A[-1]+1
ans = 0
table = [True]*nux
for i, s in enumerate(A):
if table[s] == False:
continue
if i == n-1:
ans += 1
if A[i+1] != s:
ans += 1
b = 1
while b*s <= nux:
table[b*s] = False
b += 1
print(ans)... | n = int(input())
A = sorted(map(int, input().split()))
nux = A[-1]+1
ans = 0
table = [True]*nux
for i, s in enumerate(A):
if table[s] == False:
continue
if i == n-1:
ans += 1
elif A[i+1] != s:
ans += 1
b = 1
while b*s < nux:
table[b*s] = False
b += 1
print(ans... | [
"control_flow.branch.if.replace.remove",
"control_flow.branch.else_if.replace.add",
"expression.operator.compare.change",
"control_flow.loop.condition.change"
] | 363,715 | 363,714 | u518085378 | python |
p02642 | N = int(input())
ls = list(map(int,input().split()))
Pls = [0] * (10**6+1)
for i in ls:
Pls[i] += 1
ii = 0
for j in range(len(Pls)):
if Pls[j] == 0:
continue
elif Pls[j] == 1:
ii += 1
t = 2*j
while t <= 10**6+1:
Pls[t] = 0
t += j
else:
... | N = int(input())
ls = list(map(int,input().split()))
Pls = [0] * (10**6+1)
for i in ls:
Pls[i] += 1
ii = 0
for j in range(len(Pls)):
if Pls[j] == 0:
continue
elif Pls[j] == 1:
ii += 1
t = 2*j
while t <= 10**6:
Pls[t] = 0
t += j
else:
... | [
"control_flow.loop.for.condition.change",
"expression.operation.binary.remove"
] | 363,740 | 363,741 | u875769753 | python |
p02642 | n = int(input())
a = sorted(list(map(int,input().split())))
m = max(a)+1
c = [0]*m
for x in a:
for i in range(x,m,x):
if c[i]<2:c[i]+=1
else:break
ans = 0
for i in a:
if c[i]==1:
ans += 1
print(ans) | n = int(input())
a = sorted(list(map(int,input().split())))
m = max(a)+1
c = [0]*m
for x in a:
for i in range(x,m,x):
if c[i]<2:c[i]+=1
ans = 0
for i in a:
if c[i]==1:
ans += 1
print(ans) | [] | 363,757 | 363,758 | u145950990 | python |
p02642 | n = int(input())
data = list(map(int, input().split()))
mx = max(data)
marked = [0]*(mx + 1)
for a in data:
for x in range(a, mx+1, a):
marked[x] += 1
print(marked)
ans = 0
for a in data:
if marked[a] == 1:
ans += 1
print(ans) | n = int(input())
data = list(map(int, input().split()))
mx = max(data)
marked = [0]*(mx + 1)
for a in data:
for x in range(a, mx+1, a):
marked[x] += 1
ans = 0
for a in data:
if marked[a] == 1:
ans += 1
print(ans) | [
"call.remove"
] | 363,777 | 363,778 | u209911545 | python |
p02642 | # coding: utf-8
# Your code here!
import math
import sys
N = int(input())
A = list(map(int, input().split()))
#A.sort()
a_dic = {}
for n in range(N):
if A[n] in a_dic:
a_dic[A[n]] += 1
else:
a_dic[A[n]] = 1
#print(a_dic)
A = list(set(A))
A.sort()
#print(A)
maxA = max(A)
dp = [1 for i in range(ma... | # coding: utf-8
# Your code here!
import math
import sys
N = int(input())
A = list(map(int, input().split()))
#A.sort()
a_dic = {}
for n in range(N):
if A[n] in a_dic:
a_dic[A[n]] += 1
else:
a_dic[A[n]] = 1
#print(a_dic)
A = list(set(A))
A.sort()
#print(A)
maxA = max(A)
dp = [1 for i in range(ma... | [
"call.remove"
] | 363,779 | 363,780 | u919017918 | python |
p02642 | def main():
import sys
input=sys.stdin.readline
n=int(input())
a=list(map(int,input().split()))
adic={}
for i in range(n):
if a[i] in adic:
adic[a[i]]+=1
else:
adic[a[i]]=1
ans=0
a=list(set(a))
maxa=max(a)
dp=[True for i in range(maxa+1)]
... | def main():
import sys
input=sys.stdin.readline
n=int(input())
a=list(map(int,input().split()))
adic={}
for i in range(n):
if a[i] in adic:
adic[a[i]]+=1
else:
adic[a[i]]=1
ans=0
a=list(set(a))
a.sort()
maxa=max(a)
dp=[True for i in ran... | [
"call.add"
] | 363,787 | 363,788 | u060432908 | python |
p02642 | n = int(input())
a_list = list(map(int,input().split()))
a_list = sorted(a_list)
flag = [0]*n
ans = 0
m = max(a_list)
b_list = [0]*(m+1)
for i in a_list:
b_list[i] = 1
for i in a_list:
if b_list[i] == 1:
ans += 1
for j in range(i , m+1 ,i):
b_list[j]+= 1
print(ans) | n = int(input())
a_list = list(map(int,input().split()))
a_list = sorted(a_list)
flag = [0]*n
ans = 0
m = max(a_list)
b_list = [0]*(m+1)
for i in a_list:
b_list[i] += 1
for i in a_list:
if b_list[i] == 1:
ans += 1
for j in range(i , m+1 ,i):
b_list[j]+= 1
print(ans) | [
"assignment.value.change"
] | 363,793 | 363,794 | u549383771 | python |
p02642 | n = int(input())
original_ary = sorted(list(map(int, input().split())))
bool_ary = [0] * original_ary[-1]
for num in original_ary:
bool_ary[num-1] += 1
if bool_ary[num-1] == 1:
for multiple in range(num * 2, original_ary[-1], num):
bool_ary[multiple-1] = 2
print(bool_ary.count(1)) | n = int(input())
original_ary = sorted(list(map(int, input().split())))
bool_ary = [0] * original_ary[-1]
for num in original_ary:
bool_ary[num-1] += 1
if bool_ary[num-1] == 1:
for multiple in range(num * 2, original_ary[-1]+1, num):
bool_ary[multiple-1] = 2
print(bool_ary.count(1))
| [
"control_flow.loop.range.bounds.upper.change",
"expression.operation.binary.add"
] | 363,829 | 363,830 | u867408000 | python |
p02642 | import numpy as np
length = int(input())
As = list(map(int, input().split()))
As.sort()
# indexを数値と紐づけるために+1増やした数にする
check = np.zeros(10**6+1)
answer = 0
# 与えられた数列の小さいものから順にループ
for i in range(length):
if check[As[i]] == 0:
# 与えられた数値の倍数すべてに1を立てる
# checkは0始まりのため、0と倍数要素に1が立つ
check[::As[i]]... | import numpy as np
length = int(input())
As = list(map(int, input().split()))
As.sort()
# indexを数値と紐づけるために+1増やした数にする
check = np.zeros(10**6+1)
answer = 0
# 与えられた数列の小さいものから順にループ
for i in range(length):
if check[As[i]] == 0:
# 与えられた数値の倍数すべてに1を立てる
# checkは0始まりのため、0と倍数要素に1が立つ
check[::As[i]]... | [
"misc.opposites",
"expression.operator.compare.change",
"control_flow.branch.if.condition.change"
] | 363,833 | 363,834 | u036065030 | python |
p02642 | import numpy as np
length = int(input())
As = list(map(int, input().split()))
As.sort()
# indexを数値と紐づけるために+1増やした数にする
check = np.zeros(10**6+1)
answer = 0
# 与えられた数列の小さいものから順にループ
for i in range(length):
if check[As[i]] == 0:
# 与えられた数値の倍数すべてに1を立てる
# checkは0始まりのため、0と倍数要素に1が立つ
check[::As[i]]... | import numpy as np
length = int(input())
As = list(map(int, input().split()))
As.sort()
# indexを数値と紐づけるために+1増やした数にする
check = np.zeros(10**6+1)
answer = 0
# 与えられた数列の小さいものから順にループ
for i in range(length):
if check[As[i]] == 0:
# 与えられた数値の倍数すべてに1を立てる
# checkは0始まりのため、0と倍数要素に1が立つ
check[::As[i]]... | [
"misc.opposites",
"expression.operator.compare.change",
"control_flow.branch.if.condition.change"
] | 363,835 | 363,834 | u036065030 | python |
p02642 | n = int(input())
A = map(int, input().split())
maxA = max(A)
# C[a] = A内のaの個数
C = {a: 0 for a in A}
for a in A:
C[a] += 1
# D[a]=1: Aにaより小さいaの約数が存在する
D = {a: 0 for a in A}
for a in A:
if C[a] > 0:
t = 2
while a * t <= maxA:
D[a * t] = 1
t += 1
ans = 0
for a in A:
if C... | n = int(input())
A = list(map(int, input().split()))
maxA = max(A)
# C[a] = A内のaの個数
C = {a: 0 for a in A}
for a in A:
C[a] += 1
# D[a]=1: Aにaより小さいaの約数が存在する
D = {a: 0 for a in A}
for a in A:
if C[a] > 0:
t = 2
while a * t <= maxA:
D[a * t] = 1
t += 1
ans = 0
for a in A:
... | [
"call.add",
"call.arguments.change"
] | 363,847 | 363,848 | u763534217 | python |
p02642 | n = int(input())
A, = map(int, input().split())
maxA = max(A)
# C[a] = A内のaの個数
C = {a: 0 for a in A}
for a in A:
C[a] += 1
# D[a]=1: Aにaより小さいaの約数が存在する
D = {a: 0 for a in A}
for a in A:
if C[a] > 0:
t = 2
while a * t <= maxA:
D[a * t] = 1
t += 1
ans = 0
for a in A:
if ... | n = int(input())
A = list(map(int, input().split()))
maxA = max(A)
# C[a] = A内のaの個数
C = {a: 0 for a in A}
for a in A:
C[a] += 1
# D[a]=1: Aにaより小さいaの約数が存在する
D = {a: 0 for a in A}
for a in A:
if C[a] > 0:
t = 2
while a * t <= maxA:
D[a * t] = 1
t += 1
ans = 0
for a in A:
... | [
"call.add",
"call.arguments.change"
] | 363,849 | 363,848 | u763534217 | python |
p02642 | # Contest No.: ABC170
# Problem No.: D
# Solver: JEMINI
# Date: 20200614
import sys
import heapq
def main():
n = int(input())
nums = list(map(int, sys.stdin.readline().split()))
nums.sort()
check = [False] * (10 ** 6 + 1)
for i in range(1, n):
if nums[i] == nums[i - 1]:
... | # Contest No.: ABC170
# Problem No.: D
# Solver: JEMINI
# Date: 20200614
import sys
import heapq
def main():
n = int(input())
nums = list(map(int, sys.stdin.readline().split()))
nums.sort()
check = [False] * (10 ** 6 + 1)
for i in range(1, n):
if nums[i] == nums[i - 1]:
... | [
"call.remove"
] | 363,852 | 363,853 | u689377278 | python |
p02642 | n=int(input())
a = list(map(int, input().strip().split()))
a.sort()
lim=10**6+3
ans=0
multiples=[False]*lim
for i in range(n):
if multiples[i]==True:
continue
if i!=n-1 and a[i]==a[i+1]:
pass
else:
ans+=1
for j in range(a[i],lim,a[i]):
multiples[j]=True
print(ans) | n=int(input())
a = list(map(int, input().strip().split()))
a.sort()
lim=10**6+1
ans=0
multiples=[False]*lim
for i in range(n):
if multiples[a[i]]==True:
continue
elif i!=n-1 and a[i]==a[i+1]:
pass
else:
ans+=1
for j in range(a[i],lim,a[i]):
multiples[j]=True
print(ans) | [
"literal.number.integer.change",
"assignment.value.change",
"expression.operation.binary.change",
"control_flow.branch.if.condition.change",
"control_flow.loop.for.condition.change",
"control_flow.branch.if.replace.remove",
"control_flow.branch.else_if.replace.add"
] | 363,887 | 363,888 | u206541745 | python |
p02642 | import sys
input = sys.stdin.readline
N = int(input())
AList = list(map(int, input().split()))
AList.sort()
dp = [0] * (AList[-1] + 1)
for i in AList:
dp[i] += 1
if dp[i] == 1:
for p in range(2 * i, len(dp), i):
dp[j] += 2
print(dp.count(1)) | import sys
input = sys.stdin.readline
N = int(input())
AList = list(map(int, input().split()))
AList.sort()
dp = [0] * (AList[-1] + 1)
for i in AList:
dp[i] += 1
if dp[i] == 1:
for p in range(2 * i, len(dp), i):
dp[p] += 2
print(dp.count(1)) | [
"identifier.change",
"variable_access.subscript.index.change"
] | 363,891 | 363,892 | u381959472 | python |
p02642 | n= int(input())
l=list(map(int,input().split()))
l.sort()
maxnum=l[len(l)-1]
flag=[0]*(maxnum+1)
for num in l:
flag[num]+=1
if flag[num]>1:
continue
for j in range(num*2, maxnum, num):
flag[j]+=1
#print(flag)
ans=0
for num in l:
if flag[num]==1:
ans+=1
print(ans)
| n= int(input())
l=list(map(int,input().split()))
l.sort()
maxnum=l[len(l)-1]
flag=[0]*(maxnum+1)
for num in l:
flag[num]+=1
if flag[num]>1:
continue
for j in range(num*2, maxnum+1, num):
flag[j]+=1
#print(flag)
ans=0
for num in l:
if flag[num]==1:
ans+=1
print(ans)
| [
"control_flow.loop.range.bounds.upper.change",
"expression.operation.binary.add"
] | 363,901 | 363,902 | u444481227 | python |
p02642 | n = int(input())
a = list(map(int, input().split()))
a.sort()
if a[0] == 1:
if len(a) == 1 or a[1] != 1:
print(1)
else:
print(0)
else:
a_max = a[-1]
seive = [True for _ in range(a_max + 1)]
a += [-1]
ret = 0
add = 1
for i in range(n):
if a[i] != a[i+1]:
... | n = int(input())
a = list(map(int, input().split()))
a.sort()
if a[0] == 1:
if len(a) == 1 or a[1] != 1:
print(1)
else:
print(0)
else:
a_max = a[-1]
seive = [True for _ in range(a_max + 1)]
a += [-1]
ret = 0
add = 1
for i in range(n):
if a[i] != a[i+1]:
... | [
"assignment.remove",
"assignment.add"
] | 363,903 | 363,904 | u399155892 | python |
p02642 | def main():
n, *A = map(int, f.read().split())
A.sort()
n = A[-1]
isPrime = [True] * (n + 1)
prep = 0
for i in A:
if prep == i:
isPrime[prep] = False
continue
if isPrime[i]:
for j in range(i * 2, n + 1, i):
isPrime[j] = False
... | def main():
n, *A = map(int, open(0).read().split())
A.sort()
n = A[-1]
isPrime = [True] * (n + 1)
prep = 0
for i in A:
if prep == i:
isPrime[prep] = False
continue
if isPrime[i]:
for j in range(i * 2, n + 1, i):
isPrime[j] = Fa... | [
"assignment.value.change",
"call.arguments.change",
"call.arguments.add"
] | 363,905 | 363,906 | u780475861 | python |
p02642 | import numpy as np
n,*a=map(int,open(0).read().split())
l=np.zeros(max(a)+1)
a.sort()
a+=[10**7]
r=0
for i,j in zip(a,a[1:]):
if l[i]==0:
l[::i]=1
if i!=j:
r+=1
print(i)
print(r) | import numpy as np
n,*a=map(int,open(0).read().split())
l=np.zeros(max(a)+1)
a.sort()
a+=[10**7]
r=0
for i,j in zip(a,a[1:]):
if l[i]==0:
l[::i]=1
if i!=j:
r+=1
print(r) | [
"call.remove"
] | 363,907 | 363,908 | u350248178 | python |
p02642 | #!/usr/bin/env python3
import sys
sys.setrecursionlimit(300000)
def solve(N: int, A: "List[int]"):
counts = {}
for a in A:
if not a in counts:
counts[a] = 0
counts[a] += 1
M = max(A)
s = set(A)
ret = 0
used = [False] * (M + 1)
for i in range(1, M + 1):
... | #!/usr/bin/env python3
import sys
sys.setrecursionlimit(300000)
def solve(N: int, A: "List[int]"):
counts = {}
for a in A:
if not a in counts:
counts[a] = 0
counts[a] += 1
M = max(A)
s = set(A)
ret = 0
used = [False] * (M + 1)
for i in range(1, M + 1):
... | [
"identifier.change",
"variable_access.subscript.index.change",
"control_flow.branch.if.condition.change"
] | 363,916 | 363,917 | u200785298 | python |
p02642 | N = int(input())
A_list = [int(n) for n in input().split()]
import numpy as np
A_array = np.array(A_list)
sort_A = np.sort(A_array)
n_array = np.zeros(10**6)
for a in sort_A:
if n_array[a - 1] >= 2:
continue
a_times = np.array(range(a, 10**6+1, a))
n_array[(a_times -1).a... | N = int(input())
A_list = [int(n) for n in input().split()]
import numpy as np
A_array = np.array(A_list)
sort_A = np.sort(A_array)
n_array = np.zeros(10**6)
for a in sort_A:
if n_array[a - 1] >= 2:
continue
a_times = np.array(range(a, 10**6+1, a))
n_array[(a_times -1).a... | [
"call.add",
"call.arguments.change"
] | 363,924 | 363,925 | u460399356 | python |
p02642 | import collections
n = int(input())
a = list(map(int, input().split()))
a = sorted(a)
c = collections.Counter(a)
data = sorted(list(set(a)))
max_ = max(a)+1
prime_bool = [True]*max_
prime_bool[0] = False
for i in range(len(data)):
p = data[i]
if prime_bool[p]:
#print(p)
k = 2
while k*p <= max_:
... | import collections
n = int(input())
a = list(map(int, input().split()))
a = sorted(a)
c = collections.Counter(a)
data = sorted(list(set(a)))
max_ = max(a)+1
prime_bool = [True]*max_
prime_bool[0] = False
for i in range(len(data)):
p = data[i]
if prime_bool[p]:
#print(p)
k = 2
while k*p < max_:
p... | [
"expression.operator.compare.change",
"control_flow.loop.condition.change"
] | 363,934 | 363,935 | u626881915 | python |
p02642 |
n = int(input())
a = list(map(int,input().split()))
a.sort()
max_a = a[-1]
is_available = [True] * (max_a + 1)
ans = 0
for i, x in enumerate(a[:-1]):
if not a[i+1] == x and is_available[x]:
ans += 1
for b in range(x, m + 1, x):
is_available[b] = False
if is_available[a[-1]]:
ans += 1
... | n = int(input())
a = list(map(int,input().split()))
a.sort()
max_a = a[-1]
is_available = [True] * (max_a + 1)
ans = 0
for i, x in enumerate(a[:-1]):
if not a[i+1] == x and is_available[x]:
ans += 1
for b in range(x, max_a + 1, x):
is_available[b] = False
if is_available[a[-1]]:
ans += ... | [
"identifier.change",
"call.arguments.change",
"expression.operation.binary.change",
"control_flow.loop.range.bounds.step.change"
] | 363,972 | 363,973 | u466074086 | python |
p02642 | n = int(input())
a = list(map(int,input().split()))
a.sort()
dp = [True] * a[-1]
ans = 0
m = a[-1]
for i, x in enumerate(a[:-1]):
if not a[i+1] == x and dp[x]:
ans += 1
for b in range(x, m + 1, x):
dp[b] = False
if dp[a[-1]]:
ans += 1
print(ans) | n = int(input())
a = list(map(int,input().split()))
a.sort()
dp = [True] * (a[-1] + 1)
ans = 0
m = a[-1]
for i, x in enumerate(a[:-1]):
if not a[i+1] == x and dp[x]:
ans += 1
for b in range(x, m + 1, x):
dp[b] = False
if dp[a[-1]]:
ans += 1
print(ans) | [] | 363,974 | 363,975 | u466074086 | python |
p02642 | n, *a = map(int, open(0).read().split())
a.sort()
am = a[-1] + 1000
dp = [True] * am
ans = 0
dup = set()
for x in a:
d = dp[x]
if d:
ans += 1
for i in range(x, am, x):
dp[i] = False
dp[x] = None
elif d == None:
dup.add(d)
print(ans - len(dup)) | n, *a = map(int, open(0).read().split())
a.sort()
am = a[-1] + 1
dp = [True] * am
ans = 0
dup = set()
for x in a:
d = dp[x]
if d:
ans += 1
for i in range(x, am, x):
dp[i] = False
dp[x] = None
elif d == None:
dup.add(x)
print(ans - len(dup)) | [
"literal.number.integer.change",
"assignment.value.change",
"expression.operation.binary.change",
"identifier.change",
"call.arguments.change"
] | 363,983 | 363,984 | u200916944 | python |
p02642 | n, *a = map(int, open(0).read().split())
a.sort()
am = a[-1] + 1
dp = [True] * am
ans = 0
dup = set()
for x in a:
d = dp[x] ... | n, *a = map(int, open(0).read().split())
a.sort()
am = a[-1] + 1
dp = [True] * am
ans = 0
dup = set()
for x in a:
d = dp[x]
if d:
ans += 1
for i in range(x, am, x):
dp[i] = False
dp[x] = None
elif d == None:
dup.add(x)
print(ans - len(dup)) | [
"identifier.change",
"call.arguments.change"
] | 363,985 | 363,984 | u200916944 | python |
p02642 | N = int(input())
A = list(map(int, input().split()))
A.sort()
dlen = A[-1]+3
d = [True]*dlen
for a in A:
if d[a]:
for i in range(a*2, dlen, a):
d[i] = False
res = 0
for i in range(N):
if i > 1:
if A[i] == A[i-1]:
continue
if i < N-1:
if A[i] == A[i+1]:
... | N = int(input())
A = list(map(int, input().split()))
A.sort()
dlen = A[-1]+3
d = [True]*dlen
for a in A:
if d[a]:
for i in range(a*2, dlen, a):
d[i] = False
res = 0
for i in range(N):
if i > 0:
if A[i] == A[i-1]:
continue
if i < N-1:
if A[i] == A[i+1]:
... | [
"literal.number.integer.change",
"control_flow.branch.if.condition.change"
] | 364,023 | 364,024 | u642012866 | python |
p02642 | N = int(input())
A = list(map(int, input().split()))
A.sort()
dlen = A[-1]+1
d = [True]*dlen
for a in A:
if d[a]:
for i in range(a*2, dlen, a):
d[i] = False
res = 0
for i in range(N):
if i > 1:
if A[i] == A[i-1]:
continue
if i < N-1:
if A[i] == A[i+1]:
... | N = int(input())
A = list(map(int, input().split()))
A.sort()
dlen = A[-1]+3
d = [True]*dlen
for a in A:
if d[a]:
for i in range(a*2, dlen, a):
d[i] = False
res = 0
for i in range(N):
if i > 0:
if A[i] == A[i-1]:
continue
if i < N-1:
if A[i] == A[i+1]:
... | [
"literal.number.integer.change",
"assignment.value.change",
"expression.operation.binary.change",
"control_flow.branch.if.condition.change"
] | 364,025 | 364,024 | u642012866 | python |
p02642 | N = int(input())
S = list(map(int, input().split()))
S.sort()
ans = 0
A = [True]*(10**6+1)
for i in range(0, N):
if not A[S[i]]:
continue
if 0 < i:
if S[i-1] == S[i]:
continue
if i < N-1:
if S[i] == S[i+1]:
for j in range(1, 10**6//S[i]+1):
A... | N = int(input())
S = list(map(int, input().split()))
S.sort()
ans = 0
A = [True]*(10**6+1)
for i in range(0, N):
if not A[S[i]]:
continue
if 0 < i:
if S[i-1] == S[i]:
continue
if i < N-1:
if S[i] == S[i+1]:
for j in range(1, 10**6//S[i]+1):
A... | [
"control_flow.continue.add"
] | 364,037 | 364,038 | u135346354 | python |
p02642 | from collections import Counter
N = int(input())
A = list(map(int, input().split()))
cnt = Counter(A)
A.sort()
ans = 0
P = [0] * (10 ** 6 + 1)
print(cnt)
for a in A:
if P[a] == 0:
for i in range(10 ** 7):
x = a * i
if x > 10 ** 6:
break
P[x] = 1
if... | from collections import Counter
N = int(input())
A = list(map(int, input().split()))
cnt = Counter(A)
A.sort()
ans = 0
P = [0] * (10 ** 6 + 1)
for a in A:
if P[a] == 0:
for i in range(10 ** 7):
x = a * i
if x > 10 ** 6:
break
P[x] = 1
if cnt[a] == ... | [
"call.remove"
] | 364,041 | 364,042 | u563453679 | python |
p02642 | from collections import Counter
n=int(input())
*a,=map(int, input().split())
sa=Counter(a)
if 1 in sa:
if sa[1]>1:
print(0)
else:
print(1)
exit()
# def fct(x):
# f1=[1]
# f2=[]
# for i in range(2,min(int(x**(1/2)+7),x)):
# if x%i==0:
# f1.append(i)
# ... | from collections import Counter
n=int(input())
*a,=map(int, input().split())
sa=Counter(a)
if 1 in sa:
if sa[1]>1:
print(0)
else:
print(1)
exit()
# def fct(x):
# f1=[1]
# f2=[]
# for i in range(2,min(int(x**(1/2)+7),x)):
# if x%i==0:
# f1.append(i)
# ... | [
"control_flow.break.add"
] | 364,048 | 364,049 | u520276780 | python |
p02642 | from collections import Counter
n = int(input())
A = sorted(map(int, input().split()))
c = Counter(A)
yes_or_no = [1 for i in range(A[n-1])]
for a in A:
t = a*2
while t <= A[n-1]:
yes_or_no[t] = 0
t += a
ans = 0
for a in A:
if c[a] == 1 and yes_or_no[a] == 1:
ans += 1
print(ans) | from collections import Counter
n = int(input())
A = sorted(map(int, input().split()))
c = Counter(A)
yes_or_no = [True for i in range(A[n-1]+1)]
for a in A:
t = a*2
while t <= A[n-1]:
yes_or_no[t] = False
t += a
ans = 0
for a in A:
if c[a] == 1 and yes_or_no[a] == True:
ans += 1
print(ans) | [
"assignment.value.change",
"control_flow.branch.if.condition.change"
] | 364,066 | 364,067 | u217732870 | python |
p02642 | def main():
import sys
sys.setrecursionlimit(10**9)
input = sys.stdin.readline
from collections import Counter
N = int(input())
A = list(map(int, input().split()))
counter_A = Counter(A)
flag = [True] * 1000001
count = 0
for i in sorted(counter_A.keys()):
if counter_A[i... | def main():
import sys
sys.setrecursionlimit(10**9)
input = sys.stdin.readline
from collections import Counter
N = int(input())
A = list(map(int, input().split()))
counter_A = Counter(A)
flag = [True] * 1000001
count = 0
for i in sorted(counter_A.keys()):
if counter_A[i... | [
"expression.operator.compare.change",
"control_flow.branch.if.condition.change"
] | 364,076 | 364,077 | u111473084 | python |
p02642 | N = int(input())
A = list(map(int,input().split()))
A.sort()
c = Counter(A)
lst = [1] * (10**6+1)
res = 0
for i,a in enumerate(A):
if lst[a] == 0: continue
if i==N-1 or A[i+1] != a:
res += 1
for j in range(a, 10**6+1, a):
lst[j] = 0
print(res) | from collections import Counter
N = int(input())
A = list(map(int,input().split()))
A.sort()
c = Counter(A)
lst = [1] * (10**6+1)
res = 0
for i,a in enumerate(A):
if lst[a] == 0: continue
if i==N-1 or A[i+1] != a:
res += 1
for j in range(a, 10**6+1, a):
lst[j] = 0
print(res)
| [] | 364,094 | 364,095 | u723711163 | python |
p02642 | n = int(input())
a = list(map(int, input().split()))
MAX = 1000005
cnt = [0] * MAX
for x in a:
if cnt[x] != 0:
continue
#cnt配列の各倍数のところに+1
for i in range(x, MAX, x):
cnt[i] += 1
ans = 0
for x in a:
if cnt[x] == 1:
ans += 1
print(ans) | n = int(input())
a = list(map(int, input().split()))
MAX = 1000005
cnt = [0] * MAX
for x in a:
if cnt[x] != 0:
cnt[x] = 2
continue
#cnt配列の各倍数のところに+1
for i in range(x, MAX, x):
cnt[i] += 1
ans = 0
for x in a:
if cnt[x] == 1:
ans += 1
print(ans) | [
"assignment.add"
] | 364,110 | 364,111 | u959682820 | python |
p02642 | # D - Not Divisible
N = int(input())
A = list(int(a) for a in input().split())
A.sort()
M = max(A)
is_D = [0] * (M+1)
for i, a in enumerate(A):
if is_D[a]:
is_D[a] = 2
continue
for j in range(2*a, M+1, a):
is_D[j] += 1
ans = 0
for a in A:
if is_D[a] == 1:
ans += 1
print(an... | # D - Not Divisible
N = int(input())
A = list(int(a) for a in input().split())
A.sort()
M = max(A)
is_D = [0] * (M+1)
for i, a in enumerate(A):
if is_D[a]:
is_D[a] = 2
continue
for j in range(a, M+1, a):
is_D[j] += 1
ans = 0
for a in A:
if is_D[a] == 1:
ans += 1
print(ans) | [
"expression.operation.binary.remove"
] | 364,112 | 364,113 | u141786930 | python |
p02642 | n = int(input())
a = list(map(int, input().split()))
m = (10 ** 6 + 1)
cnt = [0] * m
for x in a:
if cnt[x] != 0:
cnt[x] = 2
continue
for i in range(x, m, x):
cnt += 1
ans = 0
for x in a:
if cnt[x] == 1:
ans += 1
print(ans) | n = int(input())
a = list(map(int, input().split()))
m = 10 ** 6 + 1
cnt = [0] * m
for x in a:
if cnt[x] != 0:
cnt[x] = 2
continue
for i in range(x, m, x):
cnt[i] += 1
ans = 0
for x in a:
if cnt[x] == 1:
ans += 1
print(ans)
| [] | 364,125 | 364,126 | u733774002 | python |
p02642 | n = int(input())
a = list(map(int, input().split()))
a.sort()
dp = [0]*(1000000+1)
cnt = 0
for i in range(len(a)):
if dp[a[i]]==1:
continue
while(a[i]*j<=a[-1]):
dp[a[i]*j] = 1
j += 1
if i!=len(a)-1 and a[i+1]==a[i]:
dp[a[i]] = 1
continue
cnt += 1
dp[a[i]] = 1
j = 2
print(cnt) | n = int(input())
a = list(map(int, input().split()))
a.sort()
dp = [0]*(1000000+1)
cnt = 0
for i in range(len(a)):
if dp[a[i]]==1:
continue
j = 2
while(a[i]*j<=a[-1]):
dp[a[i]*j] = 1
j += 1
if i!=len(a)-1 and a[i+1]==a[i]:
dp[a[i]] = 1
continue
cnt += 1
dp[a[i]] = 1
print(cnt) | [
"assignment.add",
"assignment.remove"
] | 364,138 | 364,139 | u714732628 | python |
p02642 | from collections import Counter
input()
a_list = list(map(int, input().split()))
c = Counter(a_list)
divisible = [True] * (10**6+1)
for el, count in c.items():
if count!=1:
divisible[el] = False
continue
else:
for i in range(el*2, 10**6+1, el):
divisible[i] = False
a_list =... | from collections import Counter
input()
a_list = list(map(int, input().split()))
c = Counter(a_list)
divisible = [True] * (10**6+1)
for el, count in c.items():
if count!=1:
divisible[el] = False
for i in range(el*2, 10**6+1, el):
divisible[i] = False
a_list = list(set(a_list))
ans = len(
[... | [] | 364,142 | 364,143 | u621345513 | python |
p02642 | import bisect
n = int(input())
a = list(map(int, input().split()))
a.sort()
k = len(a)
ok = [0] * k
for i in range(k):
if i < k - 1 and a[i] == a[i + 1]:
ok[i] = 1
ok[i+1] = 1
times = 2
while a[i] * times < a[-1]:
r = bisect.bisect_left(a, a[i] * times)
l = bisect.bisect_le... | import bisect
n = int(input())
a = list(map(int, input().split()))
a.sort()
k = len(a)
ok = [0] * k
for i in range(k):
if i < k - 1 and a[i] == a[i + 1]:
ok[i] = 1
ok[i+1] = 1;
continue
times = 2
while a[i] * times <= a[-1]:
r = bisect.bisect_left(a, a[i] * times + 1)
... | [
"control_flow.continue.add",
"expression.operator.compare.change",
"control_flow.loop.condition.change"
] | 364,153 | 364,152 | u791593901 | python |
p02642 | n = int(input())
a = map(int, input().split())
a = list(sorted(a))
big = a[n-1]
mark = [0]*big
for x in a:
mark[x] += 1
if mark[x] > 1:
continue
for j in range(x*2, big+1, x):
mark[j] += 1
ans = 0
for x in a:
if mark[x] == 1:
ans += 1
print(ans) | n = int(input())
a = map(int, input().split())
a = list(sorted(a))
big = a[n-1]
mark = [0]*(big+1)
for x in a:
mark[x] += 1
if mark[x] > 1:
continue
for j in range(x*2, big+1, x):
mark[j] += 1
ans = 0
for x in a:
if mark[x] == 1:
ans += 1
print(ans)
| [] | 364,171 | 364,172 | u395620499 | python |
p02642 | N = int(input())
A = list(map(int,input().split()))
A.sort()
l = [0] * A[-1]
for i in range(N):
l[A[i] - 1] += 1
for i in range(N):
if l[A[i] - 1] > 1:
l[A[i] - 1] = 0
elif l[A[i] - 1] == 0:
continue
else:
temp = A[i]
while True:
temp += A[i]
if te... | N = int(input())
A = list(map(int,input().split()))
A.sort()
l = [0] * A[-1]
for i in range(N):
l[A[i] - 1] += 1
for i in range(N):
if l[A[i] - 1] > 1:
l[A[i] - 1] = 0
elif l[A[i] - 1] == 0:
continue
temp = A[i]
while True:
temp += A[i]
if temp > A[-1]:
br... | [] | 364,173 | 364,174 | u825541307 | python |
p02642 | N = int(input())
A = list(map(int,input().split()))
U = [0]*(10**6+1)
for e in A:
U[e] += 1
ans = 0
for k in range(1,10**6+1+1):
if U[k] == 1:
ans += 1
if U[k] > 0:
for l in range(2*k,10**6+1+1,k):
if U[l] > 0:
U[l] += 1
print(ans)
| N = int(input())
A = list(map(int,input().split()))
U = [0]*(10**6+1)
for e in A:
U[e] += 1
ans = 0
for k in range(1,10**6+1):
if U[k] == 1:
ans += 1
if U[k] > 0:
for l in range(2*k,10**6+1,k):
if U[l] > 0:
U[l] += 1
print(ans)
| [
"expression.operation.binary.remove"
] | 364,188 | 364,189 | u620084012 | python |
p02642 | N = int(input())
A = list(map(int, input().split()))
A.sort()
maxnum = A[-1]
checklist = [True]*(maxnum+1)
before = 0
for a in A:
if before == a:
checklist[a] = False
continue
num = 1
while num * a <= maxnum:
checklist[a * num] = False
num += 1
before = a
ans = 0
for ... | N = int(input())
A = list(map(int, input().split()))
A.sort()
maxnum = A[-1]
checklist = [True]*(maxnum+1)
before = 0
for a in A:
if before == a:
checklist[a] = False
continue
num = 2
while num * a <= maxnum:
checklist[a * num] = False
num += 1
before = a
ans = 0
for ... | [
"literal.number.integer.change",
"assignment.value.change"
] | 364,190 | 364,191 | u595905528 | python |
p02642 | N = int(input())
A = list(map(int, input().split()))
if N == 1:
print(1)
exit()
check_list = [0] * (10**6 + 1)
cnt = 0
for i in range(len(A)):
tmp = A[i]
while True:
if tmp > A[-1]:
break
check_list[tmp] += 1
tmp += A[i]
for a in A:
if check_list[a] == 1:
... | N = int(input())
A = sorted(list(map(int, input().split())))
if N == 1:
print(1)
exit()
check_list = [0] * (10**6 + 1)
cnt = 0
for i in range(len(A)):
tmp = A[i]
while True:
if tmp > A[-1]:
break
check_list[tmp] += 1
tmp += A[i]
for a in A:
if check_list[a... | [
"call.add",
"call.arguments.change"
] | 364,236 | 364,237 | u513519822 | python |
p02642 | N = int(input())
A = [int(x) for x in input().split()]
K = 10**6+1
num = [0] * K
l = [False] * K
for i in range(N):
num[A[i]]+=1
l[A[i]] = True
for i in range(2, K):
if num[i]>0:
if num[i]>1:
l[i] = False
j = 2
while i*j < K:
l[i*j] = False
j += ... | N = int(input())
A = [int(x) for x in input().split()]
K = 10**6+1
num = [0] * K
l = [False] * K
for i in range(N):
num[A[i]]+=1
l[A[i]] = True
for i in range(1, K):
if num[i]>0:
if num[i]>1:
l[i] = False
j = 2
while i*j < K:
l[i*j] = False
j += ... | [
"literal.number.integer.change",
"call.arguments.change",
"control_flow.loop.range.bounds.lower.change"
] | 364,276 | 364,277 | u057617112 | python |
p02642 | def examA():
X = LI()
for i in range(len(X)):
if X[i]==0:
ans = i+1
print(ans)
return
def examB():
X, Y = LI()
ans = "No"
for i in range(X+1):
if i*2+(X-i)*4==Y:
ans = "Yes"
print(ans)
return
def examC():
X, N = LI()
P = LI()
P = ... | def examA():
X = LI()
for i in range(len(X)):
if X[i]==0:
ans = i+1
print(ans)
return
def examB():
X, Y = LI()
ans = "No"
for i in range(X+1):
if i*2+(X-i)*4==Y:
ans = "Yes"
print(ans)
return
def examC():
X, N = LI()
P = LI()
P = ... | [
"call.remove",
"identifier.change"
] | 364,312 | 364,313 | u638795007 | python |
p02642 | def examA():
X = LI()
for i in range(len(X)):
if X[i]==0:
ans = i+1
print(ans)
return
def examB():
X, Y = LI()
ans = "No"
for i in range(X+1):
if i*2+(X-i)*4==Y:
ans = "Yes"
print(ans)
return
def examC():
X, N = LI()
P = LI()
P = ... | def examA():
X = LI()
for i in range(len(X)):
if X[i]==0:
ans = i+1
print(ans)
return
def examB():
X, Y = LI()
ans = "No"
for i in range(X+1):
if i*2+(X-i)*4==Y:
ans = "Yes"
print(ans)
return
def examC():
X, N = LI()
P = LI()
P = ... | [
"identifier.change"
] | 364,314 | 364,313 | u638795007 | python |
p02642 | def main():
N = int(input())
A = list(map(int, input().split()))
d = dict()
for v in A:
d[v] = d.get(v, 0) + 1
if 1 in d:
if d[1] == 1: return 1
else: return 0
A = list(set(A))
A.sort()
s = set()
ans = 0
for i in range(N):
if d[A[i]] == 1:
... | def main():
N = int(input())
A = list(map(int, input().split()))
d = dict()
for v in A:
d[v] = d.get(v, 0) + 1
if 1 in d:
if d[1] == 1: return 1
else: return 0
A = list(set(A))
A.sort()
s = set()
ans = 0
for i in range(len(A)):
if d[A[i]] == 1:
... | [
"call.arguments.change",
"control_flow.loop.range.bounds.upper.change",
"call.arguments.add"
] | 364,388 | 364,389 | u116002573 | python |
p02642 | n = int(input())
a = list(map(int, input().split()))
a.sort()
box = [1] * (a[-1] + 1)
ans = 0
if n == 1:
print(1)
else:
for i in range(n):
if i == 0:
for j in range(a[-1] // a[i]):
box[a[i] * (j + 1)] = 0
if a[1] != a[0]:
ans += 1
elif i =... | n = int(input())
a = list(map(int, input().split()))
a.sort()
box = [1] * (a[-1] + 1)
ans = 0
if n == 1:
print(1)
else:
for i in range(n):
if i == 0:
for j in range(a[-1] // a[i]):
box[a[i] * (j + 1)] = 0
if a[1] != a[0]:
ans += 1
elif i =... | [
"misc.opposites",
"expression.operator.compare.change",
"control_flow.branch.if.condition.change"
] | 364,448 | 364,449 | u664907598 | python |
p02642 | n = int(input())
a = list(map(int,input().split()))
a.sort()
box = [1]*(a[-1] + 1)
ans = 0
if n == 1:
print(1)
else:
for i in range(n):
if i == 0:
for j in range(a[-1] // a[i]):
box[a[i] * (j+1)] = 0
if a[1] != a[0]:
ans += 1
elif ... | n = int(input())
a = list(map(int, input().split()))
a.sort()
box = [1] * (a[-1] + 1)
ans = 0
if n == 1:
print(1)
else:
for i in range(n):
if i == 0:
for j in range(a[-1] // a[i]):
box[a[i] * (j + 1)] = 0
if a[1] != a[0]:
ans += 1
elif i =... | [
"misc.opposites",
"expression.operator.compare.change",
"control_flow.branch.if.condition.change"
] | 364,450 | 364,449 | u664907598 | python |
p02642 | n = int(input())
a = list(map(int,input().split()))
if n == 1:
print(1)
exit()
flag = [True for i in range(10**6+1)]
a.sort()
for i in range(n):
if flag[a[i]] == False:
continue
if i >= 1:
if a[i] == a[i-1]:
continue
for j in range(2,(10**6)//a[i]+1):
flag[a[i]*j]... | n = int(input())
a = list(map(int,input().split()))
if n == 1:
print(1)
exit()
flag = [True for i in range(10**6+1)]
a.sort()
for i in range(n):
if flag[a[i]] == False:
continue
if i >= 1:
if a[i] == a[i-1]:
continue
for j in range(2,(10**6)//a[i]+1):
flag[a[i]*j]... | [
"control_flow.loop.for.condition.change",
"control_flow.branch.if.condition.change",
"misc.off_by_one"
] | 364,465 | 364,464 | u953110527 | python |
p02642 | N = int(input())
A = [int(n) for n in input().split()]
seen = set()
A_set = set()
A_largest = 0
for a in A:
if a > A_largest:
A_largest = a
if a not in seen:
A_set.add(a)
seen.add(a)
else:
if a in A_set:
A_set.remove(a)
for b in range(1, A_largest+1):
if b i... | N = int(input())
A = [int(n) for n in input().split()]
seen = set()
A_set = set()
A_largest = 0
for a in A:
if a > A_largest:
A_largest = a
if a not in seen:
A_set.add(a)
seen.add(a)
else:
if a in A_set:
A_set.remove(a)
for b in range(1, A_largest+1):
if b i... | [
"identifier.change",
"control_flow.branch.if.condition.change"
] | 364,490 | 364,491 | u433371341 | python |
p02642 | n = int(input())
a = list(map(int, input().split()))
x = [False]*(10**6+1)
a.sort()
for i in range(1, n):
if a[i] == a[i-1]:
if x[a[i]]:
continue
else:
x[a[i]] = True
for r in range(a[i], 10 ** 6 + 1, a[i]):
x[i] = True
ans = 0
for v in a:
if... | n = int(input())
a = list(map(int, input().split()))
x = [False]*(10**6+1)
a.sort()
for i in range(1, n):
if a[i] == a[i-1]:
if x[a[i]]:
continue
else:
x[a[i]] = True
for r in range(a[i], 10 ** 6 + 1, a[i]):
x[r] = True
ans = 0
for v in a:
if... | [
"assignment.variable.change",
"identifier.change",
"variable_access.subscript.index.change"
] | 364,535 | 364,536 | u595289165 | python |
p02642 | n = int(input())
a = list(map(int, input().split()))
l = [0] * 1000001
ans = 0
for i in range(n):
l[a[i]] += 1
for i in range(1, 1000001):
if l[i] > 0:
if l[i] == 1:
ans += 1
for j in range(2, 1000001//i + 1):
l[i * j] = 0
print(ans) | n = int(input())
a = list(map(int, input().split()))
l = [0] * 1000001
ans = 0
for i in range(n):
l[a[i]] += 1
for i in range(1, 1000001):
if l[i] > 0:
if l[i] == 1:
ans += 1
for j in range(2, 1000000//i + 1):
l[i * j] = 0
print(ans) | [
"literal.number.integer.change",
"call.arguments.change",
"expression.operation.binary.change",
"control_flow.loop.range.bounds.upper.change"
] | 364,567 | 364,568 | u552290152 | python |
p02646 | import math
import collections
import itertools
import copy
def YesNo(Bool):
if(Bool):
print("YES")
else:
print("NO")
return
def resolve():
A,V=map(int,input().split())
B,W=map(int,input().split())
T=int(input())
if(A<B and V<=W):
print("NO")
return
i... | import math
import collections
import itertools
import copy
def YesNo(Bool):
if(Bool):
print("YES")
else:
print("NO")
return
def resolve():
A,V=map(int,input().split())
B,W=map(int,input().split())
T=int(input())
if(A<B and V<=W):
print("NO")
return
i... | [
"misc.opposites",
"expression.operator.compare.change",
"control_flow.branch.if.condition.change",
"expression.operator.arithmetic.change"
] | 365,097 | 365,096 | u457460736 | python |
p02646 | import math
import collections
import itertools
import copy
def YesNo(Bool):
if(Bool):
print("YES")
else:
print("NO")
return
def resolve():
A,V=map(int,input().split())
B,W=map(int,input().split())
T=int(input())
if(A<B and V<W):
print("NO")
return
if... | import math
import collections
import itertools
import copy
def YesNo(Bool):
if(Bool):
print("YES")
else:
print("NO")
return
def resolve():
A,V=map(int,input().split())
B,W=map(int,input().split())
T=int(input())
if(A<B and V<=W):
print("NO")
return
i... | [
"expression.operator.compare.change",
"control_flow.branch.if.condition.change",
"misc.opposites",
"expression.operator.arithmetic.change"
] | 365,098 | 365,096 | u457460736 | python |
p02646 | a,v,b,w,t=map(int,open(0).read().split());print('YNEOS'[w>=v or t<-(-abs(a-b)//(w-v))::2]) | a,v,b,w,t=map(int,open(0).read().split());print('YNEOS'[w>=v or t<-(-abs(a-b)//(v-w))::2]) | [
"expression.operation.binary.remove"
] | 365,107 | 365,108 | u248670337 | python |
p02646 | #!/usr/bin/env python
a, v = map(int, input().split())
b, w = map(int, input().split())
t = int(input())
if v <= w:
print('NO')
exit()
if abs(b-a)//(v-w) > t:
print('NO')
exit()
print('YES')
| #!/usr/bin/env python
a, v = map(int, input().split())
b, w = map(int, input().split())
t = int(input())
if v <= w:
print('NO')
exit()
if abs(b-a)/(v-w) > t:
print('NO')
exit()
print('YES')
| [
"expression.operator.arithmetic.change",
"control_flow.branch.if.condition.change"
] | 365,109 | 365,110 | u998741086 | python |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.