C++ | Leetcode C++题解之第342题4的幂
题目:

题解:
class Solution {
public:bool isPowerOfFour(int n) {return n > 0 && (n & (n - 1)) == 0 && n % 3 == 1;}
};题目:

题解:
class Solution {
public:bool isPowerOfFour(int n) {return n > 0 && (n & (n - 1)) == 0 && n % 3 == 1;}
};