Result

AC

Duration

6020ms

Code [DL]

fun main(b:Array<String>){val a=(0..3).flatMap{readLine()!!.split(" ").map{a->a.toInt()}}.toMutableList()
for(z in 0..8)a[z]-=a[9+z%3]
print((a[7]*(a[0]*a[5]-a[3]*a[2])+a[6]*(a[4]*a[2]-a[1]*a[5])+a[8]*(a[3]*a[1]-a[0]*a[4]))/6)}

stdin

08 18 94
68 48 72
35 27 47
12 73 28

stdout

22567

stderr

strace