freeCodeCamp/curriculum/challenges/russian/08-coding-interview-prep/project-euler/problem-258-a-lagged-fibonacci-sequence.russian.md

985 B
Raw Blame History

id, challengeType, title, forumTopicId, localeTitle
id challengeType title forumTopicId localeTitle
5900f46e1000cf542c50ff81 5 Problem 258: A lagged Fibonacci sequence 301906 Задача 258: Последовательность Фибоначчи с запаздыванием

Description

Последовательность определяется как:

gk = 1, для 0 ≤ k ≤ 1999 gk = gk-2000 + gk-1999, для k ≥ 2000. Найдите gk mod 20092010 для k = 1018.

Instructions

Tests

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

Challenge Seed

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

euler258();

Solution

// solution required