\(B=\left(3^4\right)^{502}.3.\left(7^4\right)^{502}.7^2.\left(13^4\right)^{502}.13^3\)
\(B=\overline{\left(...........1\right)}\overline{\left(..........1\right)\left(...........1\right)}.3.49.2197=\left(\overline{...............9}\right)\)
Vậy B có tận cùng là 9