Problem 20 in Ruby (Next easiest one)