summaryrefslogtreecommitdiff
path: root/math/multInv.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'math/multInv.cpp')
-rw-r--r--math/multInv.cpp4
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;
}