in reply to Canadian Cryptography Contest
Apparently. :-)
Golf: (just the most obvious things)
perl -pe's!(\d)(\d)(\d)/!chr(64+$1*16+$2*4+$3)!ge' codedataKnow thine commandline switches.
Update: Doh, tilly was a few minutes faster.
Update 2: Slightly longer but I like this better:
perl -pe's!(\d..)/!$x=1;($x*=4)+=$_ for split//,$1;chr$x!ge' codedataUpdate 3: Thanks to tadman:
perl -pe's!(\d..)/!$x=1;($x*=4)+=$_ for$1=~/./g;chr$x!ge' codedataMakeshifts last the longest.
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^2: Canadian Cryptography Contest
by tadman (Prior) on Jan 22, 2002 at 20:20 UTC | |
by tilly (Archbishop) on Jan 22, 2002 at 21:40 UTC | |
by tadman (Prior) on Jan 23, 2002 at 00:37 UTC | |
by tilly (Archbishop) on Jan 23, 2002 at 00:55 UTC | |
by Aristotle (Chancellor) on Jan 23, 2002 at 18:48 UTC |