码迷,mamicode.com
首页 >  
搜索关键字:欧拉项目    ( 16个结果
欧拉项目代码(1--7)
第七题求第10001个质数(用这个代码,我的笔记本大概算了40s):count=1num=3def findPrime(s): i=2 a=s while i<s/2: if s%i == 0: s=s/i break ...
分类:其他好文   时间:2014-09-13 22:45:16    阅读次数:229
欧拉项目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
欧拉项目010:2000000以内的素数和
Summation of primes Problem 10 The sum of the primes below 10 is 2 + 3 + 5 + 7 = 17. Find the sum of all the primes below two million. 还是使用Sieve of Eratosthenes 算法 我的python代码如下: ...
分类:其他好文   时间:2014-05-26 03:40:15    阅读次数:243
006:欧拉项目平方和与和的平方的差
Sum square difference Problem 6 The sum of the squares of the first ten natural numbers is, 12 + 22 + ... + 102 = 385 The square of the sum of the first ten natural numbers is, (1 + 2 + ....
分类:其他好文   时间:2014-05-23 02:22:57    阅读次数:193
欧拉项目005:最小公倍数
Smallest multiple Problem 5 2520 is the smallest number that can be divided by each of the numbers from 1 to 10 without any remainder. What is the smallest positive number that is evenly di...
分类:其他好文   时间:2014-05-23 01:51:13    阅读次数:261
欧拉项目004:寻找最大的回文数
Problem 4: Largest palindrome product A palindromic number reads the same both ways. The largest palindrome made from the product of two 2-digit numbers is 9009 = 91 × 99. Find the largest pal...
分类:其他好文   时间:2014-05-22 18:48:46    阅读次数:355
16条   上一页 1 2
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!