aboutsummaryrefslogtreecommitdiff
path: root/challenge-047/simon-proctor/raku/ch-2.p6
blob: dd2e54bbfe74e6a75b08f4adb203b1c5c6be6f4f (plain)
1
2
3
4
5
6
7
8
9
10
#!/usr/bin/env perl6

use v6.d;

#| Calculate the the first $count gapful numbers greater than 100
sub MAIN (
    UInt $count = 20 #= Number of gapful numbers to calulate (default 20)
) {
    .say for (100..*).grep( { $^a %% $^a.comb[0,*-1].join.Int } )[^$count]
}