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.
You will need to use BigInteger or the like. The number of partitions for 1000 is ~2.4e31.
You can calculate all the partition values for 2 through 1000 in a few seconds if you use the right algorithm. The generating algorithm I used is based on MacMahon's recurrence.
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 →
You will need to use BigInteger or the like. The number of partitions for 1000 is ~2.4e31.
You can calculate all the partition values for 2 through 1000 in a few seconds if you use the right algorithm. The generating algorithm I used is based on MacMahon's recurrence.