Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
PerlMonks  

Re^2: Decimal Gray Code in 31 chars

by Xiong (Hermit)
on Jan 26, 2010 at 10:27 UTC ( [id://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.

Replies are listed 'Best First'.
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
Domain Nodelet?
Node Status?
node history
Node Type: note [id://819673]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others exploiting the Monastery: (8)
As of 2024-04-23 10:00 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found