也是直接给公式了

\[\big(^n_m\big) mod\ p=\big(^{n\%p}_{m\%p}\big)\big(^{\lfloor n/p\rfloor}_{\lfloor m/p\rfloor}\big)\]