Ta có: \(5^{2018}=\left(5^4\right)^{504}.5^2\)
\(5^4\equiv625\left(mod1000\right)\)
\(\Rightarrow\left(5^4\right)^{2018}\equiv625^{2018}\left(mod1000\right)\)
\(\Rightarrow\left(5^4\right)^{2018}\equiv625\left(mod1000\right)\)(vì \(625^{2018}\)có tận cùng là 0625)
\(\Rightarrow\left(5^4\right)^{2018}.5^2\equiv625.5^2\left(mod1000\right)\)
\(\Rightarrow5^{2018}\equiv5625\left(mod1000\right)\)
Vậy: \(5^{2018}\)có tận cùng là 5625