python
gzqdcj2009
这个作者很懒,什么都没留下…
展开
-
project欧拉第一题
http://projecteuler.net/index.php?section=problems&id=1 projecteuler.net第一题 Add all the natural numbers below one thousand that are multiples of 3 or 5. 求1000以下的能被3或5整除的整数之和. 答案:233168 pytho...原创 2010-01-05 18:18:34 · 79 阅读 · 0 评论 -
project欧拉第二题
http://projecteuler.net/index.php?section=problems&id=2 projecteuler.net第二题 Find the sum of all the even-valued terms in the Fibonacci sequence which do not exceed four million. 求Fibonacc...原创 2010-01-05 18:23:38 · 68 阅读 · 0 评论 -
project欧拉第三题
http://projecteuler.net/index.php?section=problems&id=3 projecteuler.net第三题 The prime factors of 13195 are 5, 7, 13 and 29. What is the largest prime factor of the number 600851475143 ? ...原创 2010-01-05 18:24:49 · 78 阅读 · 0 评论 -
project欧拉第四题
http://projecteuler.net/index.php?section=problems&id=4 projecteuler.net第四题 A palindromic number reads the same both ways. The largest palindrome made from the product of two 2-digit number...原创 2010-01-06 09:41:34 · 80 阅读 · 0 评论 -
project欧拉第五题
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 number that is evenly divisible by all of the numbers from 1 to 20? ...原创 2010-01-06 10:08:26 · 71 阅读 · 0 评论 -
project欧拉第六题
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 + ... + 10)2 = 552 = 3025 Hence the ...原创 2010-01-06 14:52:07 · 83 阅读 · 0 评论 -
project欧拉第七题
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 10001st prime number? 寻找第10001个素数(prime number)。原创 2010-01-06 16:10:32 · 67 阅读 · 0 评论 -
python求素数
10000以内的素数: [x for x in range(2,10000) if not [i for i in range(2,x) if x % i == 0 ] ] reduce( lambda s, x: s+ ([x] if all([x %i for i in s]) else []), ...原创 2010-01-08 09:52:13 · 127 阅读 · 0 评论