I don't know whether there is any rule about this. But I've been wondering that if a math question is ended with an exclamation mark, would it be misinterpreted with "factorial"? For example, consider this question below.
Calculate $6! \times 2!$
Does it mean that we should calculate $6! \times 2!$ or $6! \times 2$?
But now if we write the question as below:
Calculate $6! \times 2!!$
Does it mean that we should calculate $6! \times (2!)!$ or what?
Now if we write this instead:
Calculate $6! \times 2!.$
it's clearer that we must calculate $6! \times 2!$. But grammatically speaking, should an exclamation ended with an exclamation mark?
I know it's a kind of weird question, but what do you think?
There are no "official" rules for how you combine symbolic math expressions with the surrounding natural language, but you should obviously avoid ambiguity. Putting an exclamation mark right after a numeric expression where it could be interpreted as a factorial is likely to be confusing.
Also, conventional math writing (at least what I'm familiar with) is pretty dry and unemotional, so readers are more likely to interpret an ambiguous $!$ as a factorial than as an exclamation.