Project Euler 136
Project Euler 136
题目
Singleton difference
The positive integers, $x, y$, and $z$, are consecutive terms of an arithmetic progression. Given that $n$ is a positive integer, the equation, $x^2 − y^2 − z^2 = n$, has exactly one solution when $n = 20$:
In fact there are twenty-five values of $n$ below one hundred for which the equation has a unique solution.
How many values of $n$ less than fifty million have exactly one solution?
解决方案
本题的解决方案和第135题完全一样,在这里不再赘述。
代码
1 |
|