Solution for problem 48
Solution for problem 28