$1.$A bottle in the shape of a cone lies on its base. Water is poured into the bottle until its level reaches a distance of 8 centimeters from the vertex of the cone (measured vertically). We now turn the bottle upside down without changing the amount of water it contains; This leaves an empty space in the upper part of the cone that is 2 centimeters high.

Find the height of the bottle.
1. Let \( h \) be the height and \( r \) be the radius of the base of the cone-shaped bottle. The volume \( V \) of the cone is given by:
   \[
   V = \frac{1}{3} \pi r^2 h
   \]

2. When the bottle lies on its base, the water fills up to a height of 8 cm from the vertex. The volume of the water is the volume of the cone with height \( 8 \) cm and radius \( \frac{8}{h} r \) (since the smaller cone is similar to the larger cone). The volume \( V_{\text{water}} \) of the water is:
   \[
   V_{\text{water}} = \frac{1}{3} \pi \left( \frac{8}{h} r \right)^2 \cdot 8 = \frac{1}{3} \pi \frac{64 r^2}{h^2} \cdot 8 = \frac{512 \pi r^2}{3h^2}
   \]

3. When the bottle is turned upside down, the empty space at the top is 2 cm high, so the water fills up to a height of \( h - 2 \) cm from the vertex. The volume of the water is the volume of the cone with height \( h - 2 \) cm and radius \( \frac{h-2}{h} r \). The volume \( V_{\text{water}} \) of the water is:
   \[
   V_{\text{water}} = \frac{1}{3} \pi \left( \frac{h-2}{h} r \right)^2 \cdot (h-2) = \frac{1}{3} \pi \frac{(h-2)^2 r^2}{h^2} \cdot (h-2) = \frac{(h-2)^3 \pi r^2}{3h^2}
   \]

4. Since the volume of the water does not change, we equate the two expressions for the volume of the water:
   \[
   \frac{512 \pi r^2}{3h^2} = \frac{(h-2)^3 \pi r^2}{3h^2}
   \]

5. Simplifying by canceling out common factors:
   \[
   512 = (h-2)^3
   \]

6. Taking the cube root of both sides:
   \[
   h - 2 = \sqrt[3]{512} = 8
   \]

7. Solving for \( h \):
   \[
   h = 8 + 2 = 10
   \]

The final answer is \( \boxed{10} \).