Solve hanging lantern problem: Difference between revisions
→{{header|Raku}}: Make verbose mode more verbose.
(→{{header|Julia}}: Correct treatment of duplicate column sizes; see talk page.) |
(→{{header|Raku}}: Make verbose mode more verbose.) |
||
Line 243:
. unique;
say +@sequences;▼
if ($verbose) {
say "There are {+@sequences} possible takedown sequences:";
say "[$_]" for @sequences;
} else {
}</lang>▼
▲ say +@sequences;
}
{{Out}}
Line 252 ⟶ 255:
60
$ raku lanterns.raku --verbose 1 2 3
There are 60 possible takedown sequences:
[1,2,2,3,3,3]
[1,2,3,2,3,3]
|