威尔逊定理

意为:在p为质素(素数)前提下, (p - 1)! % p = (-1) % p

注意负数不能直接取模,要加模取模,即 (-1 + p) % p

原文地址:https://www.cnblogs.com/yuanweidao/p/11267964.html