Add Question 47-48.

All passed OJ test cases.