by@akouryy1
WA
545ms
#!ruby -rmatrix a,*b=$<.map{|l|l.split.map &:to_i} p Matrix[b.map{|x|x.zip(a).map{|e,f|e-f}}].det/6
04 21 83 51 30 26 79 86 34 67 03 62
/usr/local/ruby-2.5.0/lib/ruby/2.5.0/matrix.rb:1105:in `determinant': Matrix dimension mismatch (ExceptionForMatrix::ErrDimensionMismatch) from /volume/CODE:3:in `<main>'