bizworld / project-euler-largest-prime-factor-q-000

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Project Euler

Problem: Largest Prime Factor

  • The prime factors of 13195 are 5, 7, 13 and 29. The largest prime factor in this case is 29.
  • What is the largest prime factor of the number 600851475143 ?

Instructions

  • Code your procedural solution into the lib/largest_prime_factor.rb file.
  • Code your object-oriented solution into the lib/oo_largest_prime_factor.rb file. Make sure that you set the largest prime factor equal to the number attribute of the LargestPrimeFactor class.
  • Run learn until you get all of the RSpec tests to pass.

Source

About


Languages

Language:Ruby 100.0%