2011年2月14日

求素数

摘要: 问题描述:By listing the first six prime numbers: 2, 3, 5, 7, 11, and 13, we can see that the 6 th prime is 13.What is the 10001 st prime number?问题分析:如果要大量求素数的话,比较快速的方法是“筛法( sieve )”。 其速度很快,但其需要知道上限,这个题目没有给,猜吧,我猜110000(实际上,110000下面有10453个素数)。筛法求素数可以如下描述(抄自维基百科):Eratosthenes' metho 阅读全文

posted @ 2011-02-14 09:25 ぬ儱←OWEN★ 阅读(299) 评论(1) 推荐(0) 编辑

导航