Problem 48

Python 2.7
Problem 52

Python 2.7