Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw
 
PerlMonks  

Re: Challenge: Number of unique ways to reach target sum

by ambrus (Abbot)
on Feb 14, 2006 at 22:20 UTC ( [id://530251]=note: print w/replies, xml ) Need Help??


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:

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://530251]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others imbibing at the Monastery: (6)
As of 2024-04-23 21:35 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found