* 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>
43 lines
961 B
Markdown
43 lines
961 B
Markdown
---
|
|
id: 5900f4041000cf542c50ff17
|
|
title: 'Problem 152: Writing one half as a sum of inverse squares'
|
|
challengeType: 5
|
|
forumTopicId: 301783
|
|
dashedName: problem-152-writing-one-half-as-a-sum-of-inverse-squares
|
|
---
|
|
|
|
# --description--
|
|
|
|
There are several ways to write the number 1/2 as a sum of inverse squares using distinct integers.
|
|
|
|
For instance, the numbers {2,3,4,5,7,12,15,20,28,35} can be used:
|
|
|
|
In fact, only using integers between 2 and 45 inclusive, there are exactly three ways to do it, the remaining two being: {2,3,4,6,7,9,10,20,28,35,36,45} and {2,3,4,6,7,9,12,15,28,30,35,36,45}. How many ways are there to write the number 1/2 as a sum of inverse squares using distinct integers between 2 and 80 inclusive?
|
|
|
|
# --hints--
|
|
|
|
`euler152()` should return 301.
|
|
|
|
```js
|
|
assert.strictEqual(euler152(), 301);
|
|
```
|
|
|
|
# --seed--
|
|
|
|
## --seed-contents--
|
|
|
|
```js
|
|
function euler152() {
|
|
|
|
return true;
|
|
}
|
|
|
|
euler152();
|
|
```
|
|
|
|
# --solutions--
|
|
|
|
```js
|
|
// solution required
|
|
```
|