![](https://img-blog.csdnimg.cn/20201014180756923.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
projectEuler
文章平均质量分 57
shangzhihaohao
这个作者很懒,什么都没留下…
展开
-
project Euler第三题
题目: The prime factors of 13195 are 5, 7, 13 and 29. What is the largest prime factor of the number 600851475143 ? 算法: #!/usr/bin/env python #coding=utf-8 a = 600851475143 b = 0L i = 3L whil原创 2011-11-05 21:12:39 · 585 阅读 · 0 评论 -
project Euler第十题
题目: The sum of the primes below 10 is 2 + 3 + 5 + 7 = 17. Find the sum of all the primes below two million. 算法: #!/usr/bin/env python #coding=utf-8 sum = 2 def is_prime(num): i = 2原创 2011-11-07 20:35:42 · 767 阅读 · 0 评论 -
project Euler第八题
题目: Find the greatest product of five consecutive digits in the 1000-digit number. 73167176531330624919225119674426574742355349194934 96983520312774506326239578318016984801869478851843 858615607原创 2011-11-07 14:49:40 · 937 阅读 · 0 评论 -
project Euler第六题
题目: 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 d原创 2011-11-06 16:07:19 · 455 阅读 · 0 评论 -
project Euler第五题
题目: 2520is the smallest number that can be divided by each of the numbersfrom 1 to 10 without any remainder. What is the smallest positive number that is evenly divisible by all of the number原创 2011-11-06 15:50:52 · 627 阅读 · 0 评论 -
project Euler第四题
题目: 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 palindrome made from the product of two 3-d原创 2011-11-06 12:47:31 · 653 阅读 · 0 评论 -
project Euler第七题
上大学的时候买了个手机,上边的游戏都是java做的,所以在还不知道什么是java的时候就想学习java了,但是现在都研一了,还没有怎么学习过java,书倒是看了不少,编程思想都看两边了,可是从没用java做过程序,先是用php做网站,再是用python做网站,以后就用java做project Euler了,聊以慰藉吧。 题目: By listing the first six pr原创 2011-11-07 10:51:26 · 782 阅读 · 0 评论 -
Project Euler第二题
题目: Each new term in the Fibonacci sequence is generated by adding the previous two terms. By starting with 1 and 2, the first 10 terms will be: 1, 2, 3, 5, 8, 13, 21, 34, 55, 89, ... By consider原创 2011-10-31 11:41:22 · 896 阅读 · 0 评论 -
project Euler第八题--java版
好久没用过java了,该忘的全忘了,不该忘的也顺带着给忘了,基本上是看着api写代码的。 关于算法就不再多说了,参考project Euler第八题,这个是按照下边说的算法实现的。 package ten; import java.util.Queue; import java.util.LinkedList; public class Problem8 { publi原创 2011-11-07 16:15:10 · 842 阅读 · 0 评论 -
project euler第一题
今天在网上刚看到的这个网站,很感兴趣,想一直做下去,尽量把里边的题都做了。 第一道题是用python做的,刚学python,里边的好多东西还不是太清楚,也是第一次做这个题,可能如不了大神的法眼,我会一直努力的。 题目: If we list all the natural numbers below 10 that are multiples of 3 or 5, we get原创 2011-10-30 22:53:37 · 771 阅读 · 0 评论 -
project Euler第九题
题目: A Pythagorean triplet is a set of three natural numbers, a b c, for which, a2 + b2 = c2 For example, 32 + 42 = 9 + 16 = 25 = 52. There exists exactly one Pythagorean triplet for wh原创 2011-11-08 09:52:47 · 671 阅读 · 0 评论