Skip to content

Commit d806df2

Browse files
author
IsHYuhi
committed
ARC017
1 parent 3619f77 commit d806df2

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

ARC/ARC017/A.py

+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
import numpy as np
2+
3+
def seachPrimeNum(N):
4+
max = int(np.sqrt(N))
5+
seachList = [i for i in range(2,N+1)]
6+
primeNum = []
7+
while seachList[0] <= max:
8+
primeNum.append(seachList[0])
9+
tmp = seachList[0]
10+
seachList = [i for i in seachList if i % tmp != 0]
11+
primeNum.extend(seachList)
12+
return primeNum
13+
14+
n = int(input())
15+
primes = seachPrimeNum(1000000)
16+
if n in primes:
17+
print('YES')
18+
else:
19+
print('NO')

0 commit comments

Comments
 (0)