I don't know what's wrong, it's like a dead loop.
PHP Code
Result (), function result () {while ($_post["M"]&&$_post["n"]) {$outmap = array ( 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15); $arr [20]=array (0); $j =0;do{for ($t =0; $t <$_post["n"];++ $t) { $array =array ($arr [$t]); echo $outmap [$array]; } echo "\ n"; $j + +; echo $j;} while (Combinatorics ($arr, $_post["M"],$_post["n"]));}} function combinatorics ($arr, $NMAXELM, $nDepth) { $n = $nDepth-1; for (+ + $arr [$n]; $n >=0&& $arr [$n]>= $nMaxElm; + + $arr [--$n]); if ($n <0) return 0; for ($t = $n +1; $t < $nDepth; + + $t) $arr [$t] = $arr [$n]; return 1;}? >
------Solution--------------------
Estimate landlord to put while ($_post["M"]&&$_post["n"])
Change to if ($_post["M"]&&$_post["n"]) your program will output you the desired results.
discuss
PHP Code
Result ();
function result ()
{
while ($_post["M"]&&$_post["n"])
{
$outmap = Array (1,2,3,4,5,6,7,8,9,10,11,12,13,14,15);
$arr [20]=array (0);
$j = 0;
do{
For ...
------Solution--------------------
PHP Code