Result

AC

Duration

551ms

Code [DL]

#!ruby -rmatrix
a,*b=$<.map &:split
p Matrix[*b.map{|x|x.zip(a).map{|e|eval e*?-}}].det/6

stdin

85 04 64
35 71 05
64 49 61
90 57 95

stdout

7309

stderr

strace