Modulo arithmetic, specifically n! mod m

817 Views Asked by At

Is there a theorem that makes solving $$ n! \equiv x \mod m $$ knowing that both $n$ and $m$ are prime?

And if not, what would be the best way to go about finding $x$?

cheers