Anonymous user
Count in factors: Difference between revisions
m
→{{header|Perl}}: Add libheader
m (→simple approach: used a template for the output section.) |
m (→{{header|Perl}}: Add libheader) |
||
Line 2,469:
=={{header|Perl}}==
Typically one would use a module for this. Note that these modules all return an empty list for '1'. This should be efficient to 50+ digits:{{libheader|ntheory}}
<lang perl>use ntheory qw/factor/;
print "$_ = ", join(" x ", factor($_)), "\n" for 1000000000000000000 .. 1000000000000000010;</lang>
|