I've got this result from a quick-and-dirty script:
(Update: this agrees with blokhead's and Limbic~Region's result.)And here's the script itself. It's not perl but ruby.
Update: It turns out that the statement I put in there as a progress indicator does very much redundant calculations, so removing it makes the code twice as fast:
In reply to Re: Challenge: Number of unique ways to reach target sum
by ambrus
in thread Challenge: Number of unique ways to reach target sum
by Limbic~Region
For: | Use: | ||
& | & | ||
< | < | ||
> | > | ||
[ | [ | ||
] | ] |