![](https://img-blog.csdnimg.cn/20201014180756738.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
算法练习
文章平均质量分 61
csdn_user_gsz
程序猿,外包,工程师,数据仓库,应用开发等等等等
展开
-
Longest Collatz sequence
https://projecteuler.net/problem=14The 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 startin原创 2016-03-03 22:43:33 · 473 阅读 · 0 评论 -
Number spiral diagonals
https://projecteuler.net/problem=28Number spiral diagonalsProblem 28Starting with the number 1 and moving to the right in a clockwise direction a 5 by 5 spiral is formed as follows:21原创 2016-04-02 17:42:16 · 346 阅读 · 0 评论 -
https://projecteuler.net/problem=9
Special Pythagorean tripletProblem 9A 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 exact原创 2016-02-25 14:26:24 · 285 阅读 · 0 评论 -
https://projecteuler.net/problem=10
Summation of primesProblem 10The sum of the primes below 10 is 2 + 3 + 5 + 7 = 17.Find the sum of all the primes below two million.此题就是考察素筛法,如果一个一个算,没太大必要primelist = [True]原创 2016-02-25 14:36:41 · 280 阅读 · 0 评论 -
Non-abundant sums
https://projecteuler.net/problem=23Non-abundant sumsProblem 23A perfect number is a number for which the sum of its proper divisors is exactly equal to the number. For example, the sum o原创 2016-03-22 13:05:17 · 328 阅读 · 0 评论 -
Lexicographic permutations
https://projecteuler.net/problem=24Lexicographic permutationsProblem 24Published on Friday, 16th August 2002, 06:00 pm; Solved by 75662; Difficulty rating: 5%A permutation is an ordered原创 2016-03-22 13:44:58 · 644 阅读 · 0 评论 -
https://projecteuler.net/problem=11
In the 20×20 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 56原创 2016-02-28 21:52:55 · 252 阅读 · 0 评论 -
https://projecteuler.net/problem=12
Highly divisible triangular numberProblem 12The 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. T原创 2016-03-01 10:26:43 · 300 阅读 · 0 评论 -
Distinct powers
https://projecteuler.net/problem=29Distinct powersProblem 29Consider all integer combinations of ab for 2 ≤ a ≤ 5 and 2 ≤ b ≤ 5:22=4, 23=8, 24=16, 25=3232=9, 33=27, 34=81, 35=243原创 2016-04-10 10:56:52 · 474 阅读 · 0 评论 -
Digit fifth powers
https://projecteuler.net/problem=30Digit fifth powersProblem 30Surprisingly there are only three numbers that can be written as the sum of fourth powers of their digits:1634 = 14 + 64原创 2016-04-10 11:11:11 · 306 阅读 · 0 评论 -
Coin sums
https://projecteuler.net/problem=31Coin sumsProblem 31In England the currency is made up of pound, £, and pence, p, and there are eight coins in general circulation:1p, 2p, 5p, 10p, 20原创 2016-04-10 17:17:03 · 399 阅读 · 0 评论 -
Circular primes
https://projecteuler.net/problem=35Circular primesProblem 35The number, 197, is called a circular prime because all rotations of the digits: 197, 971, and 719, are themselves prime.The原创 2016-04-27 22:14:11 · 421 阅读 · 1 评论 -
https://projecteuler.net/problem=8
Largest product in a seriesProblem 8The four adjacent digits in the 1000-digit number that have the greatest product are 9 × 9 × 8 × 9 = 5832.7316717653133062491922511967442657474235534919原创 2016-02-24 20:57:36 · 324 阅读 · 0 评论 -
https://projecteuler.net/problem=7
10001st primeProblem 7Published on Friday, 28th December 2001, 06:00 pm; Solved by 257306; Difficulty rating: 5%By listing the first six prime numbers: 2, 3, 5, 7, 11, and 13, we can see原创 2016-02-24 20:33:28 · 240 阅读 · 0 评论 -
Quadratic primes
https://projecteuler.net/problem=27Quadratic primesProblem 27Euler discovered the remarkable quadratic formula:n² + n + 41It turns out that the formula will produce 40 primes for原创 2016-04-01 22:28:39 · 412 阅读 · 0 评论 -
Lattice paths
Lattice pathsProblem 15Starting in the top left corner of a 2×2 grid, and only being able to move to the right and down, there are exactly 6 routes to the bottom right corner.How many such原创 2016-03-04 09:01:24 · 399 阅读 · 0 评论 -
Maximum path sum I
https://projecteuler.net/problem=18Maximum path sum IProblem 18By starting at the top of the triangle below and moving to adjacent numbers on the row below, the maximum total from top to原创 2016-03-04 15:29:42 · 197 阅读 · 0 评论 -
https://projecteuler.net/problem=2
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 the原创 2016-02-14 15:15:54 · 262 阅读 · 0 评论 -
Counting Sundays
https://projecteuler.net/problem=19Counting SundaysProblem 19You are given the following information, but you may prefer to do some research for yourself.1 Jan 1900 was a Mon原创 2016-03-05 16:28:05 · 337 阅读 · 0 评论 -
Amicable numbers
https://projecteuler.net/problem=21Amicable numbersProblem 21Let 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原创 2016-03-05 19:03:24 · 478 阅读 · 1 评论 -
Reciprocal cycles
https://projecteuler.net/problem=26Reciprocal cyclesProblem 26A unit fraction contains 1 in the numerator. The decimal representation of the unit fractions with denominators 2 to 10 are原创 2016-03-30 14:35:04 · 551 阅读 · 0 评论 -
https://projecteuler.net/problem=3
Largest prime factorProblem 3The prime factors of 13195 are 5, 7, 13 and 29.What is the largest prime factor of the number 600851475143 ?当时考虑最大质因子,只要拿这个数自最小的质数开始除,除到最后,剩下的就是最大的质因子了,结果写出来原创 2016-02-23 09:10:22 · 245 阅读 · 0 评论 -
https://projecteuler.net/problem=5
欧拉问题集,第五题,最小公倍数Smallest multipleProblem 52520 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 num原创 2016-02-23 21:11:34 · 286 阅读 · 0 评论 -
https://projecteuler.net/problem=1
自己做题玩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.原创 2016-02-14 13:52:04 · 258 阅读 · 0 评论 -
https://projecteuler.net/problem=4
Largest palindrome productProblem 4A 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 pal原创 2016-02-23 13:29:32 · 294 阅读 · 0 评论 -
https://projecteuler.net/problem=6
Sum square differenceProblem 6The 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 + .原创 2016-02-23 21:29:44 · 230 阅读 · 0 评论 -
Digit cancelling fractions
https://projecteuler.net/problem=33Digit cancelling fractionsProblem 33Published on Friday, 20th December 2002, 06:00 pm; Solved by 47920; Difficulty rating: 5%The fraction 49/98 is a curious frac原创 2016-04-24 21:54:24 · 443 阅读 · 0 评论