会员
周边
众包
新闻
博问
闪存
赞助商
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
似水流年
博客园
首页
新随笔
联系
订阅
管理
随笔 - 130
文章 - 0
评论 - 2
阅读 -
41404
随笔分类 -
algorithm
求2~2000的所有素数.有足够的内存,要求尽量快
摘要:质数是指在大于1的自然数中,除了1和它本身以外不再有其他因数的自然数。 "埃拉托斯特尼筛法是比较好的解决方法" 思路:我们从2开始遍历到根号n,先找到第一个质数2,然后将其所有的倍数全部标记出来,然后到下一个质数3,标记其所有倍数,一次类推,直到根号n,此时数组中未被标记的数字就是质数。我们需要一个
阅读全文
posted @
2020-05-19 10:31
phper-liunian
阅读(405)
评论(0)
推荐(0)
编辑
公告
昵称:
phper-liunian
园龄:
4年9个月
粉丝:
0
关注:
0
+加关注
<
2025年3月
>
日
一
二
三
四
五
六
23
24
25
26
27
28
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
1
2
3
4
5
搜索
常用链接
我的随笔
我的评论
我的参与
最新评论
我的标签
随笔分类
algorithm(1)
Django(5)
docker(15)
elasticsearch(3)
git(1)
golang(5)
interview(3)
Java(1)
MySQL(7)
network(2)
nginx(2)
os(15)
other(1)
php(6)
Python(11)
queue(6)
Redis(44)
shell(4)
tool(1)
随笔档案
2023年7月(1)
2023年6月(1)
2022年12月(2)
2022年11月(6)
2022年9月(11)
2022年8月(4)
2022年7月(1)
2022年6月(1)
2022年5月(3)
2022年4月(1)
2021年10月(3)
2021年9月(1)
2021年8月(1)
2021年7月(10)
2021年4月(2)
2021年3月(2)
2021年1月(1)
2020年12月(4)
2020年11月(3)
2020年10月(15)
2020年9月(15)
2020年8月(27)
2020年6月(1)
2020年5月(14)
阅读排行榜
1. conda update -n base -c defaults conda 更新失败(5553)
2. mac系统vscode的常用快捷键(2327)
3. Elasticsearch7.11 "reason" : "INDEX_CREATED" a copy of this shard is already allocated to this node(2268)
4. python3 pip install mysqlclient 安装报错(1698)
5. Anaconda环境设置Selenium的浏览器驱动程序(1185)
评论排行榜
1. 记录一次windows下navicate连接vmware下mysql数据库问题(1)
2. Elasticsearch7.11 "reason" : "INDEX_CREATED" a copy of this shard is already allocated to this node(1)
推荐排行榜
1. conda update -n base -c defaults conda 更新失败(1)
2. Elasticsearch7.11 "reason" : "INDEX_CREATED" a copy of this shard is already allocated to this node(1)
3. RabbitMQ阅读笔记-----理解Rabbit MQ的消息通信(1)
最新评论
1. Re:Elasticsearch7.11 "reason" : "INDEX_CREATED" a copy of this shard is already allocated to this node
谢谢博主的分享!!!
--Oizys
2. Re:记录一次windows下navicate连接vmware下mysql数据库问题
可以加1步,在检测linux防火墙之前,直接在 windows cmd 验证ip 端口能否访问(ping、telnet)
--韆
点击右上角即可分享