fix(curriculum): clean-up Project Euler 161-180 (#42782)
* fix: clean-up Project Euler 161-180 * fix: corrections from review Co-authored-by: Tom <20648924+moT01@users.noreply.github.com> Co-authored-by: Tom <20648924+moT01@users.noreply.github.com>
This commit is contained in:
@@ -8,22 +8,27 @@ dashedName: problem-166-criss-cross
|
||||
|
||||
# --description--
|
||||
|
||||
A 4x4 grid is filled with digits d, 0 ≤ d ≤ 9.
|
||||
A 4x4 grid is filled with digits $d$, $0 ≤ d ≤ 9$.
|
||||
|
||||
It can be seen that in the grid
|
||||
|
||||
6 3 3 0 5 0 4 3 0 7 1 4 1 2 4 5
|
||||
$$\begin{array}{}
|
||||
6 & 3 & 3 & 0 \\\\
|
||||
5 & 0 & 4 & 3 \\\\
|
||||
0 & 7 & 1 & 4 \\\\
|
||||
1 & 2 & 4 & 5
|
||||
\end{array}$$
|
||||
|
||||
the sum of each row and each column has the value 12. Moreover the sum of each diagonal is also 12.
|
||||
|
||||
In how many ways can you fill a 4x4 grid with the digits d, 0 ≤ d ≤ 9 so that each row, each column, and both diagonals have the same sum?
|
||||
In how many ways can you fill a 4x4 grid with the digits $d$, $0 ≤ d ≤ 9$ so that each row, each column, and both diagonals have the same sum?
|
||||
|
||||
# --hints--
|
||||
|
||||
`euler166()` should return 7130034.
|
||||
`crissCross()` should return `7130034`.
|
||||
|
||||
```js
|
||||
assert.strictEqual(euler166(), 7130034);
|
||||
assert.strictEqual(crissCross(), 7130034);
|
||||
```
|
||||
|
||||
# --seed--
|
||||
@@ -31,12 +36,12 @@ assert.strictEqual(euler166(), 7130034);
|
||||
## --seed-contents--
|
||||
|
||||
```js
|
||||
function euler166() {
|
||||
function crissCross() {
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
euler166();
|
||||
crissCross();
|
||||
```
|
||||
|
||||
# --solutions--
|
||||
|
Reference in New Issue
Block a user