by@kcz146
WA
486ms
a=(`cat`) for z in {0..8};{ $[a[t=z]-=a[9+z%3],s+=z/6*a[z]*(a[++t%3+3]*a[q=++t%3]-a[q+3]*a[z%3])/6] } echo $s
03 40 21 43 29 23 42 75 75 74 47 97
48451
/volume/CODE: line 3: 0: command not found /volume/CODE: line 3: 0: command not found /volume/CODE: line 3: 0: command not found /volume/CODE: line 3: 0: command not found /volume/CODE: line 3: 0: command not found /volume/CODE: line 3: 0: command not found /volume/CODE: line 3: 20725: command not found /volume/CODE: line 3: 44231: command not found /volume/CODE: line 3: 48451: command not found