- 博客(66)
- 资源 (5)
- 收藏
- 关注
原创 欧拉计划Problem 60
The primes 3, 7, 109, and 673, are quite remarkable. By taking any two primes and concatenating them in any order the result will always be prime. For example, taking 7 and 109, both 7109 and 1097 a
2012-06-20 17:13:18 1012
原创 欧拉计划Problem 59
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, asterisk (*) = 42, and
2012-06-20 17:11:06 940
原创 欧拉计划Problem 58
Starting with 1 and spiralling anticlockwise in the following way, a square spiral with side length 7 is formed.37 36 35 34 33 323138 17 16 15 1413 3039 18 5 4 3 12 2940 19 6 1 2 11
2012-05-30 16:59:56 996
原创 欧拉计划Problem 57
It 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...By expanding this for the first four iterat
2012-05-30 16:57:53 637
原创 欧拉计划Problem 56
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 digits in each num
2012-05-28 16:46:25 638
原创 欧拉计划Problem 55
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 = 7337That is
2012-05-27 10:57:17 731
原创 欧拉计划Problem 54
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 value.Two Pairs: Tw
2012-05-26 16:36:58 929 2
原创 欧拉计划Problem 53
There 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 =
2012-05-26 16:34:51 586
原创 欧拉计划Problem 53
There 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 =
2012-05-25 16:00:30 158
原创 欧拉计划Problem 52
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, 4x, 5x, and 6x, con
2012-05-24 09:43:07 1915
原创 欧拉计划Problem 51
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 the same digit, this
2012-05-23 14:18:29 711
原创 欧拉计划总结(5)
Hello,各位好啊,最近这几天快考试了,所以大部分时间都在为考试而奋斗(归咎到底还是因为平时没认真听课啊,5555 o(>﹏problem 41:求最大的n位pandigital质数。对这道题目,我先想到的是用递归。设计一个判断质数的子函数跟,交换值的子函数。主函数里我循环8次这个递归函数,而对于这个递归函数,我先判断数组是不是已经到最后一位了,因为我主函数是从8开始,所以第一次数组
2012-05-23 14:15:56 621
原创 欧拉计划Problem 50
The prime 41, can be written as the sum of six consecutive primes:41 = 2 + 3 + 5 + 7 + 11 + 13This is the longest sum of consecutive primes that adds to a prime below one-hundred.The longest s
2012-05-22 16:20:27 705
原创 欧拉计划Problem 49
The 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 perm
2012-05-21 12:09:35 735
原创 欧拉计划Problem 48
The series, 11 + 22 + 33 + ... + 1010 = 10405071317.Find the last ten digits of the series, 11 + 22 + 33 + ... + 10001000.#define N 1000#define M 3void series(int x,int temp[]){
2012-05-20 11:24:44 939
原创 欧拉计划Problem 47
The first two consecutive numbers to have two distinct prime factors are:14 = 2 715 = 3 5The first three consecutive numbers to have three distinct prime factors are:644 = 2² 7 23645
2012-05-19 12:59:18 684
原创 欧拉计划Problem 46
It 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 + 21215 = 7 + 22221 = 3 + 23225 = 7 + 23227 = 19 + 222
2012-05-18 15:39:34 726
原创 欧拉计划Problem 45
Triangle, pentagonal, and hexagonal numbers are generated by the following formulae:Triangle Tn=n(n+1)/2 1, 3, 6, 10, 15, ...Pentagonal Pn=n(3n1)/2 1, 5, 12, 22, 35, ...
2012-05-17 09:46:13 581
原创 欧拉计划Problem 44
Pentagonal numbers are generated by the formula, Pn=n(3n1)/2. The first ten pentagonal numbers are:1, 5, 12, 22, 35, 51, 70, 92, 117, 145, ...It can be seen that P4 + P7 = 22 + 70 = 92 = P8. H
2012-05-16 07:52:10 923 1
原创 欧拉计划Problem 43
The 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 rather interesting sub-string divisibility property.Let d1 b
2012-05-15 16:19:41 629
原创 欧拉计划Problem 42
The nth term of the sequence of triangle numbers is given by, tn = ½n(n+1); so the first ten triangle numbers are:1, 3, 6, 10, 15, 21, 28, 36, 45, 55, ...By converting each letter in a word to a
2012-05-14 19:39:39 8823
原创 欧拉计划Problem 41
We shall say that an n-digit number is pandigital if it makes use of all the digits 1 to n exactly once. For example, 2143 is a 4-digit pandigital and is also prime.What is the largest n-digit pandi
2012-05-13 13:20:37 555
原创 欧拉计划总结(4)
转眼又过去10题了,已经是第40题了。做到现在感慨真的挺多的。像我现在做很多类似的题目都会很固定的想到自己以前定义的一些算法,例如:要求质数,我就会定义一个布尔子函数,引入这个值的参数,然后去确定这个值是不是质数,是的话输出true,不是就是输出false。呵呵,有点感觉自己的思维是不是已经有向固定化模式转变的趋势了。不过,不管怎么样,说到底,我还是很喜欢做算法题目。前些天参加了个讲座,这个讲
2012-05-13 00:33:15 858
原创 欧拉计划Problem 40
An irrational decimal fraction is created by concatenating the positive integers:0.123456789101112131415161718192021...It can be seen that the 12th digit of the fractional part is 1.If dn repr
2012-05-12 09:05:37 534
原创 欧拉计划Problem 39
If p is the perimeter of a right angle triangle with integral length sides, {a,b,c}, there are exactly three solutions for p = 120.{20,48,52}, {24,45,51}, {30,40,50}For which value of p 1000, i
2012-05-11 08:27:04 707
原创 欧拉计划Problem 38
Take the number 192 and multiply it by each of 1, 2, and 3:192 1 = 192192 2 = 384192 3 = 576By concatenating each product we get the 1 to 9 pandigital, 192384576. We will call 1923845
2012-05-10 09:43:49 476
原创 欧拉计划Problem 37
The number 3797 has an interesting property. Being prime itself, it is possible to continuously remove digits from left to right, and remain prime at each stage: 3797, 797, 97, and 7. Similarly we c
2012-05-09 13:22:15 576
原创 欧拉计划Problem 36
The decimal number, 585 = 10010010012 (binary), is palindromic in both bases.Find the sum of all numbers, less than one million, which are palindromic in base 10 and base 2.(Please note that the
2012-05-08 08:19:51 705
原创 欧拉计划Problem 35
The number, 197, is called a circular prime because all rotations of the digits: 197, 971, and 719, are themselves prime.There are thirteen such primes below 100: 2, 3, 5, 7, 11, 13, 17, 31, 37, 71,
2012-05-07 14:44:00 607
原创 欧拉计划Problem 34
145 is a curious number, as 1! + 4! + 5! = 1 + 24 + 120 = 145.Find the sum of all numbers which are equal to the sum of the factorial of their digits.Note: as 1! = 1 and 2! = 2 are not sums they
2012-05-06 11:12:02 628
原创 欧拉计划Problem 33
The fraction 49/98 is a curious fraction, as an inexperienced mathematician in attempting to simplify it may incorrectly believe that49/98 = 4/8, which is correct, is obtained by cancelling the 9s.
2012-05-05 12:35:31 555
原创 欧拉计划Problem 32
We shall say that an n-digit number is pandigital if it makes use of all the digits 1 to n exactly once; for example, the 5-digit number, 15234, is 1 through 5 pandigital.The product 7254 is unusu
2012-05-04 13:26:02 625
原创 欧拉计划Problem 31
In England the currency is made up of pound, £, and pence, p, and there are eight coins in general circulation:1p, 2p, 5p, 10p, 20p, 50p, £1 (100p) and £2 (200p).It is possible to make £2 in the f
2012-05-03 11:40:19 447
原创 欧拉计划总结(3)
大家好,我又跟大家见面了!o(≧v≦)o~~在这里给大家说声抱歉,昨天是5.1,所以就提前几天去福州玩了几天,结果就没有及时做好算法,不过回来后我就赶紧补上了。而今天呢,课又比较多,时间比较赶,所以今天就比较晚更。不过对我来说,不管怎么样,每天一题是我一直的坚持,即使当天没做完,隔天我也会补上。对我来说,当天没做完,隔天补上,当然如果感觉还有余力,那我也会多做点题目,但是算当然还是算当天咯,就像那
2012-05-03 11:38:35 828
原创 欧拉计划Problem 30
Surprisingly there are only three numbers that can be written as the sum of fourth powers of their digits:1634 = 14 + 64 + 34 + 448208 = 84 + 24 + 04 + 849474 = 94 + 44 + 74 + 44As 1 = 14 is
2012-05-02 13:12:15 460
原创 欧拉计划Problem 29
Consider 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=24342=16, 43=64, 44=256, 45=102452=25, 53=125, 54=625, 55=3125If they are t
2012-05-01 16:18:23 665
原创 欧拉计划Problem 28
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 2520 7 8 9 1019 6 1 2 1118 5 4 3 1217 16 15 14 13It ca
2012-05-01 16:17:53 343
原创 欧拉计划Problem 27
Euler published the remarkable quadratic formula:n² + n + 41It 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(
2012-04-29 15:37:32 589
原创 欧拉计划Problem 26
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.51/3= 0.(3)1/4=
2012-04-28 10:17:37 943
原创 欧拉计划Problem 25
The Fibonacci sequence is defined by the recurrence relation:Fn = Fn25" style="margin-top:0px; margin-right:0px; margin-bottom:0px; margin-left:0px; padding-top:0px; padding-right:0px; padding-bot
2012-04-28 10:17:16 592
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人