|laziness, impatience, and hubris|
Re: Golf: Movie style code cracker.by betterworld (Curate)
|on Sep 14, 2008 at 19:34 UTC||Need Help??|
Update: Adopted the required counting method, thus I have 108 characters, not 103.
Update 2: New version with 71 characters (however it would be a few (about 4) characters more if I hadn't copied a trick from BrowserUk; I'll elaborate in the spoiler tag):
(I must admit that I would probably not have figured out passing 15 to "-l" myself, but I saw that in BrowserUk's solution in this thread (while reading the spoiler in order to understand the counting)).
Caveat: The second version will probably not terminate for a 1-digit code.
Update 3: :-( I just noticed that my 71 character solution has the problem that it always prints "8" as the last digit. For the moment, I offer the following fix, which makes it 75 characters long (and I'll omit the spoiler tags as the contest seems to be over):
(And you can modify the 1e6 constant to shorten the runtime.)