We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3619f77 commit d806df2Copy full SHA for d806df2
ARC/ARC017/A.py
@@ -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