Result

WA

Duration

543ms

Code [DL]

a=[*map(int,open(0).read().split())]
print(-sum(a[i//2]*a[8-i//12*6-i%3]*a[(i//6+1&2)*3+(i+3)//2%3+3]^-(i%2)for i in range(24))/6-2)

stdin

04 42 68
65 03 18
84 94 36
50 58 80

stdout

36624.0

stderr

strace