同样是判断数是否是2的n次幂,同 Power of three
class Solution {
public:
bool isPowerOfTwo(int n) {
return (n > ) && (((long long)<<) % n == );
}
};
2024-01-05 16:23:34
同样是判断数是否是2的n次幂,同 Power of three
class Solution {
public:
bool isPowerOfTwo(int n) {
return (n > ) && (((long long)<<) % n == );
}
};