Saturday, September 25, 2010

Project Euler 003

Hey, here is Problem 3.  Not the most complicated problem.  However, this version requires you to enter an argument in the command line.

#Project Euler
#Problem 3

require 'mathn'

usr_num = ARGV[0].to_i
puts usr_num.prime_division.last[0]

9 comments: