Result

WA

Duration

545ms

Code [DL]

#!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

stdin

04 21 83
51 30 26
79 86 34
67 03 62

stdout

stderr

/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>'

strace