Problem 17 in Ruby