add problem 17 to php, python, and ruby