Files
freeCodeCamp/curriculum/challenges/japanese/10-coding-interview-prep/project-euler/problem-166-criss-cross.md
2022-04-02 17:46:30 +09:00

949 B

id, title, challengeType, forumTopicId, dashedName
id title challengeType forumTopicId dashedName
5900f4131000cf542c50ff25 問題 166: 十字 5 301800 problem-166-criss-cross

--description--

4 x 4 の格子が数字 d (0 ≤ d ≤ 9) で埋められています。

次のような格子です。

$$\begin{array}{} 6 & 3 & 3 & 0 \\ 5 & 0 & 4 & 3 \\ 0 & 7 & 1 & 4 \\ 1 & 2 & 4 & 5 \end{array}$$

この格子の各行と各列の和はそれぞれ 12 です。 また、各対角線の和も 12 です。

4 x 4 の格子を、各行、各列、および各対角線の和がそれぞれ等しくなるように d (0 ≤ d ≤ 9) で埋める方法は何通りありますか。

--hints--

crissCross()7130034 を返す必要があります。

assert.strictEqual(crissCross(), 7130034);

--seed--

--seed-contents--

function crissCross() {

  return true;
}

crissCross();

--solutions--

// solution required