diff options
Diffstat (limited to 'math/factor.cpp')
| -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; |
