mirror of
https://github.com/freeCodeCamp/freeCodeCamp.git
synced 2026-02-25 23:01:26 -05:00
805 B
805 B
id, title, challengeType, forumTopicId, dashedName
| id | title | challengeType | forumTopicId | dashedName |
|---|---|---|---|---|
| 5900f3f51000cf542c50ff07 | Problem 136: Singleton difference | 1 | 301764 | problem-136-singleton-difference |
--description--
正整数 $x$、y 和 z 是算术级数的连续项。 已知 n 为正整数,对于方程 $x^2 − y^2 − z^2 = n$,当 n = 20 时存在唯一解:
13^2 − 10^2 − 7^2 = 20
事实上,有 25 个 n 小于 100 的值,使得方程有唯一解。
有多少小于五千万的 n 使得方程有唯一解?
--hints--
singletonDifference() 应该返回 2544559。
assert.strictEqual(singletonDifference(), 2544559);
--seed--
--seed-contents--
function singletonDifference() {
return true;
}
singletonDifference();
--solutions--
// solution required