```
public class Solution {
public boolean isUgly(int num) {
if (num == 0) {
return false;
}
int[] divisors = {2, 3, 5};
for (int divisor : divisors) {
while(num % divisor == 0) {
num /= divisor;
}
}
return num == 1;
}
}
```

if the num == 2^30, then we divide it by 2, 30 times which is log2(n). but what if it has all 2,3,5 factors.

Still log(n) ?