Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

Re: Combinatorics problem. (NestedLoops)

by tye (Sage)
on Dec 11, 2015 at 15:16 UTC ( [id://1150044]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    my $p = 7;  # Number of pigeon holes.
    my $c = 12; # Number of cards
    ...
        for my $s2 ( $s1..$p ) {
            for my $s3 ( $s2..$p ) {
                ... Need $c-$p loops
    
  2. or download this
    #!/usr/bin/perl -w
    use strict;
    ...
        $p[$_-1]++ for @s;
        print "@p\n";
    }
    

Log In?
Username:
Password:

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

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

    No recent polls found