Hello CF community, I'm trying to solve this problem, the problem tells me that I have to calculate
in the numerator it will always be $$$\prod _{i = N-M+1}^{n} i$$$ and in the denominator will be $$$ \prod _{i=1}^{min(N, N-M)}i$$$ as the rest will cancel out
and this is my code:
but it gives me WA, I'm not really sure why I'm getting this. Any ideas?