Files
freeCodeCamp/curriculum/challenges/english/10-coding-interview-prep/project-euler/problem-104-pandigital-fibonacci-ends.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.2 KiB
Raw Blame History

id, challengeType, title, forumTopicId
id challengeType title forumTopicId
5900f3d51000cf542c50fee6 5 Problem 104: Pandigital Fibonacci ends 301728

Description

The Fibonacci sequence is defined by the recurrence relation: Fn = Fn1 + Fn2, where F1 = 1 and F2 = 1. It turns out that F541, which contains 113 digits, is the first Fibonacci number for which the last nine digits are 1-9 pandigital (contain all the digits 1 to 9, but not necessarily in order). And F2749, which contains 575 digits, is the first Fibonacci number for which the first nine digits are 1-9 pandigital. Given that Fk is the first Fibonacci number for which the first nine digits AND the last nine digits are 1-9 pandigital, find k.

Instructions

Tests

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

Challenge Seed

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

euler104();

Solution

// solution required