gpt4 book ai didi

python - 找到前 n 个素数?

转载 作者:行者123 更新时间:2023-11-28 19:45:57 24 4
gpt4 key购买 nike

<分区>

Possible Duplicate:
Fastest way to list all primes below N in python

尽管我已经编写了一个函数来查找 n 下的所有素数 (primes(10) -> [2, 3, 5, 7]),但我正在努力寻找一种快速的方法来找到前 n 个素数。最快的方法是什么?

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com