Add problem 1005 solution.