欧拉计划 发表于 2017-1-13 15:23:56

题目258:推广的斐波那契数列

A lagged Fibonacci sequence

A sequence is defined as:


[*]gk = 1, for 0 ≤ k ≤ 1999
[*]gk = gk-2000 + gk-1999, for k ≥ 2000.


Find gk mod 20092010 for k = 1018.

题目:

一个数列如下定义:


[*]gk = 1,对于 0 ≤ k ≤ 1999
[*]gk = gk-2000 + gk-1999,对于 k ≥ 2000。


求 gk mod 20092010,对于 k = 1018。

页: [1]
查看完整版本: 题目258:推广的斐波那契数列