pentagonal专题

Project Euler 题解 #45 Triangular, pentagonal, and hexagonal

题目:Triangular, pentagonal, and hexagonal Triangle, pentagonal, and hexagonal numbers are generated by the following formulae: Triangle Tn=n(n+1)/2 1, 3, 6, 10, 15, ...Pentagonal Pn=n(3n1)/2 1, 5, 12