Info

Hi, I'm David Askew

I build things

Homepage

Contact Me

About

Open Source

Project Euler - Problem 003

Spoiler Alert: Don’t read this any further if you are interested in learning this on your own. The solution is below.

You have been warned.

My solution to Problem 003 from Project Euler. I should probably come back to this and do it the “long” way.

1
2
3
4
require 'Prime'
num_to_factor = 600_851_475_143
x = Prime.prime_division(num_to_factor)
puts x.max[0]