文件名称:1
-
所属分类:
- 标签属性:
- 上传时间:2012-11-16
-
文件大小:528byte
-
已下载:0次
-
提 供 者:
-
相关连接:无下载说明:别用迅雷下载,失败请重下,重下不扣分!
介绍说明--下载内容来自于网络,使用问题请自行百度
例:用筛选法求2~100之间的所有素数。
解:我们用下面的方法来解这题:先建立一个含有2~100之间所有自然数的数表,在数表中删去2的倍数(不包括2);然后找2后面第一个被保留的数p(是3),再删除p的倍数(不包括p);然后再找下一个被保留的数(是5),继续上述步骤:这样继续下去,直至P大于100为止。这样数表中剩下的数就是所要求的所有素数。这个求素数的方法称为爱拉托散(Eratosthenes)法。
-Example: Method 2 with the screening of all prime numbers between 100. Solution: We use the following method to solve this problem: first the establishment of a containing between 2 to 100 the number of all natural numbers table, delete table 2 in the number of multiples (not including 2) and then find the back of the first to be reserved 2 number p (a 3), then delete multiple of p (excluding p) and then find the next number to be reserved (was 5), continue the steps: continue to do so until the P is greater than 100 so far. So that the remaining number of tables is required for all prime numbers. This request is called Ai Latuo prime numbers scattered (Eratosthenes) method.
解:我们用下面的方法来解这题:先建立一个含有2~100之间所有自然数的数表,在数表中删去2的倍数(不包括2);然后找2后面第一个被保留的数p(是3),再删除p的倍数(不包括p);然后再找下一个被保留的数(是5),继续上述步骤:这样继续下去,直至P大于100为止。这样数表中剩下的数就是所要求的所有素数。这个求素数的方法称为爱拉托散(Eratosthenes)法。
-Example: Method 2 with the screening of all prime numbers between 100. Solution: We use the following method to solve this problem: first the establishment of a containing between 2 to 100 the number of all natural numbers table, delete table 2 in the number of multiples (not including 2) and then find the back of the first to be reserved 2 number p (a 3), then delete multiple of p (excluding p) and then find the next number to be reserved (was 5), continue the steps: continue to do so until the P is greater than 100 so far. So that the remaining number of tables is required for all prime numbers. This request is called Ai Latuo prime numbers scattered (Eratosthenes) method.
(系统自动生成,下载前可以参看下载内容)
下载文件列表
1.cpp
本网站为编程资源及源代码搜集、介绍的搜索网站,版权归原作者所有! 粤ICP备11031372号
1999-2046 搜珍网 All Rights Reserved.