摘要:
欧拉计划,第9题 阅读全文
2012年5月15日 #
2012年5月14日 #
摘要:
欧拉计划,第8题,从1000个数字中找出5个连续数成绩最大的值。 阅读全文
2012年5月13日 #
摘要:
欧拉计划,第7题,找出第10001个素数 阅读全文
摘要:
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 3025 385 = . 阅读全文
摘要:
2520 is the smallest number that can be divided by each of the numbers from 1 to 10 without any remainder.What is the smallest positive number that is evenly divisible by all of the numbers from 1 to 20? static void Main(string[] args) { long startTime, endTime; Int64 f=... 阅读全文
2012年5月12日 #
摘要:
A palindromic number reads the same both ways. The largest palindrome made from the product of two 2-digit numbers is 9009 = 91* 99.Find the largest palindrome made from the product of two 3-digit numbers.2个两位数相乘得到的最大的回文数是9009,如:9009=91*99。找出2个3位数相乘得到的最大的回文数。static void Main(string[] args) { Int64 i 阅读全文
摘要:
The prime factors of 13195 are 5, 7, 13 and 29.What is the largest prime factor of the number 600851475143 ?每个合数都可以写成几个质数相乘的形式。其中每个质数都是这个合数的因数,叫做这个合数的分解质因数。 分解质因数只针对合数。c#代码:class Program { static void Main(string[] args) { Int64 num = 600851475143; int prm = 2;... 阅读全文
2012年5月11日 #
摘要:
From Wikipedia, the free encyclopediaJump to: navigation, searchA composite number is a positive integer which has a positive divisor other than one or itself. In other words a composite number is any positive integer greater than one that is not a prime number.So, if n > 0 is an integer and ther 阅读全文
摘要:
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 阅读全文
摘要:
欧拉计划网站地址:http://projecteuler.net/第1题 Add all the natural numbers below one thousand that are multiples of 3 or 5.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.第一个 阅读全文