这是我目前知道的打素数表最快的方法了…………
差不多是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
Specialized Four-Digit NumbersTime Limit:
1000MSMemory Limit: 65536KTotal Submissions: 7238Accepted: 5285DescriptionFind
and list all four-digit numbe...
分类:
其他好文 时间:
2014-05-26 19:18:49
阅读次数:
250
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
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
质因数分解。 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 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
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
问题 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
Sum of Consecutive Prime NumbersTime Limit:
1000MSMemory Limit: 65536KTotal Submissions: 18427Accepted: 10122DescriptionSome
positive integers can be....
分类:
其他好文 时间:
2014-05-24 10:32:00
阅读次数:
266
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