Method-3: Use Bitwise operators. This uses two facts: If the number is a power of two, then only 1 bit will be set in its binary representation.
確定! 回上一頁