Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

Re: How to generate restricted partitions of an integer

by fergal (Chaplain)
on Nov 11, 2004 at 16:12 UTC ( #407087=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    100 = 50 + 10 + 10 + 10 + 10 + 10
    
  2. or download this
    100 = 10 + 10 + 10 + 10 + 10 + 10 + 10 + 10 + 10 + 10
    
  3. or download this
    100
    50, 50
    ...
    5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5
    count = 46
    
  4. or download this
    use strict;
    use warnings;
    ...
     
      return @solns;
    }
    

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others meditating upon the Monastery: (4)
As of 2020-10-26 21:40 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    My favourite web site is:












    Results (254 votes). Check out past polls.

    Notices?