Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Totally different number of lines. Also Perl. 24 lines part 1 (OK, with some diagnosis printing) and 15 for part 2. (That includes use strict;/use warnings; and a few empty lines for both.)

For part 1, with 'time' got real 0m2.865s, user 0m2.780s on a T60 Lenovo/"IBM". I used a few minutes to think about the brute force, which probably saved me half the execution time.

In pure percentage of loss/earn, those minutes for three seconds was probably the worst business of my life... :-) You can take the C/C++ compiler from the old nerd, but you can't stop him from doing premature optimization. :-)



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: