码迷,mamicode.com
首页 >  
搜索关键字:project-euler    ( 184个结果
Project Euler:Problem 30 Digit fifth powers
Surprisingly there are only three numbers that can be written as the sum of fourth powers of their digits: 1634 = 14 + 64 + 34 + 44 8208 = 84 + 24 + 04 + 84 9474 = 94 + 44 + 74 + 44 As 1 = 14 ...
分类:其他好文   时间:2015-06-03 10:01:49    阅读次数:106
Project Euler:Problem 29 Distinct powers
Consider all integer combinations of ab for 2 ≤ a ≤ 5 and 2 ≤ b ≤ 5: 22=4, 23=8, 24=16, 25=32 32=9, 33=27, 34=81, 35=243 42=16, 43=64, 44=256, 45=1024 52=25, 53=125, 54=625, 55=3125 If they a...
分类:其他好文   时间:2015-06-03 09:59:38    阅读次数:123
Project Euler:Problem 26 Reciprocal cycles
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...
分类:其他好文   时间:2015-06-02 11:18:53    阅读次数:125
Project Euler:Problem 27 Quadratic primes
Euler discovered the remarkable quadratic formula: n² + n + 41 It turns out that the formula will produce 40 primes for the consecutive values n = 0 to 39. However, when n = 40, 402 + 40 + 41 = 40...
分类:其他好文   时间:2015-06-02 11:16:49    阅读次数:139
Project Euler:Problem 28 Number spiral diagonals
Starting with the number 1 and moving to the right in a clockwise direction a 5 by 5 spiral is formed as follows: 21 22 23 24 25 20  7  8  9 10 19  6  1  2 11 18  5  4  3 12 17 16 15 14 13 It ...
分类:其他好文   时间:2015-06-02 11:14:02    阅读次数:110
Project Euler:Problem 22 Names scores
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 ...
分类:其他好文   时间:2015-06-02 09:33:28    阅读次数:117
Project Euler:Problem 24 Lexicographic permutations
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...
分类:其他好文   时间:2015-06-02 09:28:13    阅读次数:121
Project Euler:Problem 23 Non-abundant sums
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...
分类:其他好文   时间:2015-06-02 09:26:34    阅读次数:154
Project Euler:Problem 25 1000-digit Fibonacci number
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 F5 = 5 F6 = 8 F7 = 1...
分类:其他好文   时间:2015-06-02 00:33:24    阅读次数:168
Project Euler:Problem 21 Amicable numbers
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 a...
分类:其他好文   时间:2015-06-01 16:43:34    阅读次数:126
184条   上一页 1 ... 14 15 16 17 18 19 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!