in reply to Golf: Movie style code cracker.
OK, I'll bite. 139 characters.
perl -le'sub r{join"",map{int rand 10}1..$_[0]}$C=r($l=shift);while($t +!=$C){print"$t";($r)="$t-$C"=~/^(.*).*-\1/;$t=$r.r($l-length$r)}print +"$t"' 10
Some bug-like things:
It does not take 2.5 minutes to run. On my machine, it's less than .1 sec, actually. Perhaps a slow motion camera or digital special effects department could compensate.
|
|---|