上一页 1 ··· 4 5 6 7 8 9 10 11 12 ··· 19 下一页
摘要: The 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 + ... + 10)2= 552= 3025Hence the difference between the sum of the squares of the first ten natural numbers and the square of the sum is 3025385 = 2640.Fi 阅读全文
posted @ 2013-07-26 11:02 cpoint 阅读(597) 评论(0) 推荐(0) 编辑
摘要: 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 terms in the Fibonacci sequence whose values do not exceed four million, find the sum of the even-value 阅读全文
posted @ 2013-07-26 10:57 cpoint 阅读(265) 评论(0) 推荐(0) 编辑
摘要: 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. 1 #include 2 #include 3 #include 4 5 void solve() 6 { 7 int sum,i; 8 sum=0; 9 for(i=3; i<1000; i++)10 ... 阅读全文
posted @ 2013-07-26 10:55 cpoint 阅读(238) 评论(0) 推荐(0) 编辑
摘要: The fraction49/98is 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.We shall consider fractions like,30/50=3/5, to be trivial examples.There are exactly four non-trivial examp 阅读全文
posted @ 2013-07-26 00:49 cpoint 阅读(269) 评论(0) 推荐(0) 编辑
摘要: 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 are not included.#include #include #include #include #include #include int factorial(int n) //阶乘函数 { ... 阅读全文
posted @ 2013-07-25 23:13 cpoint 阅读(199) 评论(0) 推荐(0) 编辑
摘要: Starting with the number 1 and moving to the right in a clockwise direction a 5 by 5 spiral is formed as follows:2122 23 242520 78 91019 6 12 1118 54 3121716 15 1413It can be verified that the sum of the numbers on the diagonals is 101.What is the sum of the numbers on the diagonals in a 1001 by 100 阅读全文
posted @ 2013-07-25 21:34 cpoint 阅读(223) 评论(0) 推荐(0) 编辑
摘要: A Pythagorean triplet is a set of three natural numbers,abc, for which,a2+b2=c2For example, 32+ 42= 9 + 16 = 25 = 52.There exists exactly one Pythagorean triplet for whicha+b+c= 1000.Find the productabc.#include#include#include#include#include#includevoid show(){ int a,b,c; for(a=1; a<333; a++... 阅读全文
posted @ 2013-07-24 15:55 cpoint 阅读(233) 评论(0) 推荐(0) 编辑
摘要: Let d(n) be defined as the sum of proper divisors ofn(numbers less thannwhich divide evenly inton).If d(a) =band d(b) =a, whereab, thenaandbare an amicable pair and each ofaandbare called amicable numbers.For example, the proper divisors of 220 are 1, 2, 4, 5, 10, 11, 20, 22, 44, 55 and 110; therefo 阅读全文
posted @ 2013-07-24 13:11 cpoint 阅读(443) 评论(0) 推荐(0) 编辑
摘要: A palindromic number reads the same both ways. The largest palindrome made from the product of two 2-digit numbers is 9009 = 9199.Find the largest palindrome made from the product of two 3-digit numbers.#include #include #include #include #include #include bool palindromic(int n) //判断一个整数是否为回文数 {... 阅读全文
posted @ 2013-07-24 11:38 cpoint 阅读(206) 评论(0) 推荐(0) 编辑
摘要: The prime factors of 13195 are 5, 7, 13 and 29.What is the largest prime factor of the number 600851475143 ?#include #include #include #include #include #include #define N 600851475143 bool prim(int n) { int i; for(i=2; i*i<=n; i++) { if(n%i==0) return false; } return true; } int main()... 阅读全文
posted @ 2013-07-24 00:19 cpoint 阅读(237) 评论(0) 推荐(0) 编辑
上一页 1 ··· 4 5 6 7 8 9 10 11 12 ··· 19 下一页
浏览次数:travelocity promotion codes