Project Euler #45: Triangular, pentagonal, and hexagonal

  • + 0 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.