We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
I've thought about it for an hour, and still don't understand this step. I've read the wikipedia page on Fermat's little theorem, and am still very confused as to what/why/how to get this step:
≡ 4/(−2∗10p−2)(modp)
≡ 4/(−2∗700000005)(modp)
Can you please explain further? Is "p" (10^9 + 7)? in that case, does 10^(p-2) turn into 10^(1000000007-2)? if so... that number is SO large!
Cookie support is required to access HackerRank
Seems like cookies are disabled on this browser, please enable them to open this website
Expressions V2
You are viewing a single comment's thread. Return to all comments →
I've thought about it for an hour, and still don't understand this step. I've read the wikipedia page on Fermat's little theorem, and am still very confused as to what/why/how to get this step:
≡ 4/(−2∗10p−2)(modp)
≡ 4/(−2∗700000005)(modp)
Can you please explain further? Is "p" (10^9 + 7)? in that case, does 10^(p-2) turn into 10^(1000000007-2)? if so... that number is SO large!