diff options
| author | mzuenni <michi.zuendorf@gmail.com> | 2022-06-27 17:19:28 +0200 |
|---|---|---|
| committer | mzuenni <michi.zuendorf@gmail.com> | 2022-06-27 17:19:28 +0200 |
| commit | 5ab8a5088b729a9953b8dff1b2a985dc8fb2098b (patch) | |
| tree | ed40d6936c0e9eee40ba62751cbf99ecddbaddc2 /math/multInv.cpp | |
| parent | adabbad9c51cf7cd3874bfde8eac1fbcf84fec10 (diff) | |
updated tcr
Diffstat (limited to 'math/multInv.cpp')
| -rw-r--r-- | math/multInv.cpp | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/math/multInv.cpp b/math/multInv.cpp index 4e388b8..87603f3 100644 --- a/math/multInv.cpp +++ b/math/multInv.cpp @@ -1,7 +1,5 @@ -// Laufzeit: O(log (n) + log(p)) ll multInv(ll n, ll p) { ll x, y; extendedEuclid(n, p, x, y); // Implementierung von oben. - x = ((x % p) + p) % p; - return x % p; + return ((x % p) + p) % p; } |
