![](https://img-blog.csdnimg.cn/20201014180756919.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
欧拉项目
文章平均质量分 69
comkingfly
这个作者很懒,什么都没留下…
展开
-
Problem 6 自然数求差
The sum of the squares of the first ten natural numbers is,12 + 22 + ... + 102 = 385The square of the sum of the first ten natural numbers is,(1 + 2 + ... + 10)2 = 552 = 3025Hence the differ原创 2011-06-03 17:23:00 · 643 阅读 · 0 评论 -
欧拉项目 Problem 12 of What is the value of the first triangle number to have over five hundred divisors
The sequence of triangle numbers is generated by adding the natural numbers. So the 7th triangle number would be 1 + 2 + 3 + 4 + 5 + 6 + 7 = 28. The first ten terms would be:1, 3, 6, 10, 15, 21, 2原创 2012-03-21 10:57:30 · 851 阅读 · 0 评论 -
欧拉项目 Problem 25 of in the Fibonacci sequence to contain 1000 digits
The Fibonacci sequence is defined by the recurrence relation:Fn = Fn1 + Fn2, where F1 = 1 and F2 = 1.Hence the first 12 terms will be:F1 = 1F2 = 1F3 = 2F4 = 3F5 = 5F6 = 8F7 = 13原创 2012-03-22 10:43:20 · 1047 阅读 · 1 评论 -
欧拉项目 Problem 17 of how many letters would be used?
If the numbers 1 to 5 are written out in words: one, two, three, four, five, then there are 3 + 3 + 5 + 4 + 4 = 19 letters used in total.If all the numbers from 1 to 1000 (one thousand) inclusive we原创 2012-03-21 13:33:40 · 675 阅读 · 0 评论 -
Problem 19 of How many Sundays fell on the first of the month during the twentieth century
http://projecteuler.net/problem=19You are given the following information, but you may prefer to do some research for yourself.1 Jan 1900 was a Monday.Thirty days has September,April, June a原创 2012-03-20 12:47:55 · 1352 阅读 · 0 评论 -
Problem 21 of Evaluate the sum of all the amicable numbers under 10000.
Let d(n) be defined as the sum of proper divisors of n (numbers less than n which divide evenly into n).If d(a) = b and d(b) = a, where a b, then a and b are an amicable pair and each of a and b原创 2012-03-20 14:06:22 · 797 阅读 · 0 评论 -
Problem 3 of largest prime factor
The prime factors of 13195 are 5, 7, 13 and 29.What is the largest prime factor of the number 600851475143 ?http://projecteuler.net/problem=3public class PrimeNum { public static void原创 2012-03-15 13:27:24 · 490 阅读 · 0 评论 -
Problem 16 of 2的1000次方
215 = 32768 and the sum of its digits is 3 + 2 + 7 + 6 + 8 = 26.What is the sum of the digits of the number 21000?http://projecteuler.net/problem=16import java.math.BigInteger;public class S原创 2012-03-15 15:05:09 · 1437 阅读 · 0 评论 -
Problem 10 of Find the sum of all the primes below two million.
The sum of the primes below 10 is 2 + 3 + 5 + 7 = 17.Find the sum of all the primes below two million.public class BigPrime { public static void main(String args[]){ long j=0; for(long i=2;i<原创 2012-03-13 11:49:21 · 960 阅读 · 0 评论 -
Problem 7 of What is the 10 001st prime number?
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?public class BigPrime { public static void main(String args[]原创 2012-03-13 11:44:20 · 618 阅读 · 0 评论 -
Problem 9 of Pythagorean
A Pythagorean triplet is a set of three natural numbers, a b c, for which,a2 + b2 = c2For example, 32 + 42 = 9 + 16 = 25 = 52.There exists exactly one Pythagorean triplet for which a + b +原创 2012-03-12 10:19:56 · 484 阅读 · 0 评论 -
Problem 20 of 100!
n! means n (n 1) ... 3 2 1For example, 10! = 10 9 ... 3 2 1 = 3628800,and the sum of the digits in the number 10! is 3 + 6 + 2 + 8 + 8 + 0 + 0 = 27.Find the sum of the digits in the原创 2012-03-12 14:57:30 · 514 阅读 · 0 评论 -
Problem 8 of the greatest product
Find the greatest product of five consecutive digits in the 1000-digit number.73167176531330624919225119674426574742355349194934969835203127745063262395783180169848018694788518438586156078911294原创 2012-03-12 13:09:14 · 542 阅读 · 0 评论 -
Problem 1 of multiples
If we list all the natural numbers below 10 that are multiples of 3 or 5, we get 3, 5, 6 and 9. The sum of these multiples is 23.Find the sum of all the multiples of 3 or 5 below 1000.public class原创 2012-03-12 10:29:22 · 454 阅读 · 0 评论 -
Problem 2 of Fibonacci
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 considering t原创 2012-03-12 13:26:37 · 571 阅读 · 0 评论 -
About Project Euler 欧拉项目
http://projecteuler.netWhat is Project Euler?Project Euler is a series of challenging mathematical/computer programming problems that will require more than just mathematical insights to solve原创 2011-06-03 15:21:00 · 1423 阅读 · 0 评论 -
Problem 4 求回文数
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-digit num原创 2011-06-03 16:41:00 · 766 阅读 · 0 评论 -
Problem 14 of Collatz Problem
The following iterative sequence is defined for the set of positive integers:n n/2 (n is even)n 3n + 1 (n is odd)Using the rule above and starting with 13, we generate the following sequ原创 2012-03-20 10:33:05 · 722 阅读 · 0 评论