Euromillions oneliner
olus
created: 2006-02-03 08:20:48
Guaranteed the winner key, if you run it enough times

perl -le '
                   @l=(1..49);@i=
                (1..9);       sub z{
               splice(
              @_,rand@
              _,1);}sub Y{push@@,
              z@_;}*_=*l;Y@_;Y@_;
              Y@_;Y@_;
              Y@_;*_=*
              i;Y@_;Y@_;$,=" ";
              sub l{print+sort{
              $a<=>$b}
                @_;}l+       splice
                   (@@,0,5); l@@;
'
Re: Euromillions oneliner
created: 2006-02-03 14:42:41
HUmmm... this code have a error, no?
2 30 30 34 45
3 8
:-)
Re^2: Euromillions oneliner
created: 2006-02-03 16:32:42
And you were expecting to get the right key at the first time?
But hey, if you win, just remember who's your friend (c:

Cheers and best luck

--
olus
Re: Euromillions oneliner
created: 2006-02-03 17:14:25
Guaranteed the winner key, if you run it enough times
Nothing's guaranteed, my friend. There's nothing preventing your program from outputting the same combo over and over again. You wouldn't expect it, but it's not guaranteed that it won't. Cool obfuscation, though. :)

thor

The only easy day was yesterday

perlmonks.org content © perlmonks.org and explorer, olus, thor

prlmnks.org © 2006 edmund von der burg (eccles & toad)

v 0.03