in reply to Pi golf:
Taking advantage of jimt's observation, 36 chars:
$s+=6/$_**2for 1..10**6;print sqrt$s
$,=42;for(34,0,-3,9,-11,11,-17,7,-5){$*.=pack'c'=>$,+=$_}for(reverse s +plit//=>$* ){$%++?$ %%2?push@C,$_,$":push@c,$_,$":(push@C,$_,$")&&push@c,$"}$C[$# +C]=$/;($#C >$#c)?($ c=\@C)&&($ C=\@c):($ c=\@c)&&($C=\@C);$%=$|;for(@$c){print$_^ +$$C[$%++]}
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Pi golf:
by liverpole (Monsignor) on Sep 05, 2006 at 22:00 UTC | |
by truedfx (Monk) on Sep 07, 2006 at 13:13 UTC | |
by liverpole (Monsignor) on Sep 07, 2006 at 14:23 UTC |