in reply to Christmas Tree
some perl golfing for xmas-trees! 8 )
DB<2> printf"%20d%d\n",(4**$_)x2for 1..17 44 1616 6464 256256 10241024 40964096 1638416384 6553665536 262144262144 10485761048576 41943044194304 1677721616777216 6710886467108864 268435456268435456 10737418241073741824 -1-1 -1-1 DB<3> printf'%20d%1$d'.$/,4**$_ for 1..17 44 1616 6464 256256 10241024 40964096 1638416384 6553665536 262144262144 10485761048576 41943044194304 1677721616777216 6710886467108864 268435456268435456 10737418241073741824 -1-1 -1-1 DB<4> ($x=4**$_)=~y/1-9/"/,printf"%22s%s\n",($x)x2for 1..20,0,0 "" """" """" """""" "0"""0"" "0"""0"" """""""""" """""""""" """""""""""" "0""""""0""""" """""0""""""0" """""""""""""""" """0"""""""0"""" """""""""""""""""" "0"""""""""0"""""""" """""""""""""""""""" """""""""""""""""""""" """""""""""""""""""""" """""""0"""""""""""0"""" "0""""""""""""0""""""""""" "" ""
UPDATE: Maybe someone knows how to further shorten the last, decorated example!
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^2: Christmas Tree
by mtve (Deacon) on Jan 11, 2009 at 11:56 UTC | |
by LanX (Saint) on Jan 11, 2009 at 17:55 UTC | |
by mtve (Deacon) on Jan 12, 2009 at 07:26 UTC | |
Re^2: Christmas Tree
by LanX (Saint) on Dec 23, 2013 at 22:11 UTC | |
Re^2: Christmas Tree
by LanX (Saint) on Dec 17, 2012 at 22:59 UTC | |
Re^2: Christmas Tree
by LanX (Saint) on Dec 22, 2010 at 13:59 UTC |
In Section
Obfuscated Code