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.
At first I felt this task is really difficult, almost unsolvable but once I found the longest possible chain starting with 2 and which is prime and less then or equal to 10**12. Then I realized this task is not that hard.
So if you feel stuck or just have no ideas. Then build an algorithm which finds the result mentioned before and I believe you will know how to continue.
Cookie support is required to access HackerRank
Seems like cookies are disabled on this browser, please enable them to open this website
Project Euler #50: Consecutive prime sum
You are viewing a single comment's thread. Return to all comments →
At first I felt this task is really difficult, almost unsolvable but once I found the longest possible chain starting with 2 and which is prime and less then or equal to 10**12. Then I realized this task is not that hard.
So if you feel stuck or just have no ideas. Then build an algorithm which finds the result mentioned before and I believe you will know how to continue.