18. (6 points) There are 300 balls in total, including white balls and red balls, and 100 boxes. Each box contains 3 balls, with 27 boxes containing 1 white ball, 42 boxes containing 2 or 3 red balls, and the number of boxes containing 3 white balls is the same as the number of boxes containing 3 red balls. Therefore, the total number of white balls is.

balls.
158
【Solution】According to the analysis of the problem, we get:
The number of boxes with 3 red balls is: $42-27=15$ (boxes),
So the number of boxes with 3 white balls is also 15 (boxes), then the number of boxes with 2 white and 1 red ball is: $100-15-15-27=43$ (boxes), so the total number of white balls is: $15 \times 3+43 \times 2+27=158$ (balls), Answer: There are 158 white balls in total. Therefore, the answer is: 158.