Door 1, try 18 times;
The second door, try 17 times;
……
Door 18, try 1 time;
Total:18+17+…+1=171.
It is a permutation and combination problem in combinatorial mathematics. Probability, possibility and hit rate all describe uncertainty, but this problem needs to "open all the doors" to determine what will happen. What this problem needs to do is to choose the one with the least number of attempts among all schemes that can ensure that all doors are open.