add problem 10 to php, python, and ruby