TPK algorithm: Difference between revisions

Content deleted Content added
Perl golf: 147 -> 91
Line 26:
 
==Perl golf==
The following [[Perl]] implementation is 14791 [[byte]]s. It is shown here on several lines due to page width considerations, but it could be run as a one-liner.
 
<pre>
while($.<=9){$_[10-$.]=sqrt(abs($x=<>))+5*$x**3};
print map$_.$/,reverse map"@$_",
map[$$_[0],$ print(($_[1]>400?'"TOO LARGE'":$$_[1]])."\n"),@_
map[$$_[0],sub{5*$_[0]**3+sqrt abs$_[0]}->($$_[1])],
map[$_+0,$_=<>],0..10
</pre>