Anonymous user
Primes with digits in nondecreasing order: Difference between revisions
Primes with digits in nondecreasing order (view source)
Revision as of 00:15, 24 July 2021
, 2 years ago→{{header|Perl}}
(Add Seed7) |
|||
Line 648:
<lang perl>#!/usr/bin/perl
use strict;
use warnings;
use ntheory qw( primes );
my @want = grep ! /(.)(.)(??{$1 > $2 ? '' : '(*FAIL)'})/,
▲ ! /(.)(.)(??{$1 > $2 ? '' : '(*FAIL)'})/ and (1 x $_) !~ /^(11+)\1+$/
▲print "@primes\n" =~ s/.{50}\K /\n/gr, "\ncount: " . @primes, "\n";</lang>
{{out}}
<pre>
|