318. Out of 100 cubes, 80 have a red face, 85 have a blue face, and 75 have a green face. How many cubes have faces of all three colors?
$\triangle$ Compared to similar problems from § 4 "Operations on Sets," there is significantly less data here, so the answer will be ambiguous - "from" and "to." Therefore, Venn diagrams will be of little help here.

First, let's determine the maximum number of cubes that have faces of all three colors. It is 75 and is achieved in the case where each of the 75 cubes with a green face also has a red and a blue face.

It is more difficult to count the minimum number of such cubes. Let's take an indirect approach.

Cubes that do not have a red face: $100-80=20$, without a blue face: 15, without a green face: 25. Add these numbers: $20+15+25=60$.

What does the number 60 represent? It is the maximum number of cubes that do not have faces of all three colors. This maximum is achieved in the case where the three sets, consisting of 20, 15, and 25 cubes, have no pairwise common elements. Therefore, the minimum number of cubes that have faces of all three colors is $100-60=40$.

![](https://cdn.mathpix.com/cropped/2024_05_21_0aa0e6ac168e80891953g-101.jpg?height=583&width=1336&top_left_y=1796&top_left_x=360)

100

Thus, the number $n$ of such cubes satisfies the inequality $40 \leq n \leq 75$.

Strictly speaking, we need to check that each of the cases

$$
n=40,41,42, \ldots, 75
$$

is possible. We have already seen when the extreme cases $n=40$ and $n=75$ are realized. Determine on your own when, for example, the cases $n=41$ and $n=74$ are possible.

Answer: $40 \leq n \leq 75$.