Add problem 42 solution