by@akouryy1
WA
469ms
a={}for k=1,4 do for s in string.gmatch(io.read(),"[^%s]+")do a[#a+1]=s end end for z=1,9 do a[z]=a[z]-a[9+(z+1)%3]end print(math.floor((a[8]*(a[1]*a[6]-a[4]*a[3])+a[7]*(a[5]*a[3]-a[2]*a[6])+a[9]*(a[4]*a[2]-a[1]*a[5]))/6))
42 97 10 72 65 40 62 87 82 12 43 07
3679