Result

AC

Duration

484ms

Code [DL]

a=(`cat`)
for z in {0..8};{
$[a[z]-=a[9+z%3]]
$[s+=z/6*a[z]*(a[p=3+(z+1)%3]*a[q=(z+2)%3]-a[q+3]*a[p-3])]
}
echo $[s/6]

stdin

27 86 46
40 67 57
19 20 68
37 38 05

stdout

10407

stderr

/volume/CODE: line 3: -10: command not found
/volume/CODE: line 4: 0: command not found
/volume/CODE: line 3: 48: command not found
/volume/CODE: line 4: 0: command not found
/volume/CODE: line 3: 41: command not found
/volume/CODE: line 4: 0: command not found
/volume/CODE: line 3: 3: command not found
/volume/CODE: line 4: 0: command not found
/volume/CODE: line 3: 29: command not found
/volume/CODE: line 4: 0: command not found
/volume/CODE: line 3: 52: command not found
/volume/CODE: line 4: 0: command not found
/volume/CODE: line 3: -18: command not found
/volume/CODE: line 4: 23526: command not found
/volume/CODE: line 3: -18: command not found
/volume/CODE: line 4: 35100: command not found
/volume/CODE: line 3: 63: command not found
/volume/CODE: line 4: 62442: command not found

strace