We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
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
Cookie support is required to access HackerRank
Seems like cookies are disabled on this browser, please enable them to open this website
Project Euler #78: Coin partitions
You are viewing a single comment's thread. Return to all 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