LeetCode326. Power of Three一行代码解决
来源:互联网 发布:成都盘古网络工作待遇 编辑:程序博客网 时间:2024/05/16 08:08
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?
Credits:
Special thanks to @dietpepsi for adding this problem and creating all test cases.
bool isPowerOfThree(int n) { return (n > 0 && 1162261467 % n == 0);}
0 0
- LeetCode326. Power of Three一行代码解决
- leetcode326. Power of Three
- leetcode326: Power of Three
- leetcode326[easy]--- Power of Three
- [python语法巩固][leetcode326][Power of Three]
- leetcode 326. Power of Three(C语言,一行代码解决,两种方法)24
- leetcode Power of Three
- Leetcode: Power of Three
- LeetCode Power of Three
- 326. Power of Three
- Leetcode230: Power of Three
- Power of Three
- [leetcode]Power of Three
- LeetCode-Power of Three
- leetcode power of three
- 64. Power of Three
- LeetCode----Power of Three
- 326. Power of Three
- Static table views are only valid when embedded in UITableViewController instances
- bootstrap 栅格系统
- 20160205.CCPP体系详解(0015天)
- ContentResolverCursor
- php 正则表达式
- LeetCode326. Power of Three一行代码解决
- 【JAVA】12、循环结构
- Gradle多渠道多环境打包自动重命名
- oc加强day01作业答案
- C语言获取目录下目录&文件列表
- "0" != 0
- TortoiseSVN图标不能显示的解决方案
- CGCS2000、WGS84以及ITRF问题的阐述
- ubuntu14.04 clementine音乐播放器无法播放ape格式解决方法