Solving Project Euler problems with Ruby