代码long C(int m, int n) { if(m < n) swap(m, n); long res = 1; for(int i = m+1, j=1; i <= m+n; i++, j++){ // Instead of taking factorial, keep on multiply & divide res *= i; res /= j; } return res;}例题链
摘要由CSDN通过智能技术生成
代码
longC(int m,int n){
if(m < n)swap(m, n);long res =1;for
代码long C(int m, int n) { if(m < n) swap(m, n); long res = 1; for(int i = m+1, j=1; i <= m+n; i++, j++){ // Instead of taking factorial, keep on multiply & divide res *= i; res /= j; } return res;}例题链