freeCodeCamp/curriculum/challenges/portuguese/08-coding-interview-prep/project-euler/problem-324-building-a-towe...

1.2 KiB
Raw Blame History

id challengeType title videoUrl localeTitle
5900f4b11000cf542c50ffc3 5 Problem 324: Building a tower Problema 324: Construindo uma torre

Description

Seja f (n) o número de maneiras de preencher uma torre 3 × 3 × n com blocos de 2 × 1 × 1. Você tem permissão para girar os blocos da maneira que quiser; no entanto, rotações, reflexões, etc. da própria torre são contadas como distintas. Por exemplo (com q = 100000007): f (2) = 229, f (4) = 117805, f (10) mod q = 96149360, f (103) mod q = 24806056, f (106) mod q = 30808124.

Encontre f (1010000) mod 100000007.

Instructions

Tests

tests:
  - text: <code>euler324()</code> deve retornar 96972774.
    testString: 'assert.strictEqual(euler324(), 96972774, "<code>euler324()</code> should return 96972774.");'

Challenge Seed

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

euler324();

Solution

// solution required