Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
PerlMonks  

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

by toolic (Bishop)
on May 23, 2012 at 21:21 UTC ( #972106=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    #            1         2         3         4         5         
    #   12345678901234567890123456789012345678901234567890123456789
    perl -E'$n=pop;while(2**$i<=$n){$_.=2**$i.",";$i++}chop;say'          
    +  31
    
    1,2,4,8,16
    

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others pondering the Monastery: (3)
As of 2021-05-17 23:18 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Perl 7 will be out ...





    Results (170 votes). Check out past polls.

    Notices?