- Currently I know how to calculate
nCr mod P, ( P = 1e9 + 7 )

when 1 <= n <= 1e6 but is there any way to calculate for 1 <= n <= 1e9.- If there are any resources please share.

1 Like

Similar problems for nCr mod p where n is large. Check its editorials.

Problem 1- Log In | HackerEarth

Problem 2- CodeChef: Practical coding for everyone