Project_Euler(欧拉计划)
nobleman__
加油王先生
展开
-
Project Euler(欧拉计划)解题报告【不断更新】
先写在前头,里面所有的题大都是我的个人解题报告,由于我的能力,不可避免的有许多不足,如果有解题有错误或者遗漏,还望指出,谢谢。先简单介绍下 ProjectEulerProject EulerProjectEulerProject Euler欧拉计划(Project Euler)是一系列有挑战性的数学与计算机编程题;要解开它们,需要的不止是数学知识:尽管数学能够帮助你找到一些优雅而有效的方法,...原创 2019-02-06 16:33:11 · 8049 阅读 · 2 评论 -
Project Euler Problem 53: Combinatoric selections【组合数】
PE其他解题报告请参考这里,本题答案在留言首条Combinatoric selectionsProblem 53There are exactly ten ways of selecting three from five, 123451234512345:123,124,125,134,135,145,234,235,245,and345123, 124, 125, 134, 135,...原创 2019-02-07 19:49:09 · 360 阅读 · 1 评论 -
Project Euler Problem 54: Poker hands【模拟】
PE其他解题报告请参考这里,本题答案在留言首条Poker handsProblem 54In the card game poker, a hand consists of five cards and are ranked, from lowest to highest, in the following way:High Card: Highest value card.One ...原创 2019-02-11 20:08:58 · 497 阅读 · 1 评论 -
Project Euler Problem 55: Lychrel numbers【暴力】
PE其他解题报告请参考这里,本题答案在留言首条Lychrel numbersProblem 55If we take 47, reverse and add, 47 + 74 = 121, which is palindromic.Not all numbers produce palindromes so quickly. For example,349 + 943 = 1292,...原创 2019-02-11 22:04:48 · 320 阅读 · 1 评论 -
Project Euler Problem 56: Powerful digit sum【暴力】
PE其他解题报告请参考这里,本题答案在留言首条Powerful digit sumProblem 56A googol (1010010^{100}10100) is a massive number: one followed by one-hundred zeros; 100100100^{100}100100 is almost unimaginably large: one fol...原创 2019-02-11 22:13:52 · 294 阅读 · 1 评论 -
Project Euler Problem 57: Square root convergents【模拟】
PE其他解题报告请参考这里,本题答案在留言首条Square root convergentsProblem 57It is possible to show that the square root of two can be expressed as an infinite continued fraction.√2=1+1/(2+1/(2+1/(2+...)))=1.414213.....原创 2019-02-11 23:32:17 · 376 阅读 · 1 评论 -
Project Euler Problem 97: Large non-Mersenne prime【快速幂】
PE其他解题报告请参考这里,本题答案在留言首条Large non-Mersenne primeProblem 97The first known prime found to exceed one million digits was discovered in 1999, and is a Mersenne prime of the form 26972593−12^{6972593}−...原创 2019-02-13 12:52:06 · 449 阅读 · 1 评论 -
Project Euler Problem 63: Powerful digit counts【暴力】
PE其他解题报告请参考这里,本题答案在留言首条Powerful digit countsProblem 63The 5-digit number, 16807=7516807=7^516807=75, is also a fifth power. Similarly, the 9-digit number, 134217728=89134217728=8^9134217728=89, is...原创 2019-02-13 13:08:46 · 364 阅读 · 1 评论 -
Project Euler Problem 79: Passcode derivation【拓扑排序】
PE其他解题报告请参考这里,本题答案在留言首条Passcode derivationProblem 79A common security method used for online banking is to ask the user for three random characters from a passcode. For example, if the passcode wa...原创 2019-02-13 20:13:35 · 506 阅读 · 1 评论 -
Project Euler Problem 52: Permuted multiples【暴力】【stringsteam】
PE其他解题报告请参考这里,本题答案在留言首条Permuted multiplesProblem 52It can be seen that the number, 125874, and its double, 251748, contain exactly the same digits, but in a different order.Find the smallest posi...原创 2019-02-07 17:55:42 · 341 阅读 · 1 评论 -
Project Euler Problem 51:Prime digit replacements【暴力】【按位枚举】【stringstream】
PE其他解题报告请参考这里,本题答案在留言首条Prime digit replacementsProblem 51By replacing the 1st1^{st}1stdigit of the 2-digit number *3, it turns out that six of the nine possible values: 13, 23, 43, 53, 73, and 83,...原创 2019-02-07 17:44:40 · 500 阅读 · 1 评论 -
Project Euler Problem 43:Sub-string divisibility
PE其他解题报告请参考这里,本题答案在留言首条Sub-string divisibilityProblem 43The number, 1406357289, is a 0 to 9 pandigital number because it is made up of each of the digits 0 to 9 in some order, but it also has a ra...原创 2019-02-07 12:25:10 · 260 阅读 · 1 评论 -
Projext Euler Problem 1:Multiples of 3 and 5【暴力】【容斥】
PE其他解题报告请参考这里,本题答案在留言首条Multiples of 3 and 5Problem 1If 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...原创 2019-02-06 21:09:07 · 947 阅读 · 1 评论 -
Projext Euler Problem 50 : Consecutive prime sum【暴力】【素数筛】【尺取法】
PE其他解题报告请参考这里,本题答案在留言首条Consecutive prime sumProblem 50The prime 41, can be written as the sum of six consecutive primes:41=2+3+5+7+11+1341 = 2 + 3 + 5 + 7 + 11 + 1341=2+3+5+7+11+13This is the lo...原创 2019-02-06 23:10:07 · 308 阅读 · 1 评论 -
Projext Euler Problem 49:Prime permutations【枚举】【暴力】
PE其他解题报告请参考这里,本题答案在留言首条Prime permutationsProblem 49The arithmetic sequence, 1487, 4817, 8147, in which each of the terms increases by 3330, is unusual in two ways: (i) each of the three terms are ...原创 2019-02-07 10:12:46 · 382 阅读 · 1 评论 -
Project Euler Problem 48 : Self powers 【暴力】【同余定理】
Self powersProblem 48The series, 11+22+33+...+1010=104050713171^1 + 2^2 + 3^3 + ... + 10^{10} = 1040507131711+22+33+...+1010=10405071317.Find the last ten digits of the series, 11+22+33+...+1000100...原创 2019-02-07 10:27:01 · 526 阅读 · 1 评论 -
Project Euler Problem 47: Distinct primes factors【素数筛】【暴力】
PE其他解题报告请参考这里,本题答案在留言首条Distinct primes factorsProblem 47The first two consecutive numbers to have two distinct prime factors are:14=2×714 = 2 × 714=2×715=3×515 = 3 × 515=3×5The first three cons...原创 2019-02-07 10:42:32 · 374 阅读 · 0 评论 -
Project Euler Problem 46: Goldbach's other conjecture【暴力】【素数筛】
PE其他解题报告请参考这里,本题答案在留言首条Goldbach’s other conjectureProblem 46It was proposed by Christian Goldbach that every odd composite number can be written as the sum of a prime and twice a square.9=7+2×129...原创 2019-02-07 10:57:45 · 338 阅读 · 1 评论 -
Project Euler Problem 45: Triangular, pentagonal, and hexagonal【二分】【暴力】
PE其他解题报告请参考这里,本题答案在留言首条Triangular, pentagonal, and hexagonalProblem 45Triangle, pentagonal, and hexagonal numbers are generated by the following formulae:Triangle Tn=n(n+1)/21,3,6,10,15,...Tn=n...原创 2019-02-07 11:05:46 · 397 阅读 · 0 评论 -
Project Euler Problem 44 : Pentagon numbers【暴力】
PE其他解题报告请参考这里,本题答案在留言首条Pentagon numbersProblem 44Pentagonal numbers are generated by the formula, Pn=n(3n−1)/2. The first ten pentagonal numbers are:1,5,12,22,35,51,70,92,117,145,...1, 5, 12, 22,...原创 2019-02-07 11:47:08 · 364 阅读 · 1 评论 -
Project Euler Problem 650: Divisors of Binomial Product
PE其他解题报告请参考这里,本题答案在留言首条Divisors of Binomial ProductProblem 650题意:略分析:首先可以知道 B(n)=(n!)n−1(∏i=1n−1i)2B(n)=\frac{(n!)^{n-1}}{(\prod_{i = 1}^{n-1} i)^2}B(n)=(∏i=1n−1i)2(n!)n−1也有递推式如下:B(n)=B(n...原创 2019-05-15 14:27:03 · 639 阅读 · 0 评论