Create problem_014.py

This code works but time taken is too large.
Suggest improvements