Solve problem 18 with map and reduce.
Adjust solution for 18 to solve 67 as well.