Started and finished project euler problem 39.