Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
PerlMonks  

Re^4: list of four digit lock combinations without repeated digits

by usemodperl (Beadle)
on Jun 21, 2018 at 08:18 UTC ( #1217103=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    time perl -MAlgorithm::Combinatorics=:all -wle'
    my $i=variations_with_repetition(["a".."z"],$ARGV[0]); 
    my @x; push @x, map {s/ //gr} qq[@$_] while $_=$i->next; 
    print scalar @x' 4
    
  2. or download this
    perl -d:NYTProf -MAlgorithm::Combinatorics=:all -wle'
    my $i=variations_with_repetition(["a".."z"],$ARGV[0]); 
    my @x; push @x, map {s/ //gr} qq[@$_] while $_=$i->next; 
    print scalar @x' 4; nytprofhtml --open
    

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others pondering the Monastery: (5)
As of 2019-07-17 18:22 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?