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.
For n >= 0 and n <= 200 I first perform a table lookup and if necessary then use the enter the recursive part of the algorithm for n > 200. I timeout on all but the first two test cases. I am using C# with long (64-bit) integers. I could use BigIntegers and take a day to generate a 1001 element table.
Cookie support is required to access HackerRank
Seems like cookies are disabled on this browser, please enable them to open this website
Project Euler #76: Counting summations
You are viewing a single comment's thread. Return to all comments →
I am using Euler's recurrence equation found on the website: http://mathworld.wolfram.com/PartitionFunctionP.html
For n >= 0 and n <= 200 I first perform a table lookup and if necessary then use the enter the recursive part of the algorithm for n > 200. I timeout on all but the first two test cases. I am using C# with long (64-bit) integers. I could use BigIntegers and take a day to generate a 1001 element table.