by@kurgm
AC
1923ms
a=`dd`.split.map &.to_i;p (0..8).map{|z|z/6*(a[z]-=a[9+z%3])*(a[s=3+-~z%3]*a[t= ~-z%3]-a[t+3]*a[s-3])}.sum/6
54 01 79 43 25 76 97 19 54 41 52 40
5744
0+1 records in 0+1 records out 36 bytes copied, 5.1581e-05 s, 698 kB/s