by@moratorium08
AC
1244ms
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[4]*a[8]*a[9]+a[5]*a[10]*a[6]-a[5]*a[7]*a[9]-a[8]*a[10]*a[3]-a[4]*a[11]*a[6])/6); }
02 12 02 51 48 31 45 84 04 01 58 23
16075