\(=\left(40^2-31^2\right)-\left(39^2-32^2\right)+\left(38^2-33^2\right)-\left(37^2-34^2\right)+\left(36^2-35^2\right)\)
\(=\left(40-31\right)\left(40+31\right)-\left(39-32\right)\left(39+32\right)+\left(38-33\right)\left(38+33\right)-\)
\(\left(37-34\right)\left(37+34\right)+\left(36-35\right)\left(36+35\right)\)
\(=9.71-7.71+5.71-3.71+1.71\)
\(=\left(9-7+5-3+1\right).71=5.71=355\)