7. A box contains some balls of the same size, among which there are 8 white balls, 9 black balls, and 7 yellow balls. Without looking at the balls, each time you take one, at least $\qquad$ times are needed to ensure that balls of all three colors are obtained.
【Answer】 18
【Solution】The worst-case principle. To ensure that the balls taken out include all three colors, consider the most unfortunate scenario, which is taking out all black balls first, that would be 9 times, then taking out all white balls, which is 8 times, and finally, any ball taken out will definitely be yellow, so at least $9+8+1=18$ (times) are needed to ensure that balls of all three colors are obtained.