solved problem 42.
-------------------
Had to solve using descriminant of quadratic function.
see -  http://www.mathblog.dk/project-euler-42-triangle-words/