Added Problem 24 Solution

Solved problem 24