Require help regarding TLE in a question

Hey
I am not able to understand why i am getting TLE in the given question.
According to me it will take O(T*log(n)) time which is under the limit.
also the matrix exponentiation function given in the question has been used correctly many times
Solution:- https://www.codechef.com/viewsolution/35732213

Can anybody please help.

Consider the test input:

1
1
2 Likes

Thanks a lot.

1 Like

good to see you back!!

3 Likes