Files
freeCodeCamp/curriculum/challenges/english/10-coding-interview-prep/project-euler/problem-114-counting-block-combinations-i.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.3 KiB

id, challengeType, title, forumTopicId
id challengeType title forumTopicId
5900f3e01000cf542c50fef2 5 Problem 114: Counting block combinations I 301740

Description

A row measuring seven units in length has red blocks with a minimum length of three units placed on it, such that any two red blocks (which are allowed to be different lengths) are separated by at least one black square. There are exactly seventeen ways of doing this.

How many ways can a row measuring fifty units in length be filled? NOTE: Although the example above does not lend itself to the possibility, in general it is permitted to mix block sizes. For example, on a row measuring eight units in length you could use red (3), black (1), and red (4).

Instructions

Tests

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

Challenge Seed

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

euler114();

Solution

// solution required