Rosetta Problems

Montmort Number

https://judge.yosupo.jp/problem/montmort_number_mod