2 test cases getting passed


see this , use inverse to calculate the denominator parts

sir can u please explain this code a bit

see there is only one thing that you need to understand.
(a/b)%mod=(a*modular_inverse(b))%mod;

and my functions have calculated the factorials , now i just have to use the above formula on NcR.
NcR= N!/(R!*(N-R)!)=(N!*inv(R!)*inv(N-R!))%mod

jo bhi cheez denominator me hai usse inverse lekar numerator se multiply krdo and take mod.