patternlock
Posted: Sun Aug 22, 2021 7:51 am
www.FiveTechSoft.com
https://forums.fivetechsupport.com/
https://forums.fivetechsupport.com/viewtopic.php?f=46&t=40767
function Main()
? NCombinations( 9, [from 3 to 9] )
// and I think the above is not correct as several solutions may be impossible
return nil
function NFactorial( n )
local nResult := 1
local x
for x = n to 1 step -1
nResult := nResult * x
Next x
return nResult
function NCombinations( n, m )
return nFactorial( n ) / ( nFactorial( m ) * nFactorial ( n - m ) )