Fixed problem 49, still slow.