登录
首页 » Windows开发 » 这是关于erasthosthenes代码

这是关于erasthosthenes代码

于 2023-06-16 发布 文件大小:16.36 kB
0 172
下载积分: 2 下载次数: 1

代码说明:

应用背景 ;  Eratosthenes筛;是一个简单的算法,发现了一个给定的整数的素数。实现该算法,用唯一的优化,外环可以停止在平方根的限制,和内循环可以开始在方的总理刚刚发现。这尤其意味着你不应该使用预计算 优化;车轮,即不要以为你只需要跨出奇数(2基础轮),数等于1或5模6(2和3为基础的轮),或基于低素数相似的车轮。关键技术如果你喜欢编程难题和挑战,你会注意到他们中的很多人都是以一种或另一种方式来进行的。因此,有一个大的表的素数准备好了。一个简单而有效的方法来生成一个列表的素数如果Eratosthenes筛 ;(链接到维基百科)。这是基本的想法:创建一个所有正整数的列表(从2开始,1个不被认为是素数)。开始在第一个有效的数字(在这个点上是有效的),并消除所有的倍数从列表中。因此,从2开始,消除4,6,8,10,12等。一旦所有的倍数被淘汰到下一个有效的数字(没有被淘汰的一个)和重复的过程,直到有没有更多的有效数字提前到。

下载说明:请别用迅雷下载,失败请重下,重下不扣分!

发表评论

0 个回复

  • 易语言写的网络验证,可以用于软件注册.不过封包部分没有加密....
    易语言写的网络验证,可以用于软件注册.不过封包部分没有加密.-Easy language network authentication, can be used for software registration. But part of the packet is not encrypted.
    2023-08-01 08:20:02下载
    积分:1
  • USB监控源码
    usb监听源码,需要安装DDK环境中运行-usb monitor source
    2023-03-23 15:10:03下载
    积分:1
  • process scheduling process management when one of the main contents, design, dev...
    进程调度时进程管理的主要内容之一,通过设计,编制,调试一个简单的进程调度模拟系统,对进程调度,进程运行状态变换加深理解和掌握。模拟计算机操作系统的进程调度,建立进程控制块PCB,要包含有关进程的描述信息,控制信息以及资源信息.模拟系统根据PCB感知进程的存在和通过PCB中所包含的各项变量的变化,掌握进程所处的状态以达到控制进程活动的目的.要实现进程的状态及其转换,进程的创建与撤消,进程的阻塞与唤醒.用P,V原语操作实现进程互斥.-process scheduling process management when one of the main contents, design, develop and debug a simple process of scheduling simulation systems, the process of scheduling, process running Transform deepen understanding and mastering. Computer simulation of the process of scheduling the operating system, create a process control block PCB, to include a description of the process of information, control of information and information resources. PCB simulation system based on perception of the existence and the process by which PCB contained in the variable changes and acquire where the process to achieve control system process activities. to achieve the process of the state and its conversion, the process of setting up and removed, and obstruction of the process of awakenin
    2023-07-11 23:55:02下载
    积分:1
  • C语言的源代码,是学习用的,适合初学者,包括了各类小程序...
    C语言的源代码,是学习用的,适合初学者,包括了各类小程序-C language source code, is learning to use, suitable for beginners, including a variety of small programs
    2022-02-28 09:28:02下载
    积分:1
  • 一个用VC++的时钟
    一个用VC++开发的时钟-a VC development of the clock
    2023-07-29 10:35:04下载
    积分:1
  • 高清晰度数字电视标准的码流分析仪
    概念:传输流由固定长度的数据包。可以有更多的大小,但在标准1是188个字节。一个包可以包含来自节目流的信息,可以是一个空包,一个节目关联表或有条件访问表。该PID是场决定该分组。主要是,从节目流的TS数据包传输的数据以固定的比特率必须大于的节目流的比特率的总和。例如,如果一个标准的MPEG-2进行编码以每秒几Mbits的,传输流通常具有更大的比特率值。程序:TS_Analyzer读取来自输入流的每个分组,并分析它。您可以查看数据包,领域的图形显示,或使用“写入到文件”选项,列出具体的报文信息或统计信息。我知道,一个传输流也不是那么容易找到的MPEG-2文件,所以我已经包括在上面的下载部分的样本。如果你会玩这个样品与媒体播放器,你会听到有关声音的1秒,如果你有合适的编解码器,你还可以看到图像。这是一个更大的传输流(约40万包)的一小部分(4000包),但可以给你关于这个概念的想法。其他玩家可以使用的DVD2AVI。如果您想尝试真正的传输流,从这里下载mp2tsmpdex.exe。这是一个传输流演示制作,这将使你可以通过我的程序进行分析,一个10秒的传输流。要使用该程序,只需阅读自述文件包括在内。
    2022-05-07 17:08:00下载
    积分:1
  • 简单的API函数CreateToolhelp32Snapshot ShellExecute PostMessage 用法 VS2005 C...
    简单的API函数CreateToolhelp32Snapshot ShellExecute PostMessage 用法 VS2005 C-CreateToolhelp32Snapshot ShellExecute PostMessage about some API method in VS2005 C++
    2022-04-23 10:18:33下载
    积分:1
  • 747用777 1.1固件外部调用主题和解码文件改制包 7月7日第二版使用说明 一、本固件第一版外调主体资源和解码器的基础上,又外调出字体和游戏
    747用777 1.1固件外部调用主题和解码文件改制包 7月7日第二版使用说明 一、本固件第一版外调主体资源和解码器的基础上,又外调出字体和游戏改制而成。 1、将主题资源、解码文件、字体文件和游戏文件改为自vx747的U盘调用。 ,方便朋友们随时更换主题和字体,游戏移出固件主要是减小固件体积(hxf文件仅13MB)方便刷机。 2、字体预置了雅黑小字体和细园大字体。 3、电子书工具条改-747 by 777 1.1 firmware external file called theme and decoding restructuring package July 7 use the second edition of one, the firmware the first edition of the main external resources and the basis of the decoder and the redeployment of a font and the game transformed from . 1, will be the subject of resources, decoder files, font files and game files changed since the U disk vx747 call. To facilitate the replacement of the theme of friends at any time and fonts, games out of the firmware is mainly to reduce the size of the firmware (hxf document is 13MB) Brush convenience. 2, the preset fonts ya black and fine small print large print park. 3, e-books to Toolbar
    2023-07-18 08:10:03下载
    积分:1
  • 单一导线平差程序,计算角度闭合差和各项限差
    单一导线平差程序,计算角度闭合差和各项限差-Single-wire adjustment procedure to calculate the angle deviation and closure of the allowable error
    2022-02-24 16:56:01下载
    积分:1
  • 嵌入式系统的文件操作源码。实现在嵌入式系统下的TXT文件的各种操作...
    嵌入式系统的文件操作源码。实现在嵌入式系统下的TXT文件的各种操作-Embedded operating system source document. Embedded systems in achieving the TXT documents the various operational
    2023-08-21 16:10:03下载
    积分:1
  • 696516资源总数
  • 106658会员总数
  • 16今日下载