All pastes #776720 Raw Edit

Someone

public ruby v1 · immutable
·published 2007-11-16 06:57 UTC
rendered paste body
x=ARGV[0].to_idef f(n);(n/2).downto(2){|i| yield i if n%i<1};endf(x){|i|  begin; f(i){raise}; rescue; next; end  puts "#{i} is the largest prime factor of #{x}"  exit}