模块化逆内置,C++
Modular Inverse Built-In, C++
有a very nice way to find a modular inverse (that is, such b
that ab ≡ 1 (mod m)
for given a
and m
) in python-3.8:
b = pow(a, -1, m)
pow
内置于 python-3.8. Is there something like this in c++?
不,C++ 中没有内置函数(回答你的问题:))。
有a very nice way to find a modular inverse (that is, such b
that ab ≡ 1 (mod m)
for given a
and m
) in python-3.8:
b = pow(a, -1, m)
pow
内置于 python-3.8. Is there something like this in c++?
不,C++ 中没有内置函数(回答你的问题:))。