leetcode——231—— Power of Two
来源:互联网 发布:微信支付 域名备案 编辑:程序博客网 时间:2024/06/05 20:30
Given an integer, write a function to determine if it is a power of two.
class Solution {public: bool isPowerOfTwo(int x){ double data = log10(x)/log10(2); return (data-(int)data==0)?true:false; }};
0 0
- Leetcode——231. Power of Two
- leetcode——231—— Power of Two
- leetcode解题报告233——Power of Two
- leetcode刷题日记——Power of Two
- LeetCode每日一题——231. Power of Two
- LeetCode之231,Power of Two——新学到的超快速简洁判别方法
- LeetCode231——Power of Two
- 算法系列——Power of Two
- Algorithms—231.Power of Two
- leetcode-231 Power of Two
- leetcode 231:Power of Two
- LeetCode 231: Power of Two
- leetcode 231: Power of Two
- leetcode[231]:Power of Two
- Power of Two(leetcode 231)
- leetcode-231-Power of Two
- LeetCode 231 Power of Two
- leetCode #231 Power of Two
- 无线APP时代HTTP请求DNS优化
- 简单服务器生猛上手
- Android基础——自定义EditTExt实现去掉输入框添加下划线
- 从Samples中入门IOS开发(四)------ 基于socket的网络编程
- c++作业2——模拟ATM机
- leetcode——231—— Power of Two
- JAVA中使用commons-logging和log4j打印日志
- leetcode刷题,总结,记录,备忘78
- EasyDarwin流媒体云平台架构
- https通信加密过程
- leetcode 322. Coin Change-硬币交换|动态规划
- POJ 1470 Closest Common Ancestors【LCA Tarjan】
- 删除已经配置的类库和移除CocoaPods
- jinja2