Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
PerlMonks  

Re^2: Code Golf: Four is magic

by thundergnat (Deacon)
on Jul 14, 2010 at 17:27 UTC ( #849578=note: print w/ replies, xml ) Need Help??


in reply to Re: Code Golf: Four is magic
in thread Code Golf: Four is magic

A modest improvement on your 229:
227 strokes

perl -E'@x="033544355436688779880066555766"=~/./g;$_=<>;chop;print;whi +le($_-4){split//,"99aabb87780";$x=4*!$_;$x+=hex(pop@_)*!!-$&+!!$1*($x +[$1]+7)+$x[$2+20]+$x[$3]while s/(.??)([^1]?)(1?.)$//;say" is $x.";pri +nt$_=$x}say" is magic."'


Comment on Re^2: Code Golf: Four is magic
Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others contemplating the Monastery: (13)
As of 2014-07-23 16:42 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My favorite superfluous repetitious redundant duplicative phrase is:









    Results (147 votes), past polls