Solve problem 11 using Ruby.