Professional Documents
Culture Documents
NCR For Larger Numbers - 5
NCR For Larger Numbers - 5
NCR For Larger Numbers - 5
n n!
Cr = r!(n−r)!
Still, in this case, numerator and denominator both will be above long long
range, so we can do this step by step.
26∗27∗28∗......∗49∗50 26∗27∗28∗......∗49∗50
= 25! = 2∗3∗4∗5∗....∗24∗25
and so on. . . This loop will run till r > 0 and numerator value will be the
answer.
1
den*=r;
return ans;