Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
PerlMonks  

Re: mini-golf: convert integer into list of powers of two

by moritz (Cardinal)
on May 24, 2012 at 08:13 UTC ( #972199=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    n_0 = 1
    n_i = n_(i-1) + n_(i-1)
    
  2. or download this
    say (1 x 5) =~ /^(1|((?1))\2)*$/
    
  3. or download this
    (1 x 5) =~ /^(?:(1|((?=1)(?1))\2)(?{ say length $1 }))*$/
    

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (5)
As of 2021-05-14 07:45 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Perl 7 will be out ...





    Results (149 votes). Check out past polls.

    Notices?