- or download this
foreach my $n ( @ARGV ? @ARGV : (20, 48, 96, 7, 69, 33, 13195, 600851
+475143, 2147483647) ) {
- or download this
perl pm1194192.pl 18 54 27000 29474100
Number: 18 , Prime_Factors: => 2 3 3
Number: 54 , Prime_Factors: => 2 3 9
Number: 27000 , Prime_Factors: => 2 2 2 3 5 9 25
Number: 29474100 , Prime_Factors: => 2 2 3 5 15 32749
- or download this
#!/usr/bin/perl
use warnings;
...
print "Number: $n , Prime_Factors: => @result", "\n";
}
- or download this
$ time perl pm1194192.pl 18 54 27000 29474100 3217491003
Number: 18 , Prime_Factors: => 2 3 3
...
real 0m0.008s
user 0m0.004s
sys 0m0.000s
- or download this
...
my @list = (20, 48, 96, 7, 69, 33, 13195, 600851475143, 2147483647, 1
+8, 54, 27000, 29474100, 589806);
...
Rate once every
once 16.9/s -- -94%
every 286/s 1593% --