Skip to content

math.py 的筛质数有问题 #22

@ghost

Description

prime_sieve(25)
[2, 3, 5, 9, 11, 15, 17, 23]

prime_sieve(20)
Traceback (most recent call last):
File "", line 1, in
File "C:\Program Files\Python36\lib\site-packages\cyaron\math.py", line 258, in prime_sieve
sieve[iint(i/2)::i] = [False] * (int((n-ii-1)/(2*i))+1)
ValueError: attempt to assign sequence of size 2 to extended slice of size 3

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions