Files
freeCodeCamp/curriculum/challenges/english/10-coding-interview-prep/project-euler/problem-94-almost-equilateral-triangles.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

49 lines
1.1 KiB
Markdown

---
id: 5900f3ca1000cf542c50fedd
title: 'Problem 94: Almost equilateral triangles'
challengeType: 5
forumTopicId: 302211
dashedName: problem-94-almost-equilateral-triangles
---
# --description--
It is easily proved that no equilateral triangle exists with integral length sides and integral area. However, the <dfn>almost equilateral triangle</dfn> 5-5-6 has an area of 12 square units.
We shall define an <dfn>almost equilateral triangle</dfn> to be a triangle for which two sides are equal and the third differs by no more than one unit.
Find the sum of the perimeters of all <dfn>almost equilateral triangle</dfn> with integral side lengths and area and whose perimeters do not exceed one billion (1,000,000,000).
# --hints--
`almostEquilateralTriangles()` should return a number.
```js
assert(typeof almostEquilateralTriangles() === 'number');
```
`almostEquilateralTriangles()` should return 518408346.
```js
assert.strictEqual(almostEquilateralTriangles(), 518408346);
```
# --seed--
## --seed-contents--
```js
function almostEquilateralTriangles() {
return true;
}
almostEquilateralTriangles();
```
# --solutions--
```js
// solution required
```