自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(5)
  • 收藏
  • 关注

原创 miller_rabin素性测试

#include <iostream> #include <stdio.h> #include <stdlib.h> using namespace std; typedef long long LL; LL mul(LL a,LL b,LL mod) //一个LL*LL的黑科技 { LL tmp=(a*b-(LL)((long dou...

2018-06-04 17:26:53 183

原创 Meisell-Rabin米勒拉宾筛质数选法

#include <stdio.h> #include <stdlib.h> #include <string.h> #include <time.h> int prime(int n) { int i, j; int count = 0;/**16以内有10个合数**/ char* flag = (char*)malloc...

2018-06-04 17:24:45 196

原创 欧拉质数筛选法

#include <stdio.h> #include <stdlib.h> #include <time.h> #define PressEnter \ {\ fflush(stdin); /*fflush()清空输入缓冲区的函数*/\ printf("Press Enter...");\ getchar();\ fflush...

2018-06-04 17:21:05 753

原创 Eraosthenes质数数筛选法

#include <stdio.h> #include <stdlib.h> #include <time.h> int prime(int N,unsigned long long int* sum) { unsigned int i,j,k,count_p=0; if(N>100000000) i=17; el...

2018-06-04 17:12:14 259

原创 遍历模除质数筛选法

#include <stdio.h> #include <stdlib.h> #include <time.h> /** 算法逻辑解析:一个数a除以a前边所有的质数都除不尽,则a也为质数。 此例中,Prime[]数组存放已确认的质数,偶数跳过,直接确认奇数是否为质数。 易错点:核心逻辑是a于Prime[]数组中已存在的数都要判断,都除不尽a才是质数, 有一个除...

2018-06-04 17:08:42 312

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除