finished problem 14
finished problem 15
finished problem 16. Python makes memory limitation too easy