Java for LeetCode 231 Power of Two

 public boolean isPowerOfTwo(int n) {
        if(n<1)
    		return false;
        while(n!=1){
        	if(n%2!=0)
        		return false;
        	n>>=1;
        }
        return true;
    }
原文地址:https://www.cnblogs.com/tonyluis/p/4829331.html