diff options
| author | JBatzill <batzilljohannes@gmail.com> | 2014-11-26 14:31:17 +0100 |
|---|---|---|
| committer | JBatzill <batzilljohannes@gmail.com> | 2014-11-26 14:31:17 +0100 |
| commit | 61677a43deb5b16bcbcc4b12a9a5933258481cad (patch) | |
| tree | f2484a46f07ee452d0f36d178d18ecb9eed8eb9a /math | |
| parent | 7a217262958cdf11dfb1f90b86df31acde90ff45 (diff) | |
Added Small improvement!
Diffstat (limited to 'math')
| -rw-r--r-- | math/factor.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/math/factor.cpp b/math/factor.cpp index 0e5d7d8..0cbca33 100644 --- a/math/factor.cpp +++ b/math/factor.cpp @@ -12,7 +12,7 @@ vector<int> factorize(ll n) { factor.push_back(primes[pos]); } else pos++; - if(primes[pos]*primes[pos] > n) break; + if(primes[pos]*primes[pos] > num) break; } if(num != 1) factor.push_back(num); return factor; |
