diff options
Diffstat (limited to 'math/primes.cpp')
| -rw-r--r-- | math/primes.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/math/primes.cpp b/math/primes.cpp index bbc63d9..79e0001 100644 --- a/math/primes.cpp +++ b/math/primes.cpp @@ -21,6 +21,7 @@ ll rho(ll n) { // Findet Faktor < n, nicht unbedingt prim. while (d == 1) { x = ((x * x) % n + c) % n; y = ((y * y) % n + c) % n; + y = ((y * y) % n + c) % n; d = gcd(abs(x - y), n); // Implementierung von oben. } return d == n ? rho(n) : d; |
