Help for this page

Select Code to Download


  1. or download this
    sub P {
    $_[0]?map{my$c=$_;map[$c,@$_],P($_[0]-$c)}(1..$_[0]):[]
    }
    
  2. or download this
    sub P {
    my$b=$_[1]||$_[0];
    $_[0]?map{my$c=$_;map[$c,@$_],P($_[0]-$c,$c)}grep{$_<=$b}(1..$_[0]):[]
    }