首页 > 代码库 > leetcode342

leetcode342

public class Solution {
    public bool IsPowerOfFour(int num) {
        return (num > 0) && ((num & (num - 1)) == 0) && ((num & 0x55555555) == num);
    }
}

https://leetcode.com/problems/power-of-four/#/description

leetcode342