It's sometimes easier to just join the numbers form 1 to 300000 and take the first 10^6 digits of that.
It also helps to have a repl-loop so you can quickly try out how long the concatenation of 1..300000 takes and correct the number to a better approximation in a few steps.
(... types some quick lines to an interpreter ... things like # ; <@":"0 i.3e5 and 01234567891011121314151617181920212223242526272829303132333435363738394041424344 flicker on the screen ... yep, 1..2e5 is enough)
Yeah, I'm not a lazy languages guy. Quite the opposite. Especially for quick calculations like this. How did you guess?
In reply to Re: [perl 6] re reduction operators
by ambrus
in thread [perl 6] re reduction operators
by blazar
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |