56 lines
1.4 KiB
Markdown
56 lines
1.4 KiB
Markdown
|
---
|
||
|
id: 5900f4c81000cf542c50ffd9
|
||
|
challengeType: 5
|
||
|
title: 'Problem 347: Largest integer divisible by two primes'
|
||
|
videoUrl: ''
|
||
|
localeTitle: 'Problema 347: Maior número inteiro divisível por dois primos'
|
||
|
---
|
||
|
|
||
|
## Description
|
||
|
<section id="description"> O maior inteiro ≤ 100 que é divisível apenas pelos dois primos 2 e 3 é 96, como 96 = 32 * 3 = 25 * 3. Para dois primos distintos p e q seja M (p, q, N) o maior número inteiro positivo ≤N divisível por ambos p e q e M (p, q, N) = 0 se tal número inteiro positivo não existir. <p> Por exemplo, M (2,3,100) = 96. M (3,5,100) = 75 e não 90 porque 90 é divisível por 2, 3 e 5. Também M (2,73,100) = 0 porque não existe um inteiro positivo ≤ 100 que seja divisível por ambos 2 e 73. </p><p> Seja S (N) a soma de todos os M distintos (p, q, N). S (100) = 2262. </p><p> Encontre S (10 000 000). </p></section>
|
||
|
|
||
|
## Instructions
|
||
|
<section id="instructions">
|
||
|
</section>
|
||
|
|
||
|
## Tests
|
||
|
<section id='tests'>
|
||
|
|
||
|
```yml
|
||
|
tests:
|
||
|
- text: <code>euler347()</code> deve retornar 11109800204052.
|
||
|
testString: 'assert.strictEqual(euler347(), 11109800204052, "<code>euler347()</code> should return 11109800204052.");'
|
||
|
|
||
|
```
|
||
|
|
||
|
</section>
|
||
|
|
||
|
## Challenge Seed
|
||
|
<section id='challengeSeed'>
|
||
|
|
||
|
<div id='js-seed'>
|
||
|
|
||
|
```js
|
||
|
function euler347() {
|
||
|
// Good luck!
|
||
|
return true;
|
||
|
}
|
||
|
|
||
|
euler347();
|
||
|
|
||
|
```
|
||
|
|
||
|
</div>
|
||
|
|
||
|
|
||
|
|
||
|
</section>
|
||
|
|
||
|
## Solution
|
||
|
<section id='solution'>
|
||
|
|
||
|
```js
|
||
|
// solution required
|
||
|
```
|
||
|
</section>
|