231 Power of Two
2015-11-14 20:32
411 查看
class Solution { public: bool isPowerOfTwo(int n) { return (n&(n-1))==0&&n>0; } };
相关文章推荐
- 110 Balanced Binary Tree
- EF部分字段更新,自动忽略null字段
- 一个简单的实现奇 偶判断的代码
- 2015.11.14
- 21 Merge Two Sorted Lists
- 232 Implement Queue using Stacks
- QNX os supported board(ARM+MIPS+POWERPC+X86)
- Java继承 学习 && 类初始化顺序
- 记录下,系统下命令都不能用
- 202 Happy Number
- 在matlab环境下LIBSVM的demo
- 263 Ugly Number
- Ugly Number II
- iar for 8051 v8.30破解文件的使用
- 70 Climbing Stairs
- Codeforces Round #328 (Div. 2) D. Super M
- OC协议的应用-代理
- 伪目标
- JavaScript之再谈回调与闭包
- iOS性能优化:Instruments使用实战