2018-09-30 22:01:58 +00:00
|
|
|
---
|
|
|
|
id: 5900f50f1000cf542c510021
|
|
|
|
challengeType: 5
|
|
|
|
title: 'Problem 418: Factorisation triples'
|
|
|
|
---
|
|
|
|
|
|
|
|
## Description
|
|
|
|
<section id='description'>
|
|
|
|
Let n be a positive integer. An integer triple (a, b, c) is called a factorisation triple of n if: 1 ≤ a ≤ b ≤ c
|
|
|
|
a·b·c = n.
|
|
|
|
|
|
|
|
Define f(n) to be a + b + c for the factorisation triple (a, b, c) of n which minimises c / a. One can show that this triple is unique.
|
|
|
|
|
|
|
|
|
|
|
|
For example, f(165) = 19, f(100100) = 142 and f(20!) = 4034872.
|
|
|
|
|
|
|
|
|
|
|
|
Find f(43!).
|
|
|
|
</section>
|
|
|
|
|
|
|
|
## Instructions
|
|
|
|
<section id='instructions'>
|
|
|
|
|
|
|
|
</section>
|
|
|
|
|
|
|
|
## Tests
|
|
|
|
<section id='tests'>
|
|
|
|
|
|
|
|
```yml
|
2018-10-04 13:37:37 +00:00
|
|
|
tests:
|
|
|
|
- text: <code>euler418()</code> should return 1177163565297340400.
|
2018-10-20 18:02:47 +00:00
|
|
|
testString: assert.strictEqual(euler418(), 1177163565297340400, '<code>euler418()</code> should return 1177163565297340400.');
|
2018-09-30 22:01:58 +00:00
|
|
|
|
|
|
|
```
|
|
|
|
|
|
|
|
</section>
|
|
|
|
|
|
|
|
## Challenge Seed
|
|
|
|
<section id='challengeSeed'>
|
|
|
|
|
|
|
|
<div id='js-seed'>
|
|
|
|
|
|
|
|
```js
|
|
|
|
function euler418() {
|
|
|
|
// Good luck!
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
|
|
|
|
euler418();
|
|
|
|
```
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</section>
|
|
|
|
|
|
|
|
## Solution
|
|
|
|
<section id='solution'>
|
|
|
|
|
|
|
|
```js
|
|
|
|
// solution required
|
|
|
|
```
|
|
|
|
</section>
|