https://leetcode.com/problems/power-of-two/description/
class Solution {
public:
bool isPowerOfTwo(int n) {
if(n<=0 || n>2147483647)//2的幂最小是1 int最大为2147483647
return false;
while(n>1){
if(n%2!=0) return false;
n /=2;
}
return true;
}
};