码迷,mamicode.com
首页 >  
搜索关键字:prime    ( 2475个结果
Power of Cryptography
DescriptionCurrent work in cryptography involves (among other things) large prime numbers and computing powers of numbers among these primes. Work in ...
分类:其他好文   时间:2015-03-04 14:19:10    阅读次数:135
小规模素数表的构造方法及相关
一、判断素数 可以写一个判断素数的谓词函数,即从2开始枚举到sqrt(x)(包括)。但这里参数x不能过大,过大就会因为i*i乘积过大溢出。 Code: {CSDN:CODE:609701} 后面的内容都是基于这个函数。 二、构造素数表 //构造素数表 int cnt=0; int prime[n+1]; for(int i=2;i<=n;++i) if(is_prime(i...
分类:其他好文   时间:2015-03-01 11:55:56    阅读次数:144
1015. Reversible Primes
A reversible prime in any number system is a prime whose "reverse" in that number system is also a prime. For example in the decimal system 73 is a reversible prime because its reverse 37 is also a pr...
分类:其他好文   时间:2015-02-28 21:46:29    阅读次数:187
抓其根本(hdu2710 Max Factor 素数 最大公约数 最小公倍数.....)
素数判断:一、根据素数定义,该数除了1和它本身以外不再有其他的因数。详见代码。1 int prime()2 {3 for (int i=2; i*i 2 #include 3 #include 4 5 using namespace std; 6 7 int hash[20050];...
分类:其他好文   时间:2015-02-28 18:08:32    阅读次数:206
A1059. Prime Factors (25)
Given any positive integer N, you are supposed to find all of its prime factors, and write them in the format N = p1^k1* p2^k2*…*pm^km.Input Specifica...
分类:其他好文   时间:2015-02-27 16:57:44    阅读次数:165
poj2773 Happy 2006
Happy 2006 Time Limit: 3000MS   Memory Limit: 65536K Total Submissions: 9987   Accepted: 3434 Description Two positive integers are said to be relatively prime to each ...
分类:移动开发   时间:2015-02-26 09:59:22    阅读次数:145
1015. Reversible Primes (20)
A reversible prime in any number system is a prime whose "reverse" in that number system is also a prime. For example in the decimal system 73 is a reversible prime because its reverse 37 is also a pr...
分类:其他好文   时间:2015-02-25 21:10:58    阅读次数:151
C++中using的作用
[转自]http://www.cnblogs.com/yuaqua/archive/2011/10/22/2219991.html1.在当前文件中引入命名空间这是我们最熟悉的用法,例如:using namespace std;2.在子类中使用 using 声明引入基类成员名称(参见C++ prime...
分类:编程语言   时间:2015-02-25 11:36:17    阅读次数:130
hdu 2682 Tree 最小生成树~~~~水题一枚,,用到了筛法求素数,我竟然在格式上面PE了两次!!
Problem Description There are N (2<=N<=600) cities,each has a value of happiness,we consider two cities A and B whose value of happiness are VA and VB,if VA is a prime number,or VB is a prime number or (VA+VB) is a prime number,then they can be connected.W...
分类:其他好文   时间:2015-02-25 09:10:52    阅读次数:288
(hdu step 4.3.2)Prime Ring Problem(n个数成环,输出两两之和为质数的所有情况)
题目:Prime Ring ProblemTime Limit: 4000/2000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 467 Accepted Submission(s): 297 Problem DescriptionA ring is compose of n circ...
分类:其他好文   时间:2015-02-24 17:31:54    阅读次数:224
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!