by@kurgm
AC
5514ms
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=-~s%3]-a[t+3]*a[s-3])}.sum/6
96 02 25 63 29 76 97 52 06 66 74 03
14552
0+1 records in 0+1 records out 36 bytes copied, 7.8166e-05 s, 461 kB/s