From 9e625b89bac7e8daaf583e215f3a0df3dc250bb2 Mon Sep 17 00:00:00 2001 From: Paul Jungeblut Date: Mon, 27 Jun 2016 11:17:34 +0200 Subject: Math section rebuild, merged convinience and sonstiges section. --- math/multInv.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'math/multInv.cpp') diff --git a/math/multInv.cpp b/math/multInv.cpp index f9db815..858e47c 100644 --- a/math/multInv.cpp +++ b/math/multInv.cpp @@ -1,5 +1,6 @@ -ll multInv(ll n, ll p) { //berechnet das multiplikative Inverse von n in F_p - extendedEuclid(n, p); //implementierung von oben +// Laufzeit: O(log (n) + log(p)) +ll multInv(ll n, ll p) { // Berechnet das multiplikative Inverse von n in F_p. + extendedEuclid(n, p); // Implementierung von oben. x += ((x / p) + 1) * p; return x % p; -} \ No newline at end of file +} -- cgit v1.2.3