Sieve of Eratosthenes
来源:互联网 发布:办公软件基础视频教程 编辑:程序博客网 时间:2024/06/05 16:46
#include <stdio.h>#include <math.h>#include <time.h>#define LIMIT100char primes[LIMIT + 1];int main(){int i, j;for (i = 1; i <= LIMIT; i++)primes[i] = 1;for (i = 2; i <= sqrt(LIMIT); i++) {if (primes[i]) {for (j = 2; j * i <= LIMIT; j++)primes[j * i] = 0;}}for (i = 2; i <= LIMIT; i++)if (primes[i])printf("%d\n", i);return 0;}
- Sieve of Eratosthenes[ZT]
- The Sieve of Eratosthenes
- Sieve of Eratosthenes
- sieve of Eratosthenes 找质素
- the Sieve of Eratosthenes
- 09 Sieve of Eratosthenes
- Sieve of Eratosthenes
- Sieve of Eratosthenes求质数
- Sieve of Eratosthenes算法实现
- 素数筛法【Sieve Of Eratosthenes + Sieve Of Euler】
- Sieve Of Eratosthenes求素数(埃拉托斯特尼筛法)
- Sieve of Eratosthenes Algorithm算法 JAVA实现
- Sieve of Eratosthenes(埃拉托斯尼斯筛法)
- 找质数算法(Sieve of Eratosthenes筛法)
- 生成质数的好方法:sieve of eratosthenes
- sieve of Eratosthenes——一种寻找素数的方法
- 找质数算法(Sieve of Eratosthenes筛法)
- 高效寻找质数——Sieve of Eratosthenes
- 程序员面试100题之十四:强大的和谐
- zencart常用的插件有哪些–整理与介绍
- 用Latex写IEEE论文
- ubuntu C++ preprocessor "/lib/cpp" fails sanity check
- Objective-c语法速成
- Sieve of Eratosthenes
- CVSNT和Eclipse配置
- Surciata源码分析之IpsNFQ模式(2)
- sql日期格式化
- sideboxes里的模块随意插入到网页任意位置方法
- 日记-5月18日-痛苦与快乐
- dangerous fork !
- 计算机学生的未来
- zen cart忘记密码怎么办