码迷,mamicode.com
首页 >  
搜索关键字:bear and prime numbe    ( 2904个结果
素数筛
这是我目前知道的打素数表最快的方法了………… 差不多是O(n)的,100000以内花了0.005秒。 1 int prime[100005], np, vis[100005]; 2 3 void get_prime(int n){ 4 mset(prime); mset(vis); 5 ...
分类:其他好文   时间:2014-05-30 23:26:36    阅读次数:204
poj2196
Specialized Four-Digit NumbersTime Limit: 1000MSMemory Limit: 65536KTotal Submissions: 7238Accepted: 5285DescriptionFind and list all four-digit numbe...
分类:其他好文   时间:2014-05-26 19:18:49    阅读次数:250
欧拉项目007:第10001个素数
10001st prime Problem 7 By listing the first six prime numbers: 2, 3, 5, 7, 11, and 13, we can see that the 6th prime is 13. What is the 10 001st prime number? 使用埃拉托斯特尼筛法,不懂得自行Wiki 我的py...
分类:其他好文   时间:2014-05-26 05:35:25    阅读次数:248
hdu2136Largest prime factor (关建在求素数,有点意思的题)
Problem Description Everybody knows any number can be combined by the prime number. Now, your task is telling me what position of the largest prime factor. The position of prime 2 is 1, prime 3 is ...
分类:其他好文   时间:2014-05-26 04:29:14    阅读次数:371
uva10780Again Prime? No Time.
质因数分解。 1 //Accepted 0 KB 12 ms 2 #include 3 #include 4 #include 5 const int MAXN = 100005; 6 const int inf = 100000000; 7 int pri[MAXN]; 8 in...
分类:其他好文   时间:2014-05-25 23:10:33    阅读次数:283
Prime Ring Problem
Prime Ring ProblemTime Limit : 4000/2000ms (Java/Other)Memory Limit : 65536/32768K (Java/Other)Total Submission(s) : 27Accepted Submission(s) : 10Font...
分类:其他好文   时间:2014-05-25 19:47:04    阅读次数:228
Oracle DETERMINISTIC函数、PARALLEL_ENABLE函数、PIPELINED函数、RESULT_CACHE函数
1、DETERMINISTIC函数-- Create deterministic PV function.CREATE OR REPLACE FUNCTION pv( future_value NUMBER, periods NUMBER, interest NUMBER )RETURN NUMBE...
分类:数据库   时间:2014-05-25 15:30:11    阅读次数:625
2014辽宁ACM省赛 Prime Factors
问题 L: Prime Factors 时间限制: 1 Sec  内存限制: 128 MB 提交: 36  解决: 28 [提交][状态][论坛] 题目描述 I'll give you a number , please tell me how many different prime factors in this number. 输入 There is multiple te...
分类:其他好文   时间:2014-05-24 20:52:54    阅读次数:311
poj2739
Sum of Consecutive Prime NumbersTime Limit: 1000MSMemory Limit: 65536KTotal Submissions: 18427Accepted: 10122DescriptionSome positive integers can be....
分类:其他好文   时间:2014-05-24 10:32:00    阅读次数:266
ProjectEuler 003题
1 //题目:The prime factors of 13195 are 5, 7, 13 and 29.2 //What is the largest prime factor of the number 600851475143 ? 1 #include 2 using namespace s...
分类:其他好文   时间:2014-05-24 10:01:21    阅读次数:222
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!