Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

Re: Combinatorics problem.

by danaj (Friar)
on Dec 11, 2015 at 09:25 UTC ( [id://1149998]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    use ntheory ":all";
    my %seen;
    ...
        say $s unless $seen{$s}++;
      } scalar(@p);
    } 5,{n=>3};
    
  2. or download this
    3 1 1
    1 3 1
    ...
    2 2 1
    2 1 2
    1 2 2
    
  3. or download this
    $ perl -Mntheory=:all -E 'forcomp { say "@_" } 5,{n=>3}'
    1 1 3
    1 2 2
    ...
    2 1 2
    2 2 1
    3 1 1
    
  4. or download this
    use ntheory ":all";
    forpart {
    ...
            say "@_";
        } [@_];
    } 5,{n=>3};
    

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1149998]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others musing on the Monastery: (4)
As of 2024-04-24 18:03 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found