Skip to content

Commit 52333ef

Browse files
authored
Update count-the-number-of-ideal-arrays.cpp
1 parent 6fa052c commit 52333ef

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

C++/count-the-number-of-ideal-arrays.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ class Solution {
99
const auto& prime_factors = [&](int x) {
1010
unordered_map<int, int> factors;
1111
for (const auto& p : primes) {
12-
if (x < p) {
12+
if (p * p > x) {
1313
break;
1414
}
1515
for (; x % p == 0; x /= p) {

0 commit comments

Comments
 (0)