Why is matrix exponentiation for Fibonacci numbers not working on big values for this Hacker Earth problem ?

Revision en1, by ghoshsai5000, 2017-04-16 16:10:15

I have been trying to solve this Hacker Earth problem and it is reduced to finding the Fibonacci numbers. However, I am getting wrong answers for big values.

Here is my code. Can someone tell me what is wrong ?

Tags hackerearth, #matrix exponentialtion, big integers

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en1 English ghoshsai5000 2017-04-16 16:10:15 539 Initial revision (published)