freeCodeCamp/curriculum/challenges/chinese/08-coding-interview-prep/project-euler/problem-104-pandigital-fibo...

1.2 KiB
Raw Blame History

id challengeType title videoUrl localeTitle
5900f3d51000cf542c50fee6 5 Problem 104: Pandigital Fibonacci ends 问题104Pandigital Fibonacci结束

Description

Fibonacci序列由递归关系定义Fn = Fn-1 + Fn-2其中F1 = 1且F2 = 1.事实证明包含113位数字的F541是第一个斐波那契数字其中最后九个数字是1-9 pandigital包含所有数字1到9但不一定按顺序。 F2749包含575个数字是第一个斐波那契数字前九个数字是1-9 pandigital。鉴于Fk是第一个斐波纳契数前九个数字和后九个数字是1-9 pandigital找到k。

Instructions

Tests

tests:
  - text: <code>euler104()</code>应返回329468。
    testString: 'assert.strictEqual(euler104(), 329468, "<code>euler104()</code> should return 329468.");'

Challenge Seed

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

euler104();

Solution

// solution required