Result

AC

Duration

1234ms

Code [DL]

import std.stdio;void main(){int[30] a;int i=0;for(;readf(" %d",&a[i]);i++)if(i>2)a[i]-=a[i%3];printf("%d\n",(a[3]*(a[7]*a[11]-a[8]*a[10])+a[4]*(a[8]*a[9]-a[11]*a[6])+a[5]*(a[10]*a[6]-a[7]*a[9]))/6);}

stdin

41 31 23
50 36 73
95 08 81
69 57 61

stdout

13137

stderr

strace