Files
freeCodeCamp/curriculum/challenges/english/10-coding-interview-prep/project-euler/problem-397-triangle-on-parabola.md
Oliver Eyton-Williams ee1e8abd87 feat(curriculum): restore seed + solution to Chinese (#40683)
* 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>
2021-01-12 19:31:00 -07:00

43 lines
796 B
Markdown

---
id: 5900f4f91000cf542c51000c
title: 'Problem 397: Triangle on parabola'
challengeType: 5
forumTopicId: 302062
dashedName: problem-397-triangle-on-parabola
---
# --description--
On the parabola y = x2/k, three points A(a, a2/k), B(b, b2/k) and C(c, c2/k) are chosen.
Let F(K, X) be the number of the integer quadruplets (k, a, b, c) such that at least one angle of the triangle ABC is 45-degree, with 1 ≤ k ≤ K and -X ≤ a &lt; b &lt; c ≤ X.
For example, F(1, 10) = 41 and F(10, 100) = 12492. Find F(106, 109).
# --hints--
`euler397()` should return 141630459461893730.
```js
assert.strictEqual(euler397(), 141630459461893730);
```
# --seed--
## --seed-contents--
```js
function euler397() {
return true;
}
euler397();
```
# --solutions--
```js
// solution required
```