fix(curriculum): clean-up Project Euler 281-300 (#42922)
* fix: clean-up Project Euler 281-300 * fix: missing image extension * fix: missing power Co-authored-by: Tom <20648924+moT01@users.noreply.github.com> * fix: missing subscript 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,20 +8,26 @@ dashedName: problem-284-steady-squares
|
||||
|
||||
# --description--
|
||||
|
||||
The 3-digit number 376 in the decimal numbering system is an example of numbers with the special property that its square ends with the same digits: 3762 = 141376. Let's call a number with this property a steady square.
|
||||
The 3-digit number 376 in the decimal numbering system is an example of numbers with the special property that its square ends with the same digits: ${376}^2 = 141376$. Let's call a number with this property a steady square.
|
||||
|
||||
Steady squares can also be observed in other numbering systems. In the base 14 numbering system, the 3-digit number c37 is also a steady square: c372 = aa0c37, and the sum of its digits is c+3+7=18 in the same numbering system. The letters a, b, c and d are used for the 10, 11, 12 and 13 digits respectively, in a manner similar to the hexadecimal numbering system.
|
||||
Steady squares can also be observed in other numbering systems. In the base 14 numbering system, the 3-digit number $c37$ is also a steady square: $c37^2 = aa0c37$, and the sum of its digits is $c+3+7=18$ in the same numbering system. The letters $a$, $b$, $c$ and $d$ are used for the 10, 11, 12 and 13 digits respectively, in a manner similar to the hexadecimal numbering system.
|
||||
|
||||
For 1 ≤ n ≤ 9, the sum of the digits of all the n-digit steady squares in the base 14 numbering system is 2d8 (582 decimal). Steady squares with leading 0's are not allowed.
|
||||
For $1 ≤ n ≤ 9$, the sum of the digits of all the $n$-digit steady squares in the base 14 numbering system is $2d8$ (582 decimal). Steady squares with leading 0's are not allowed.
|
||||
|
||||
Find the sum of the digits of all the n-digit steady squares in the base 14 numbering system for 1 ≤ n ≤ 10000 (decimal) and give your answer in the base 14 system using lower case letters where necessary.
|
||||
Find the sum of the digits of all the $n$-digit steady squares in the base 14 numbering system for $1 ≤ n ≤ 10000$ (decimal) and give your answer as a string in the base 14 system using lower case letters where necessary.
|
||||
|
||||
# --hints--
|
||||
|
||||
`euler284()` should return 5a411d7b.
|
||||
`steadySquares()` should return a string.
|
||||
|
||||
```js
|
||||
assert.strictEqual(euler284(), '5a411d7b');
|
||||
assert(typeof steadySquares() === 'string');
|
||||
```
|
||||
|
||||
`steadySquares()` should return the string `5a411d7b`.
|
||||
|
||||
```js
|
||||
assert.strictEqual(steadySquares(), '5a411d7b');
|
||||
```
|
||||
|
||||
# --seed--
|
||||
@ -29,12 +35,12 @@ assert.strictEqual(euler284(), '5a411d7b');
|
||||
## --seed-contents--
|
||||
|
||||
```js
|
||||
function euler284() {
|
||||
function steadySquares() {
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
euler284();
|
||||
steadySquares();
|
||||
```
|
||||
|
||||
# --solutions--
|
||||
|
Reference in New Issue
Block a user