Files
freeCodeCamp/curriculum/challenges/english/10-coding-interview-prep/project-euler/problem-355-maximal-coprime-subset.english.md
Oliver Eyton-Williams bd68b70f3d Feat: hide blocks not challenges (#39504)
* fix: remove isHidden flag from frontmatter

* fix: add isUpcomingChange

Co-authored-by: Ahmad Abdolsaheb <ahmad.abdolsaheb@gmail.com>

* feat: hide blocks not challenges

Co-authored-by: Ahmad Abdolsaheb <ahmad.abdolsaheb@gmail.com>

Co-authored-by: Ahmad Abdolsaheb <ahmad.abdolsaheb@gmail.com>
2020-09-03 15:07:40 -07:00

927 B

id, challengeType, title, forumTopicId
id challengeType title forumTopicId
5900f4d01000cf542c50ffe2 5 Problem 355: Maximal coprime subset 302015

Description

Define Co(n) to be the maximal possible sum of a set of mutually co-prime elements from {1, 2, ..., 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(200000).

Instructions

Tests

tests:
  - text: <code>euler355()</code> should return 1726545007.
    testString: assert.strictEqual(euler355(), 1726545007);

Challenge Seed

function euler355() {
  // Good luck!
  return true;
}

euler355();

Solution

// solution required