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

Правка en1, от 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 ?

Теги hackerearth, #matrix exponentialtion, big integers

История

 
 
 
 
Правки
 
 
  Rev. Язык Кто Когда Δ Комментарий
en1 Английский ghoshsai5000 2017-04-16 16:10:15 539 Initial revision (published)