by@kcz146
WA
510ms
a=(`cat`) for z in {0..8};{ $[a[t=z]-=a[9+z%3],s+=z/6*a[z]*(a[p=++t%3+3]*a[q=++t%3]-a[q+3]*a[p-3])/6] } echo $s
12 19 32 07 49 10 01 70 97 38 27 86
14742
/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: 11075: command not found /volume/CODE: line 3: 13239: command not found /volume/CODE: line 3: 14742: command not found