param { number } n return { number } function factorial ( n ) { let total = 1 ; for ( let i = 1 ; i <= n ; i ++ ) { total *= i ; } return total ; } /**
 * 排列组合
 */ class Permu { constructor ( m , n ) { return factorial ( n ) / factorial ( m ) * factorial ( n - m ) ; } } export { Permu } ;