Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

integer partition golf

by jimt (Chaplain)
on Oct 18, 2006 at 17:52 UTC ( [id://579156]=obfuscated: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    
    sub p{my($n,@e,$o)=@_;print if!$_{$_=join$",sort@_,$/}++;p(++$o,--$n,@
    +e)while$n-1}p(shift)
    
  2. or download this
    
    sub p{my($n,@e,$o)=@_;$_{$_=join$",sort@_,$/}++||print;p(++$o,$n,@e)wh
    +ile--$n}p pop
    
  3. or download this
    
    sub p{my(@e,$o)=@_;$_{$_=join$",sort@_,$/}++||print;p(++$o,@e)while--$
    +e[0]}p pop
    
  4. or download this
    
    sub p{
    ...
    }
    p(shift)
    
  5. or download this
    
    my($n,@e,$o) = @_;
    ...
    my @e = @_;
    my $o;
    
  6. or download this
    
    print if ! $_{$_ = join$",sort@_,$/}++;
    
  7. or download this
    
    p(5)
    ...
            calls p(1,1,1,1,1)
              outputs 1,1,1,1,1
    

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: obfuscated [id://579156]
Approved by Limbic~Region
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others cooling their heels in the Monastery: (6)
As of 2024-04-25 08:06 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found