in reply to Challenge: Number of unique ways to reach target sum
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:
|
---|