problem 67 working
problem 18 fixed to cache sum as in problem 67