* feat(tools): add seed/solution restore script * chore(curriculum): remove empty sections' markers * chore(curriculum): add seed + solution to Chinese * chore: remove old formatter * fix: update getChallenges parse translated challenges separately, without reference to the source * chore(curriculum): add dashedName to English * chore(curriculum): add dashedName to Chinese * refactor: remove unused challenge property 'name' * fix: relax dashedName requirement * fix: stray tag Remove stray `pre` tag from challenge file. Signed-off-by: nhcarrigan <nhcarrigan@gmail.com> Co-authored-by: nhcarrigan <nhcarrigan@gmail.com>
45 lines
915 B
Markdown
45 lines
915 B
Markdown
---
|
|
id: 5900f5111000cf542c510023
|
|
title: 'Problem 420: 2x2 positive integer matrix'
|
|
challengeType: 5
|
|
forumTopicId: 302090
|
|
dashedName: problem-420-2x2-positive-integer-matrix
|
|
---
|
|
|
|
# --description--
|
|
|
|
A positive integer matrix is a matrix whose elements are all positive integers.
|
|
|
|
Some positive integer matrices can be expressed as a square of a positive integer matrix in two different ways. Here is an example:
|
|
|
|
We define F(N) as the number of the 2x2 positive integer matrices which have a trace less than N and which can be expressed as a square of a positive integer matrix in two different ways. We can verify that F(50) = 7 and F(1000) = 1019.
|
|
|
|
Find F(107).
|
|
|
|
# --hints--
|
|
|
|
`euler420()` should return 145159332.
|
|
|
|
```js
|
|
assert.strictEqual(euler420(), 145159332);
|
|
```
|
|
|
|
# --seed--
|
|
|
|
## --seed-contents--
|
|
|
|
```js
|
|
function euler420() {
|
|
|
|
return true;
|
|
}
|
|
|
|
euler420();
|
|
```
|
|
|
|
# --solutions--
|
|
|
|
```js
|
|
// solution required
|
|
```
|