freeCodeCamp/curriculum/challenges/italian/10-coding-interview-prep/project-euler/problem-226-a-scoop-of-blan...

877 B

id title challengeType forumTopicId dashedName
5900f4511000cf542c50ff62 Problem 226: A Scoop of Blancmange 5 301869 problem-226-a-scoop-of-blancmange

--description--

The blancmange curve is the set of points (x,y) such that 0 ≤ x ≤ 1 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

--hints--

euler226() should return 0.11316017.

assert.strictEqual(euler226(), 0.11316017);

--seed--

--seed-contents--

function euler226() {

  return true;
}

euler226();

--solutions--

// solution required