文件名称:1
介绍说明--下载内容均来自于网络,请自行研究使用
例:用筛选法求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