1005 B
1005 B
id | title | challengeType | forumTopicId | dashedName |
---|---|---|---|---|
5900f47e1000cf542c50ff90 | 問題 273: 平方数の和 | 1 | 301923 | problem-273-sum-of-squares |
--description--
式 a^2 + b^2 = N
, 0 ≤ a ≤ b
(a
, b
, N
は整数) について考えます。
N = 65
のとき、解は 2 つあります。
a = 1, b = 8
と、a = 4, b = 7
です。
a^2 + b^2 = N
, 0 ≤ a ≤ b
(a
, b
, N
は整数) のすべての解の a
値の和を S(N)
とします。
したがって、S(65) = 1 + 4 = 5
です。
4k + 1 < 150
のとき、4k + 1
で表される素数でのみ割り切れるすべての無平方数 N
について \sum S(N)
を求めなさい。
--hints--
sumOfSquares()
は 2032447591196869000
を返す必要があります。
assert.strictEqual(sumOfSquares(), 2032447591196869000);
--seed--
--seed-contents--
function sumOfSquares() {
return true;
}
sumOfSquares();
--solutions--
// solution required