龙听期货论坛's Archiver

龙听 发表于 2022-11-2 11:42

【Permutation】

[code]inputs: Num( numericsimple ), NumChosen( numericsimple ) ;

condition1 = NumChosen >= 1 and Num >= NumChosen ;
if condition1 then
        Permutation = Factorial( Num ) / Factorial( Num - IntPortion( NumChosen ) )
else
        Permutation = -1 ;
[/code]

页: [1]