Ruby project Euler solutions