diff options
| author | Paul Jungeblut <s_jungeb@i08pc57.atis-stud.uni-karlsruhe.de> | 2014-11-22 11:46:50 +0100 |
|---|---|---|
| committer | Paul Jungeblut <s_jungeb@i08pc57.atis-stud.uni-karlsruhe.de> | 2014-11-22 11:46:50 +0100 |
| commit | ca740ed7caeca4deb09a2fc7912f599555442e15 (patch) | |
| tree | ae25a2d25643067731eafaf16ee9ddf44f008d4e /math/multInv.cpp | |
| parent | fa83b8c841073b462840260b54593767e597f543 (diff) | |
bisschen LGS
Diffstat (limited to 'math/multInv.cpp')
| -rw-r--r-- | math/multInv.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/math/multInv.cpp b/math/multInv.cpp new file mode 100644 index 0000000..f9db815 --- /dev/null +++ b/math/multInv.cpp @@ -0,0 +1,5 @@ +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 |
