We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 6fa052c commit 52333efCopy full SHA for 52333ef
C++/count-the-number-of-ideal-arrays.cpp
@@ -9,7 +9,7 @@ class Solution {
9
const auto& prime_factors = [&](int x) {
10
unordered_map<int, int> factors;
11
for (const auto& p : primes) {
12
- if (x < p) {
+ if (p * p > x) {
13
break;
14
}
15
for (; x % p == 0; x /= p) {
0 commit comments