Triangular, pentagonal, and hexagonal
This problem is very similar to problem 044. But from this problem, the results
begin to be very large numbers. Long long int are required by many problems.
Overflow is also sometimes become a headache.
Update: this problem is actually best solved by using Pell Equation, but it is not an easy job to solve a generalized pell equation.
No comments:
Post a Comment