Solve problem 63 using Ruby.