Anaprimes: Difference between revisions
Content deleted Content added
SqrtNegInf (talk | contribs) Added Perl |
SqrtNegInf (talk | contribs) →{{header|Perl}}: labels 10x off, speed up code |
||
Line 828:
use Lingua::EN::Numbers qw(num2en);
for my $l (3..9) {
my %p;
my $m = max map { length $p{$_} } keys %p;
printf "Largest group of anaprimes before %s: %d members.\n", num2en(10**
for my $k (sort grep { $m == length $p{$_} } keys %p) {
printf "First: %d Last: %d\n", $p{$k} =~ /^(\d+)
}
say '';
}</syntaxhighlight>
{{out}}
<pre>Largest group of anaprimes before
First: 149 Last: 941
First: 179 Last: 971
First: 379 Last: 937
Largest group of anaprimes before
First: 1237 Last: 7321
First: 1279 Last: 9721
Largest group of anaprimes before one
First: 13789 Last: 98731
Largest group of anaprimes before
First: 123479 Last: 974213
Largest group of anaprimes before
First: 1235789 Last: 9875321
|