
Project Euler
lampeter123
这个作者很懒,什么都没留下…
展开
-
projecteuler.net第一题
[url]http://projecteuler.net/index.php?section=problems&id=1[/url]projecteuler.net第一题Add all the natural numbers below one thousand that are multiples of 3 or 5.求1000以下的能被3或5整除的整数之和....2009-07-08 08:20:13 · 128 阅读 · 0 评论 -
Project Euler 第21题
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 ar...2009-07-10 09:38:54 · 111 阅读 · 0 评论 -
Project Euler 第22题
Using names.txt (right click and 'Save Link/Target As...'), a 46K text file containing over five-thousand first names, begin by sorting it into alphabetical order. Then working out the alphabetical va...2009-07-10 09:48:49 · 127 阅读 · 0 评论 -
Project Euler 第23题
A perfect number is a number for which the sum of its proper divisors is exactly equal to the number. For example, the sum of the proper divisors of 28 would be 1 + 2 + 4 + 7 + 14 = 28, which means th...2009-07-10 09:51:20 · 128 阅读 · 0 评论 -
Project Euler 第24题
A permutation is an ordered arrangement of objects. For example, 3124 is one possible permutation of the digits 1, 2, 3 and 4. If all of the permutations are listed numerically or alphabetically, we c...2009-07-10 10:03:36 · 185 阅读 · 0 评论 -
Project Euler 第25题
The Fibonacci sequence is defined by the recurrence relation:Fn = Fn-1 + Fn-2, where F1 = 1 and F2 = 1.Hence the first 12 terms will be:F1 = 1 F2 = 1 F3 = 2 F4 = 3 The 12th ter...2009-07-10 10:58:30 · 135 阅读 · 0 评论 -
Project Euler 第26题
A unit fraction contains 1 in the numerator. The decimal representation of the unit fractions with denominators 2 to 10 are given:1/2 =0.5 1/3= 0.(3) 1/4=0.25 1/5=0.2 1/6=0.1(6) 1/7=0.(1...2009-07-10 11:01:28 · 187 阅读 · 0 评论 -
Project Euler 第27题
Euler published the remarkable quadratic formula:n² + n + 41It turns out that the formula will produce 40 primes for the consecutive values n = 0 to 39. However, when n = 40, 402 + 40 + 41 = 4...2009-07-10 11:03:29 · 160 阅读 · 0 评论 -
Project Euler 第28题
Starting with the number 1 and moving to the right in a clockwise direction a 5 by 5 spiral is formed as follows:[b]21[/b] 22 23 24 [b]25[/b] 20 [b]7[/b] 8 [b]9[/b] 10 19 6 [b]1...2009-07-10 11:06:05 · 172 阅读 · 0 评论 -
Project Euler 第29题
Consider all integer combinations of ab for 2 ≤ a ≤ 5 and 2 ≤ b ≤ 5:2^2=4, 2^3=8, 2^4=16, 2^5=32 3^2=9, 3^3=27, 3^4=81, 3^5=243 4^2=16, 4^3=64, 4^4=256, 4^5=1024 5^2=25, 5^3=125, 5^4=625,...2009-07-10 11:09:07 · 170 阅读 · 0 评论 -
Project Euler 第30题
Surprisingly there are only three numbers that can be written as the sum of fourth powers of their digits:1634 = 1^4 + 6^4 + 3^4 + 4^4 8208 = 8^4 + 2^4 + 0^4 + 8^4 9474 = 9^4 + 4^4 + 7^4 + 4^4...2009-07-10 11:19:19 · 203 阅读 · 0 评论 -
Project Euler 第31题
In England the currency is made up of pound, £, and pence, p, and there are eight coins in general circulation:1p, 2p, 5p, 10p, 20p, 50p, £1 (100p) and £2 (200p).It is possible to make £2 in the...2009-08-14 08:41:59 · 186 阅读 · 0 评论 -
Project Euler 第32题
We shall say that an n-digit number is pandigital if it makes use of all the digits 1 to n exactly once; for example, the 5-digit number, 15234, is 1 through 5 pandigitial.The product 7254 is unus...2009-08-14 08:51:55 · 162 阅读 · 0 评论 -
Project Euler 第33题:
The fraction 49/98 is a curious fraction, as an inexperienced mathematician in attempting to simplify it may incorrectly believe that 49/98 = 4/8, which is correct, is obtained by cancelling the 9s....2009-08-14 08:55:08 · 172 阅读 · 0 评论 -
Project Euler 第34题
阶乘的和145 is a curious number, as 1! + 4! + 5! = 1 + 24 + 120 = 145.Find the sum of all numbers which are equal to the sum of the factorial of their digits.Note: as 1! = 1 and 2! = 2 are not s...2009-08-14 08:59:00 · 138 阅读 · 0 评论 -
Project Euler 第35题:
The number, 197, is called a circular prime because all rotations of the digits: 197, 971, and 719, are themselves prime.There are thirteen such primes below 100: 2, 3, 5, 7, 11, 13, 17, 31, 37, 7...2009-08-14 09:01:49 · 241 阅读 · 0 评论 -
Project Euler 第36题
The decimal number, 585 = 1001001001 2 (binary), is palindromic in both bases.Find the sum of all numbers, less than one million, which are palindromic in base 10 and base 2.(Please note that ...2009-08-14 09:07:29 · 149 阅读 · 0 评论 -
Project Euler 第37题
The number 3797 has an interesting property. Being prime itself, it is possible to continuously remove digits from left to right, and remain prime at each stage: 3797, 797, 97, and 7. Similarly we can...2009-08-14 09:09:31 · 205 阅读 · 0 评论 -
Project Euler 第20题
n! means n x (n - 1) x ... x 3 x 2 x 1Find the sum of the digits in the number 100!100的阶乘数字求和2009-07-10 09:24:34 · 211 阅读 · 0 评论 -
Project Euler 第19题
You 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 and November.All the rest have thirty...2009-07-10 09:20:26 · 118 阅读 · 0 评论 -
projecteuler.net第二题
[url]http://projecteuler.net/index.php?section=problems&id=2[/url]projecteuler.net第二题Find the sum of all the even-valued terms in the Fibonacci sequence which do not exceed four million.求Fibon...2009-07-08 08:33:01 · 100 阅读 · 0 评论 -
projecteuler.net第三题
[url]http://projecteuler.net/index.php?section=problems&id=3[/url]projecteuler.net第三题The prime factors of 13195 are 5, 7, 13 and 29.What is the largest prime factor of the number 600851475143 ?...2009-07-08 08:37:05 · 79 阅读 · 0 评论 -
projecteuler.net第四题
[url]http://projecteuler.net/index.php?section=problems&id=4[/url]projecteuler.net第四题A palindromic number reads the same both ways. The largest palindrome made from the product of two 2-digit numb...2009-07-08 08:41:16 · 111 阅读 · 0 评论 -
Project Euler 第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 number that is evenly divisible by all of the numbers from 1 to 20?...2009-07-08 09:04:08 · 118 阅读 · 0 评论 -
Project Euler 第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 ...2009-07-08 09:06:26 · 177 阅读 · 0 评论 -
Project Euler 第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 10001st prime number?寻找第10001个素数(prime number)。2009-07-08 09:13:14 · 175 阅读 · 0 评论 -
Project Euler 第8题
Find the greatest product of five consecutive digits in the 1000-digit number.73167176531330624919225119674426574742355349194934969835203127745063262395783180169848018694788518438586156078911294...2009-07-08 09:17:43 · 182 阅读 · 0 评论 -
Project Euler 第9题
A Pythagorean triplet is a set of three natural numbers, a2009-07-08 09:21:01 · 102 阅读 · 0 评论 -
Project Euler 第10题
The sum of the primes below 10 is 2 + 3 + 5 + 7 = 17.Find the sum of all the primes below two million.求小于2000000的素数之和。2009-07-08 09:30:00 · 147 阅读 · 0 评论 -
Project Euler 第11题
In the 2020 grid below, four numbers along a diagonal line have been marked in red.08 02 22 97 38 15 00 40 00 75 04 05 07 78 52 12 50 77 91 0849 49 99 40 17 81 18 57 60 87 17 40 98 43 69 48 04 5...2009-07-08 09:43:06 · 165 阅读 · 0 评论 -
Project Euler 第12题
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...2009-07-08 09:47:17 · 209 阅读 · 0 评论 -
Project Euler 第13题
Work out the first ten digits of the sum of the following one-hundred 50-digit numbers.求100个50位数的和的前10位数。3710728753390210279879799822083759024651013574025046376937677490009712648124896970078...2009-07-08 11:59:05 · 203 阅读 · 0 评论 -
Project Euler 第14题
迭代序列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 ...2009-07-10 08:39:17 · 218 阅读 · 0 评论 -
Project Euler 第15题
Starting in the top left corner of a 22 grid, there are 6 routes (without backtracking) to the bottom right corner.[img]/upload/attachment/123697/12ff1299-c1f8-3d41-9448-37f5b2b86080.gif[/img]...2009-07-10 08:44:42 · 110 阅读 · 0 评论 -
Project Euler 第16题
2^15 = 32768 and the sum of its digits is 3 + 2 + 7 + 6 + 8 = 26.What is the sum of the digits of the number 2^1000?求2的1000次方各位数之和?2009-07-10 08:47:44 · 132 阅读 · 0 评论 -
Project Euler 第17题
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 ...2009-07-10 09:06:31 · 136 阅读 · 0 评论 -
Project Euler 第18题
By starting at the top of the triangle below and moving to adjacent numbers on the row below, the maximum total from top to bottom is 23. 3 7 5 2 4 6 8 5 9 3 That is, 3 + 7 + 4 + 9 = 23. Find the...2009-07-10 09:12:44 · 170 阅读 · 0 评论 -
Project Euler 第38题
Take the number 192 and multiply it by each of 1, 2, and 3:192 × 1 = 192 192 × 2 = 384 192 × 3 = 576By concatenating each product we get the 1 to 9 pandigital, 192384576. We will call 192384...2009-08-14 09:20:25 · 143 阅读 · 0 评论