Help for this page

Select Code to Download


  1. or download this
    my @dispersal;
    my $maxpow = int(log($cash)/log(2) - 1);
    ...
    $dispersal[$#dispersal+1] = $cash - 2**($maxpow +1)+1;
    
    my @envelope = sort { $a <=> $b } @dispersal;