* fix: clean-up Project Euler 341-360 * fix: improve wording Co-authored-by: Sem Bauke <46919888+Sembauke@users.noreply.github.com> * fix: corrections from review Co-authored-by: Tom <20648924+moT01@users.noreply.github.com> Co-authored-by: Sem Bauke <46919888+Sembauke@users.noreply.github.com> Co-authored-by: Tom <20648924+moT01@users.noreply.github.com>
43 lines
773 B
Markdown
43 lines
773 B
Markdown
---
|
|
id: 5900f4d01000cf542c50ffe2
|
|
title: 'Problem 355: Maximal coprime subset'
|
|
challengeType: 5
|
|
forumTopicId: 302015
|
|
dashedName: problem-355-maximal-coprime-subset
|
|
---
|
|
|
|
# --description--
|
|
|
|
Define $Co(n)$ to be the maximal possible sum of a set of mutually co-prime elements from $\\{1, 2, \ldots, n\\}$. For example $Co(10)$ is 30 and hits that maximum on the subset $\\{1, 5, 7, 8, 9\\}$.
|
|
|
|
You are given that $Co(30) = 193$ and $Co(100) = 1356$.
|
|
|
|
Find $Co(200\\,000)$.
|
|
|
|
# --hints--
|
|
|
|
`maximalCoprimeSubset()` should return `1726545007`.
|
|
|
|
```js
|
|
assert.strictEqual(maximalCoprimeSubset(), 1726545007);
|
|
```
|
|
|
|
# --seed--
|
|
|
|
## --seed-contents--
|
|
|
|
```js
|
|
function maximalCoprimeSubset() {
|
|
|
|
return true;
|
|
}
|
|
|
|
maximalCoprimeSubset();
|
|
```
|
|
|
|
# --solutions--
|
|
|
|
```js
|
|
// solution required
|
|
```
|