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 :
http://discuss.codechef.com/questions/4698/use-of-modulo-1000007-in-competitions
You will need to precompute factorials and use the idea of multiplicative inverse .