Result

AC

Duration

512ms

Code [DL]

s=open(0).read().split()
a,b,c,d,e,f,g,h,i=[int(s[i+3])-int(s[i%3])for i in range(9)]
print((a*(e*i-h*f)+b*(f*g-i*d)+c*(d*h-g*e))//6)

stdin

91 41 16
39 63 44
04 11 35
86 37 86

stdout

40447

stderr

strace