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:

  1. Not even sure what is going on here, mind explaining?

    ReplyDelete
  2. this is math programming i believe and this is a prime # division problem, i hope im right :P

    ReplyDelete
  3. Math programming? Wow. My mind is BLOWN.

    Twitter.com/CawlinForReal

    ReplyDelete
  4. yeah this should make it run smoothly

    ReplyDelete