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 22ad6fa commit 2151883Copy full SHA for 2151883
2021/day16/day16.raku
@@ -15,7 +15,7 @@ class Solver {
15
has Str $.input is required;
16
has @.binary = $!input.chomp.parse-base(16).base(2).comb;
17
18
- submethod TWEAK { @!binary.unshift(0) if $!input.substr(0, 1) lt '8' }
+ submethod TWEAK { @!binary.prepend(0 xx $!input.chomp.chars * 4 - +@!binary) }
19
20
method parse-and-eval( --> List) {
21
my $version-sum = 0;
0 commit comments