\(\hept{\begin{cases}n^3-1\equiv-1\left(mod\text{ }n\right)\\n^2-1\equiv-1\left(mod\text{ }n\right)\end{cases}}\Rightarrow\left(n^3-1\right)^{111}.\left(n^2-1\right)^{333}\equiv\left(-1\right)^{111}.\left(-1\right)^{333}\equiv\left(-1\right).\left(-1\right)\equiv1\)\(\left(mod\text{ }n\right)\)