Ai
1 Star 0 Fork 0

李璨/leetcode_practice

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
231.2-的幂.c 222 Bytes
一键复制 编辑 原始数据 按行查看 历史
李璨 提交于 2024-02-03 16:49 +08:00 . feat: 添加文件
/*
* @lc app=leetcode.cn id=231 lang=c
*
* [231] 2 的幂
*/
// @lc code=start
bool isPowerOfTwo(int n) {
if (n <= 1) {
return n == 1;
}
return isPowerOfTwo(n >> 1) && !(n & 1);
}
// @lc code=end
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/Cham_1/leetcode_practice.git
git@gitee.com:Cham_1/leetcode_practice.git
Cham_1
leetcode_practice
leetcode_practice
master

搜索帮助