Eugene van der Pijll wrote: > > 36, for both. However, my solution doesn't comply to one of the standard > rules of the TPR courses, and I can't test it. But it should work. > > (This is one of the challenges I consired and discarded for the May > contest, so I've thought about this already then.) >
Inspired by this intriguing email by Eugene, I tried a rand() approach. This is as far as I got (a one-based solution, at 108 after obvious compression is applied): #!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. Chris
