We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a461d85 commit 81d99c8Copy full SHA for 81d99c8
categories/euler/prob063-moritz.pl
@@ -18,16 +18,18 @@
18
19
=end pod
20
21
-my $count = 0;
22
-for 1..9 -> $x {
23
- for 1..200 -> $y {
24
- if ($x**$y).chars == $y {
25
- say "$x**$y";
26
- $count++;
+sub MAIN(Bool :$verbose = False) {
+ my $count = 0;
+ for 1..9 -> $x {
+ for 1..200 -> $y {
+ if ($x**$y).chars == $y {
+ say "$x**$y" if $verbose;
27
+ $count++;
28
+ }
29
}
30
31
+ say $count;
32
+ say "missing bigint support: answer should be 49" if $verbose;
33
-say $count;
-say "missing bigint support: answer should be 49";
34
35
# vim: expandtab shiftwidth=4 ft=perl6
0 commit comments