I think if in e.g. "Example 2" the $to was e.g. 8500, then your solution would find all 3 pairs again and report false positives. I.e. stronger accounting is required. I'm not sure I'm happy with my own accounting, on the 2nd thought.
If $count in "Example 3" was not "5" but "1", then how many items would be added to the result for "1428570"? 1 or 5? The "at least" in the wording of the challenge seems to imply that "1". Or such is my interpretation (PWC ambiguous as usual). But then it follows, that you can't break out early with "next I;". Because there will be false positives later if $to was higher (see?). I had a similar "next OUTER;" in initial drafts, but then decided against it.
In reply to Re^2: Faster (but uglier) PWC 350-2 solutions
by Anonymous Monk
in thread Faster (but uglier) PWC 350-2 solutions
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |