diff options
| author | MZuenni <michi.zuendorf@gmail.com> | 2023-02-13 19:39:30 +0100 |
|---|---|---|
| committer | MZuenni <michi.zuendorf@gmail.com> | 2023-02-13 19:39:30 +0100 |
| commit | 3a98de95336d3deb5d78cafdde6cc63dc3fd5f4f (patch) | |
| tree | 30f0428accc66062a07026a2bfa15fb88647523d /math/rho.cpp | |
| parent | 54946c9945857e42b8eb4025a66d3344bd53f07c (diff) | |
squezed in new code :D
Diffstat (limited to 'math/rho.cpp')
| -rw-r--r-- | math/rho.cpp | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/math/rho.cpp b/math/rho.cpp index 1f5ba86..865a438 100644 --- a/math/rho.cpp +++ b/math/rho.cpp @@ -13,10 +13,7 @@ ll rho(ll n) { // Findet Faktor < n, nicht unbedingt prim. void factor(ll n, map<ll, int>& facts) { if (n == 1) return; - if (isPrime(n)) { - facts[n]++; - return; - } + if (isPrime(n)) {facts[n]++, return;} ll f = rho(n); factor(n / f, facts); factor(f, facts); |
