Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
branch: master
Fetching contributors…

Cannot retrieve contributors at this time

executable file 19 lines (14 sloc) 0.314 kb
#!/usr/bin/env perl
use strict;
use warnings;
use 5.010;
use Math::Prime::XS qw(primes);
use List::Util qw(first);
sub is_pandigital {
my ($n) = @_;
foreach my $d ( 1 .. length($n) ) {
return 0 unless $n =~ /$d/;
return 1;
say first { is_pandigital($_) } reverse primes(9_999_999);
Jump to Line
Something went wrong with that request. Please try again.