[Leetcode]326. Power of Three
来源:互联网 发布:linux怎么进入命令界面 编辑:程序博客网 时间:2024/06/05 10:40
Given an integer, write a function to determine if it is a power of three.
Follow up:
Could you do it without using any loop / recursion?
class Solution {public: bool isPowerOfThree(int n) { double a = log10 (n) /log10 (3); return (a - (int) a) == 0? true : false; }};
0 0
- [leetcode]326. Power of Three
- Leetcode 326. Power of Three
- Leetcode 326. Power of Three
- [leetcode] - 326. Power of Three
- 326. Power of Three LeetCode
- LeetCode ||326. Power of Three
- [LeetCode]326. Power of Three
- [leetcode] 326. Power of Three
- LeetCode *** 326. Power of Three
- leetcode 326. Power of Three
- 326.[LeetCode]Power Of Three
- LeetCode 326. Power of Three
- #leetcode#326. Power of Three
- Leetcode 326. Power of Three
- Leetcode 326. Power of Three
- leetcode 326. Power of Three
- LeetCode 326. Power of Three
- [leetcode] 326. Power of Three
- HelloWorld版的SpringMVC使用注解驱动的依赖注入
- linux学习5:文件|目录的默认权限与隐藏权限
- STDIN_FILENO的作用及与stdin 的区别
- PMP:Project Management Professional
- rsync免密码登陆要点
- [Leetcode]326. Power of Three
- ThinkPHP3.2.3 - 常用MySql语句(增删改查)
- HDU 2897 邂逅明下(博弈)
- linux编程里有这么一句if (lseek(STDIN_FILENO, 0, SEEK_CUR) == -1 ),请问是de意思?
- 无线充电各种原理方案的比较
- 【bzoj3786】【星系探索】【dfs序+splay】
- jQuery中ready和load的区别
- 在Ubuntu上为Android增加硬件抽象层(HAL)模块访问Linux内核驱动程序(老罗学习笔记3)
- Javascript模块化编程(三):require.js的用法