index
:
tcr
master
Team Contest Reference
summary
refs
log
tree
commit
diff
log msg
author
committer
range
path:
root
/
math
/
shortModInv.cpp
blob: d5eaf07d37a25c4c8526e66155aa80ced372744a (
plain
)
1
2
3
ll
multInv
(
ll a
,
ll b
){
// a^{-1} mod b
return
1
<
a
?
b
-
multInv
(
b
%
a
,
a
) *
b
/
a
:
1
;
}