You are viewing a single comment's thread. Return to all comments →
First generate all pentagonal, triangle and hexagonal numbers below 2*10^14 . Then for each test case, use binary search to find the answer.
Seems like cookies are disabled on this browser, please enable them to open this website
Project Euler #45: Triangular, pentagonal, and hexagonal
You are viewing a single comment's thread. Return to all comments →
First generate all pentagonal, triangle and hexagonal numbers below 2*10^14 . Then for each test case, use binary search to find the answer.