quark

  博客园 :: 首页 :: 新随笔 :: 联系 :: 订阅 :: 管理 ::

随笔分类 -  Project Euler

摘要:Problem Description The primes 3, 7, 109, and 673, are quite remarkable. By taking any two primes and concatenating them in any order the result will 阅读全文
posted @ 2012-08-16 19:33 QuarkZ 阅读(372) 评论(0) 推荐(0)

摘要:Problem Description Starting with 1 and spiralling anticlockwise in the following way, a square spiral with side length 7 is formed. 37 36 35 34 33 32 3138 17 16 15 14 13 3039 18 5 4 3 12 2940 19 6 1 ... 阅读全文
posted @ 2012-08-15 09:59 QuarkZ 阅读(196) 评论(0) 推荐(0)

摘要:Problem Description Each character on a computer is assigned a unique code and the preferred standard is ASCII (American Standard Code for Information Interchange). For example, uppercase A = 65, aste... 阅读全文
posted @ 2012-08-10 12:26 QuarkZ 阅读(275) 评论(0) 推荐(0)

摘要:Problem Description It is possible to show that the square root of two can be expressed as an infinite continued fraction. sqrt(2) = 1 + 1/(2 + 1/(2 + 1/(2 + ... ))) = 1.414213... By expanding this f... 阅读全文
posted @ 2012-08-06 10:31 QuarkZ 阅读(225) 评论(0) 推荐(0)

摘要:Problem Description A googol (10100) is a massive number: one followed by one-hundred zeros; 100100 is almost unimaginably large: one followed by two-hundred zeros. Despite their size, the sum of the... 阅读全文
posted @ 2012-08-03 10:16 QuarkZ 阅读(204) 评论(0) 推荐(0)

摘要:Problem Description If we take 47, reverse and add, 47 + 74 = 121, which is palindromic. Not all numbers produce palindromes so quickly. For example, 349 + 943 = 1292,1292 + 2921 = 42134213 + 3124 = 7... 阅读全文
posted @ 2012-08-02 10:34 QuarkZ 阅读(216) 评论(0) 推荐(0)

摘要:Problem Description By replacing the 1st digit of *3, it turns out that six of the nine possible values: 13, 23, 43, 53, 73, and 83, are all prime. By replacing the 3rd and 4th digits of 56**3 with t... 阅读全文
posted @ 2012-06-26 17:13 QuarkZ 阅读(392) 评论(0) 推荐(0)

摘要:Problem Description In 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 Pair: Two cards of the same... 阅读全文
posted @ 2012-06-26 11:59 QuarkZ 阅读(244) 评论(0) 推荐(0)

摘要:Problem DescriptionThere are exactly ten ways of selecting three from five, 12345:123, 124, 125, 134, 135, 145, 234, 235, 245, and 345In combinatorics, we use the notation, 5C3= 10.In general,nCr =n!r!(n-r)!,where r<=n, n! = n*(n-1)…*3*2*1, and 0! = 1.It is not until n = 23, that a value exceeds 阅读全文
posted @ 2012-06-21 12:18 QuarkZ 阅读(158) 评论(0) 推荐(0)

摘要:Problem Description It can be seen that the number, 125874, and its double, 251748, contain exactly the same digits, but in a different order. Find the smallest positive integer, x, such that 2x, 3x, ... 阅读全文
posted @ 2012-06-21 10:56 QuarkZ 阅读(184) 评论(0) 推荐(0)

摘要:Problem Description The prime 41, can be written as the sum of six consecutive primes: 41 = 2 + 3 + 5 + 7 + 11 + 13 This is the longest sum of consecutive primes that adds to a prime below one-hundred... 阅读全文
posted @ 2012-06-20 11:04 QuarkZ 阅读(311) 评论(0) 推荐(0)

摘要:Problem DescriptionThe 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 prime, and, (ii) each of the 4-digit numbers are permutations of one another.There are no arithmetic sequences made up of three 1-, 2-, 阅读全文
posted @ 2012-06-19 17:10 QuarkZ 阅读(328) 评论(0) 推荐(0)

摘要:Problem Description The series, 11 + 22 + 33 + ... + 1010 = 10405071317. Find the last ten digits of the series, 11 + 22 + 33 + ... + 10001000. Python This problem is so easy to python, because pyt... 阅读全文
posted @ 2012-05-25 13:56 QuarkZ 阅读(402) 评论(0) 推荐(0)