Your skill will accomplish what the force of many cannot |
|
PerlMonks |
Re: Finding divisors from factorsby danaj (Friar) |
on Oct 08, 2014 at 20:35 UTC ( [id://1103220]=note: print w/replies, xml ) | Need Help?? |
Munging my C code, here is one that is faster, though not simpler:
I'm basically converting to factor/exponent form, then pushing the divisors on the list. Doing it by prime factor means we avoid duplication so no need for hashes. Improvements welcome.
An aside, we can see some expected results using something like:
In Section
Seekers of Perl Wisdom
|
|