C(N,K)%M , where M is a prime number , N and K is very big number (N<=10^6), How is solution ?
@mehemmedv : Refer to this thread :
You will need to precompute factorials and use the idea of multiplicative inverse .
You’re welcome.
C(N,K)%M , where M is a prime number , N and K is very big number (N<=10^6), How is solution ?
@mehemmedv : Refer to this thread :
You will need to precompute factorials and use the idea of multiplicative inverse .
You’re welcome.