Skip to content

Commit de121d6

Browse files
committed
Add ModIntRuntime::facinv()
1 parent 6118b05 commit de121d6

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

number/modint_runtime.hpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,8 @@ struct ModIntRuntime {
117117
return facs()[n];
118118
}
119119

120+
static ModIntRuntime facinv(int n) { return ModIntRuntime::fac(n).inv(); }
121+
120122
static ModIntRuntime doublefac(int n) {
121123
assert(n >= 0);
122124
if (n >= md) return ModIntRuntime(0);

0 commit comments

Comments
 (0)