hoainiem's blog

By hoainiem, history, 2 years ago, In English

I have a problem about fibonacci numbers: ==================

let f[i] be the ith fibonacci number

f[i] = 1 (1 <= i <= 2)

f[i] = f[i-1] + f[i-2] (i > 2)

how can i calculate f[f[n]] mod M (n, M <= 10^9). anyone can help me?

Full text and comments »

  • Vote: I like it
  • +14
  • Vote: I do not like it