Result

AC

Duration

887ms

Code [DL]

using System;using System.Linq;class A{static void Main(){char[]c={' ','\n'};int[]a=Console.In.ReadToEnd().Trim().Split(c).Select(Int32.Parse).ToArray();for(int z=9;z-->0;)a[z]-=a[9+z%3];Console.Write((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

18 28 35
99 07 89
80 75 28
79 89 85

stdout

58069

stderr

strace