[closed]TAPALIN_use of MOD

please tell what is the problem in the following code.The code goes well till n=12 but gives wrong answer at n=13 as the modulo operation is not working fine.Please identify the problem :

You have to multiply with modular inverse of 25(not divide with 25). Use Fermat’s Little theorem to find modular multiplicative inverse of 25 modulo 1000000007( a prime number).


can you please tell where can i find details of the above mentioned theorem ??

check the editorial, there was a clear explanation on how to find it