Moduler Multiplicative inverse is not working under modulo 1e9+7!!!

Revision en1, by Dream_Coder10, 2021-04-18 17:09:19

why moduler multiplicative inverse is not working under modulo 1000000007 by fermats littile theorem ? let n=11 & k=3 ; n/k should be equal to 3. but its giving me 666666675. same thing goes for n=10 & k=4;

my code:

https://paste.ubuntu.com/p/s2m5q4JtMs/

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en2 English Dream_Coder10 2021-04-18 17:13:48 54
en1 English Dream_Coder10 2021-04-18 17:09:19 333 Initial revision (published)