freeCodeCamp/curriculum/challenges/chinese/10-coding-interview-prep/project-euler/problem-258-a-lagged-fibona...

386 B
Raw Blame History

id title challengeType videoUrl
5900f46e1000cf542c50ff81 问题258滞后的斐波那契序列 5

--description--

序列定义为:

gk = 1对于0≤k≤1999gk = gk-2000 + gk-1999对于k≥2000。对于k = 1018找到gk mod 20092010。

--hints--

euler258()应该返回12747994。

assert.strictEqual(euler258(), 12747994);

--solutions--