A paper table cloth would have done the trick: 9 between 1 and 9, 9 between 10 and 99, 90 between 100 and 999 and 90 between 1,000 and 9,999. Total: 198 (your script starts at 0 so it gives 199.)
The interesting question is: for what upper number is the table cloth faster than the ruby script?
by Olivier — Dec 05
The interesting question is: for what upper number is the table cloth faster than the ruby script?
:-)