Ta có: \(B=\frac{999999}{2}-\frac{999999}{3}-\frac{999999}{6}\)
\(B=999999\times\frac{1}{2}-999999\times\frac{1}{3}-999999\times\frac{1}{6}\)
\(B=999999\times\left(\frac{1}{2}-\frac{1}{3}-\frac{1}{6}\right)\)
\(B=999999\times\frac{3-2-1}{6}\)
\(B=999999\times\frac{0}{6}\)
\(B=999999\times0\)
\(B=0\)
Vậy \(B=0\) .