You are viewing a single comment's thread. Return to all comments →
Can someone please tell me in layman terms, why do we do power of (MOD-2) for calculating inverse function for n?
#define MOD 1000000007 long long InverseFunc(ll n){ return pow(n,MOD-2); }
Seems like cookies are disabled on this browser, please enable them to open this website
Counting Perfect Subsequences
You are viewing a single comment's thread. Return to all comments →
Can someone please tell me in layman terms, why do we do power of (MOD-2) for calculating inverse function for n?