Skip to main content
Fixed cases with no rooks or rook at end of list
Source Link
Xcali
  • 16.2k
  • 2
  • 15
  • 39

Perl 5 -MList::Util=sum -pF/R/, 40 31 bytes40

$_=sum$_=/R/*sum map y///c,@F,@F[1..@F-2]2+/R$/]

Try it online!Try it online!

Perl 5 -MList::Util=sum -pF/R/, 40 31 bytes

$_=sum map y///c,@F,@F[1..@F-2]

Try it online!

Perl 5 -MList::Util=sum -pF/R/, 40

$_=/R/*sum map y///c,@F,@F[1..@F-2+/R$/]

Try it online!

deleted 15 characters in body
Source Link
Xcali
  • 16.2k
  • 2
  • 15
  • 39

Perl 5 -MList::Util=sum -pF/R/, 4040 31 bytes

$\=2*sum$_=sum map$_=ymap y///c,@F}{$\-="@F"+$F[,@F[1..@F-1]2]

Try it online!Try it online!

Perl 5 -MList::Util=sum -pF/R/, 40 bytes

$\=2*sum map$_=y///c,@F}{$\-="@F"+$F[-1]

Try it online!

Perl 5 -MList::Util=sum -pF/R/, 40 31 bytes

$_=sum map y///c,@F,@F[1..@F-2]

Try it online!

added 47 characters in body
Source Link
Xcali
  • 16.2k
  • 2
  • 15
  • 39

Perl 5 -aMList::Util=sum -pF/R/, 2440 bytes

say map chr$\=2*sum oct"0b$_"map$_=y///c,@F}{$\-="@F"+$F[-1]

Try it online!Try it online!

Perl 5 -a, 24 bytes

say map chr oct"0b$_",@F

Try it online!

Perl 5 -MList::Util=sum -pF/R/, 40 bytes

$\=2*sum map$_=y///c,@F}{$\-="@F"+$F[-1]

Try it online!

Source Link
Xcali
  • 16.2k
  • 2
  • 15
  • 39
Loading