Files
freeCodeCamp/curriculum/challenges/english/10-coding-interview-prep/project-euler/problem-226-a-scoop-of-blancmange.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

1.1 KiB
Raw Blame History

id, challengeType, title, forumTopicId
id challengeType title forumTopicId
5900f4511000cf542c50ff62 5 Problem 226: A Scoop of Blancmange 301869

Description

The blancmange curve is the set of points (x,y) such that 0x1 and ,where s(x) = the distance from x to the nearest integer.

The area under the blancmange curve is equal to ½, shown in pink in the diagram below.

Let C be the circle with centre (¼,½) and radius ¼, shown in black in the diagram.

What area under the blancmange curve is enclosed by C?Give your answer rounded to eight decimal places in the form 0.abcdefgh

Instructions

Tests

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

Challenge Seed

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

euler226();

Solution

// solution required