Add a solution for problem 05 in Ruby.