hoainiem's blog

By hoainiem, history, 3 months 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?

Read more »

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