summaryrefslogtreecommitdiff
path: root/math/rho.cpp
diff options
context:
space:
mode:
authorMZuenni <michi.zuendorf@gmail.com>2023-02-13 19:39:30 +0100
committerMZuenni <michi.zuendorf@gmail.com>2023-02-13 19:39:30 +0100
commit3a98de95336d3deb5d78cafdde6cc63dc3fd5f4f (patch)
tree30f0428accc66062a07026a2bfa15fb88647523d /math/rho.cpp
parent54946c9945857e42b8eb4025a66d3344bd53f07c (diff)
squezed in new code :D
Diffstat (limited to 'math/rho.cpp')
-rw-r--r--math/rho.cpp5
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);