Solve problem 82 using Ruby.