Add #17 solutions in C, Python, and Ruby