Project Euler #78: Coin partitions
Project Euler #78: Coin partitions
+ 0 comments Try Coin change algo in node js
+ 0 comments If you get stuck, don't forget to check out this video. The best explanation you need to know before solving this problem.
+ 0 comments Can't seem to figure out why I'm getting the wrong answer for 6 and 7. I'm not timing out. I'm using the recursive p[n] formula using the pentagonal numbers. Can anyone tell me is this the solution for the following test case (assume line breaks rather than spaces, it just doesn't post that way when I load the comment) 3 1000 10000 60000
709496666 17783467 895843280
+ 0 comments Keyword for this problem is integer partition algorithm.
There are many unreliable codes in the internet, so you should choose the one that has time = O(n^1.5)
+ 0 comments If you're failing test cases 6 and 7 due to Runtime Error it might be because you're reaching the maximum recursion depth, set the following will let you increase the limit:
import sys sys.setrecursionlimit(10**6)
Sort 28 Discussions, By:
Please Login in order to post a comment