Beefy Boxes and Bandwidth Generously Provided by pair Networks DiBona
Don't ask to ask, just ask
 
PerlMonks  

Re^2: Decimal Gray Code in 31 chars

by Xiong (Hermit)
on Jan 26, 2010 at 10:27 UTC ( #819673=note: print w/ replies, xml ) Need Help??


in reply to Re: Decimal Gray Code in 31 chars
in thread Decimal Gray Code in 31 chars

I also get for:

perl -E'print$_^$_/2for 0..pop' 15

Output:

0132675412131514101198

But for:

perl -E'say$_^$_/2for 0..pop' 15

I get:

0 1 3 2 6 7 5 4 12 13 15 14 10 11 9 8

I believe that was mtve's intent. Um, that's 20 chars of actual code.


Comment on Re^2: Decimal Gray Code in 31 chars
Select or Download Code
Re^3: Decimal Gray Code in 31 chars
by ambrus (Abbot) on Jan 27, 2010 at 09:32 UTC

    Actually my guess is rather perl -le'print$_^$_/2for 0..pop'

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others perusing the Monastery: (13)
As of 2013-05-21 10:25 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The best material for plates (tableware) is:









    Results (431 votes), past polls