Fibonacci meets gcd


showing TLE

reply plz…

@mohitmahi123,
Recursion is slow, specially when time constraints are tight, we should try to avoid it as much as possible.
Use __gcd(), rather than your own recursive one. Also, do matrix exponentiation iteratively rather than recursively.