标签:
public boolean isPowerOfTwo(int n) { if(n<1) return false; while(n!=1){ if(n%2!=0) return false; n>>=1; } return true; }
Java for LeetCode 231 Power of Two
原文地址:http://www.cnblogs.com/tonyluis/p/4829331.html