Закинул ещё мусора с Интеллекта, наверное это последнее
This commit is contained in:
13
uts/uts_17_aut_py/lal/i-v3.py
Normal file
13
uts/uts_17_aut_py/lal/i-v3.py
Normal file
@@ -0,0 +1,13 @@
|
||||
import math
|
||||
|
||||
n = 10000000
|
||||
|
||||
a = [True] * n
|
||||
|
||||
for i in range(2, int(math.sqrt(n))):
|
||||
for j in range(i * 2, n, i):
|
||||
a[j] = False
|
||||
b = [i for i in range(2, n) if a[i]]
|
||||
|
||||
#print(b)
|
||||
print(len(b))
|
||||
Reference in New Issue
Block a user