develooper Front page | | Postings from July 2002

Re: more minigolf

Thread Previous | Thread Next
Eugene van der Pijll
July 11, 2002 10:01
Re: more minigolf
Message ID:
En op 11 juli 2002 sprak Chris Dolan:
> #!perl
> use Math::Random;
> $z=pop;
> map$_>0&&$_<$z&&$_[$_]++,random_normal 4e4,$z/2;
> $_=int 0.5+$_/$_[-1]for@_;
> print"@_\n"
> It *usually* succeeds up to N=5, but fails after that.

If you only want to go up to 4, you can do a lot better than that (27).


Along the same lines, for N<8 (40):


Not that the story need be long, but it will take a long while to make
it short. -- |-|enry |)avid 7`horeau

Thread Previous | Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About