标签:class blog code 2014 string os
bool result = false; result = CheckPowerOfTwo(8); Console.WriteLine(result.ToString()); static bool CheckPowerOfTwo(ulong number) { return (number != 0) && ((number & (number - 1)) == 0); }
7 如何检查一个数字是不是2的乘方,布布扣,bubuko.com
标签:class blog code 2014 string os
原文地址:http://blog.csdn.net/u011685627/article/details/33355857