上一篇: 「欧拉计划」部分简单题目题解
这一篇大概是 #6
#7
#9
#10
#12
#15
#73
的题解
题面
#6. Sum square difference
The sum of the squares of the first ten natural numbers is,
The square of the sum of the first ten natural numbers is,
Hence the difference between the sum of the squares of the first ten natural numbers and the square of the sum is .
Find the difference between the sum of the squares of the first one hundred natural numbers and the square of the sum.
#7. 10001st prime
By listing the first six prime numbers: 2, 3, 5, 7, 11, and 13, we can see that the 6th prime is 13.
What is the 10 001st prime number?
#9. Special Pythagorean triplet
A Pythagorean triplet is a set of three natural numbers, , for which,
For example, .
There exists exactly one Pythagorean triplet for which . Find the product .
#10. Summation of primes
The sum of the primes below is
Find the sum of all the primes below two million.
#12. Highly divisible triangular number
The sequence of triangle numbers is generated by adding the natural numbers. So the 7th triangle number would be . The first ten terms would be:
Let us list the factors of the first seven triangle numbers:
1  1: 1 
We can see that is the first triangle number to have over five divisors.
What is the value of the first triangle number to have over five hundred divisors?
#15. Lattice paths
Starting in the top left corner of a 2×2 grid, and only being able to move to the right and down, there are exactly 6 routes to the bottom right corner.
How many such routes are there through a 20×20 grid?
#73. Counting fractions in a range
Consider the fraction, , where n and are positive integers. If and , it is called a reduced proper fraction.
If we list the set of reduced proper fractions for in ascending order of size, we get:
1  1/8, 1/7, 1/6, 1/5, 1/4, 2/7, 1/3, [3/8, 2/5, 3/7], 1/2, 4/7, 3/5, 5/8, 2/3, 5/7, 3/4, 4/5, 5/6, 6/7, 7/8 
It can be seen that there are 3 fractions between 1/3 and 1/2.
How many fractions lie between 1/3 and 1/2 in the sorted set of reduced proper fractions for ?
题解
#6. Sum square difference
大概就这样:
题目就是求黑边的和
1 

#7. 10001st prime
无话可说....
1 

#9. Special Pythagorean triplet
如果背过一些勾股数可能会比较容易...
如果数学直觉可能会直接反应过来是
于是答案就是
Orz 但是我只会爆算
1 

#10. Summation of primes
直接暴力
1 

#12. Highly divisible triangular number
三角形数的公式
注意到 与 是互质的, 于是分别计算两部分即可(根据奇数/偶数讨论)
这里放上暴力的代码
1 

#15. Lattice paths
显然是
1 

#73. Counting fractions in a range
直接上暴力:
1 
