7 lines
196 B
Raku
7 lines
196 B
Raku
use ntheory qw/:all/;
|
|
my @smith;
|
|
forcomposites {
|
|
push @smith, $_ if sumdigits($_) == sumdigits(join("",factor($_)));
|
|
} 10000-1;
|
|
say scalar(@smith), " Smith numbers below 10000.";
|
|
say "@smith";
|