diff options
| -rw-r--r-- | challenge-169/mark-anderson/raku/ch-2.raku | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/challenge-169/mark-anderson/raku/ch-2.raku b/challenge-169/mark-anderson/raku/ch-2.raku index ad23340ad3..8c94a93080 100644 --- a/challenge-169/mark-anderson/raku/ch-2.raku +++ b/challenge-169/mark-anderson/raku/ch-2.raku @@ -1,6 +1,6 @@ #!/usr/bin/env raku -my $n = 1000000; +my $n = 100_000_000; my $powerful = set gather for 2..sqrt($n) -> $a @@ -27,5 +27,9 @@ for 2..sqrt($n) -> $a my $achilles = $powerful (-) $perfect; my @achilles = $achilles.keys.sort; -say @achilles.head(20); # (72 108 200 288 392 432 500 648 675 800 864 968 972 1125 1152 1323 1352 1372 1568 1800) -say @achilles[900]; # 972000 +say @achilles[^20] ; # (72 108 200 288 392 432 500 648 675 800 864 968 972 1125 1152 1323 1352 1372 1568 1800) +say @achilles[9990..9999]; # (90025452 90048200 90100125 90101888 90117775 90124083 90124672 90140256 90155592 90209312) + +# real 1.45 +# user 1.69 +# sys 0.10 |
