Solved 81

Solved problem 81 using a similar algorithm as the dynamic programming
approach used in problem 67. See code comments for explanation.