Files
freeCodeCamp/curriculum/challenges/english/10-coding-interview-prep/project-euler/problem-440-gcd-and-tiling.md
Oliver Eyton-Williams ee1e8abd87 feat(curriculum): restore seed + solution to Chinese (#40683)
* feat(tools): add seed/solution restore script

* chore(curriculum): remove empty sections' markers

* chore(curriculum): add seed + solution to Chinese

* chore: remove old formatter

* fix: update getChallenges

parse translated challenges separately, without reference to the source

* chore(curriculum): add dashedName to English

* chore(curriculum): add dashedName to Chinese

* refactor: remove unused challenge property 'name'

* fix: relax dashedName requirement

* fix: stray tag

Remove stray `pre` tag from challenge file.

Signed-off-by: nhcarrigan <nhcarrigan@gmail.com>

Co-authored-by: nhcarrigan <nhcarrigan@gmail.com>
2021-01-12 19:31:00 -07:00

964 B
Raw Blame History

id, title, challengeType, forumTopicId, dashedName
id title challengeType forumTopicId dashedName
5900f5241000cf542c510037 Problem 440: GCD and Tiling 5 302112 problem-440-gcd-and-tiling

--description--

We want to tile a board of length n and height 1 completely, with either 1 × 2 blocks or 1 × 1 blocks with a single decimal digit on top:

For example, here are some of the ways to tile a board of length n = 8:

Let T(n) be the number of ways to tile a board of length n as described above.

For example, T(1) = 10 and T(2) = 101.

Let S(L) be the triple sum ∑a,b,c gcd(T(ca), T(cb)) for 1 ≤ a, b, c ≤ L. For example: S(2) = 10444 S(3) = 1292115238446807016106539989 S(4) mod 987 898 789 = 670616280.

Find S(2000) mod 987 898 789.

--hints--

euler440() should return 970746056.

assert.strictEqual(euler440(), 970746056);

--seed--

--seed-contents--

function euler440() {

  return true;
}

euler440();

--solutions--

// solution required