1.4 KiB
1.4 KiB
id | challengeType | title | forumTopicId |
---|---|---|---|
5900f3ca1000cf542c50fedd | 5 | Problem 94: Almost equilateral triangles | 302211 |
Description
It is easily proved that no equilateral triangle exists with integral length sides and integral area. However, the almost equilateral triangle 5-5-6 has an area of 12 square units.
We shall define an almost equilateral triangle 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 almost equilateral triangle with integral side lengths and area and whose perimeters do not exceed one billion (1,000,000,000).
Instructions
Tests
tests:
- text: <code>almostEquilateralTriangles()</code> should return a number.
testString: assert(typeof almostEquilateralTriangles() === 'number');
- text: <code>almostEquilateralTriangles()</code> should return 518408346.
testString: assert.strictEqual(almostEquilateralTriangles(), 518408346);
Challenge Seed
function almostEquilateralTriangles() {
return true;
}
almostEquilateralTriangles();
Solution
// solution required