Toggle navigation
Sunday Blog
All Posts
go
kubernetes
linux
python
ARCHIVE
DOCS
ABOUT
Sunday Blog
人生是一场刻意练习
Python 判断素数
Prime Number
求n以内的素数 常规取模优化 只测试 >2 的奇数,因为大于2的质数只可能是奇数 奇数只和一个奇数取模,因为奇数不能被合数整除 找到开方点 [3,int(x**0.5)+1] import datetime start = datetime.datetime.now() n=100000 count=1
Posted by BlueFat on Monday, August 1, 2022
开心的蓝胖
QUICK LINKS
Pxhere
unsplash
FEATURED TAGS
ansible
bash
calico
containerd
docker
firewalld
flannel
grpc
https
iptables
keepalived
kernel
kubernetes
linux
lvs
mysql
network
nginx
prometheus
python
rabbitmq
rocketmq
shell
sort
ssh
tcp
tcpdump
ubuntu
ufw
性能
排序
正则表达式
算法
递归
闭包
FRIENDS
Sunday Docs
Ansible Wiki
K8S训练营
Kubernetes 实践指南