![](https://img-blog.csdnimg.cn/20201014180756913.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
projecteuler
chenyong78
这个作者很懒,什么都没留下…
展开
-
Problem 17
Problem 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)原创 2012-01-21 20:24:52 · 250 阅读 · 0 评论 -
Problem 16
Problem 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? Code #include #include using namespace std; const unsigned i原创 2012-01-21 20:23:39 · 239 阅读 · 0 评论 -
Problem 15
Problem Starting in the top left corner of a 22 grid, there are 6 routes (without backtracking) to the bottom right corner. How many routes are there through a 2020 grid? 这道题犯懒了,用WIN7计算器原创 2012-01-21 20:20:46 · 207 阅读 · 0 评论 -
Problem 14
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 followi原创 2012-01-21 20:17:31 · 263 阅读 · 0 评论 -
Problem 13
Problem Work out the first ten digits of the sum of the following one-hundred 50-digit numbers. 37107287533902102798797998220837590246510135740250 46376937677490009712648124896970078050417018260原创 2012-01-21 20:16:16 · 294 阅读 · 0 评论 -
Problem 12
Problem 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,原创 2012-01-21 20:14:01 · 194 阅读 · 0 评论 -
Problem 11
Problem 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 08 49 49 99 40 17 81 18 57 60 87 17 40 98 43原创 2012-01-21 20:12:50 · 305 阅读 · 0 评论 -
Problem 10
Problem The sum of the primes below 10 is 2 + 3 + 5 + 7 = 17. Find the sum of all the primes below two million. Code #include #include using namespace std; bool isPrime(int n) { if(n < 2)原创 2012-01-21 20:11:31 · 198 阅读 · 0 评论 -
Problem 9
Problem 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 w原创 2012-01-21 20:10:00 · 292 阅读 · 0 评论 -
Problem 8
Problem Find the greatest product of five consecutive digits in the 1000-digit number. 73167176531330624919225119674426574742355349194934 96983520312774506326239578318016984801869478851843 85861原创 2012-01-21 20:08:47 · 233 阅读 · 0 评论 -
Problem 7
Problem 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? Code #include using namespace std; bool is原创 2012-01-21 20:07:11 · 273 阅读 · 0 评论 -
Problem 6
Problem 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 t原创 2012-01-21 19:55:34 · 204 阅读 · 0 评论 -
Problem 5
Problem 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 divisible by all of the n原创 2012-01-21 19:54:28 · 377 阅读 · 0 评论 -
Problem 4
Problem 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原创 2012-01-21 19:50:45 · 205 阅读 · 0 评论 -
Problem 3
problem The prime factors of 13195 are 5, 7, 13 and 29. What is the largest prime factor of the number 600851475143 ? Code #include #include using namespace std; static vector factorsList; b原创 2012-01-21 19:49:05 · 182 阅读 · 0 评论 -
Problem 2
Problem 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 cons原创 2012-01-21 19:46:34 · 218 阅读 · 0 评论 -
problem 1
Problem 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.原创 2012-01-21 19:44:24 · 266 阅读 · 0 评论 -
Problem 18 & 67
Problem 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 4 2 4 6 8 5 9 3 That is, 3 + 7 + 4 + 9 =原创 2012-01-21 20:28:04 · 341 阅读 · 0 评论