LeetCode-4
来源:互联网 发布:手机动作特效软件 编辑:程序博客网 时间:2024/06/06 00:10
Palindrome Number(回文,不允许extre space)
class Solution {public: bool isPalindrome(int x) { if(x<0){return false;} int tail = 0; int bit = 0; int tmp = x; while(tmp != 0){ tmp = tmp/10; bit ++; } if(bit == 1) return true; tmp = x; int a = 0; for(int i = 0; i<bit/2; i++){ a = tmp%10; tail = tail*10+a; tmp = tmp/10; } if(bit%2 == 1) tmp = tmp/10; if(tmp == tail){return true;} return false; }};
0 0
- LeetCode-4
- LeetCode--4
- LeetCode(4)
- LeetCode-4*
- LeetCode(4)
- leetcode 4
- LeetCode #4
- LeetCode(4)
- LeetCode: 4 Sum
- LeetCode: 4Sum
- LeetCode 4Sum
- Leetcode: 4SUM
- 【leetcode】 4 sum
- LeetCode 4Sum
- leetcode 44: 4Sum
- [Leetcode] 4 Sum [Unsolved]
- 【leetcode】4Sum
- [LeetCode]4Sum
- 定时任务会重复执行俩次的解决方法
- 相邻div实现一个跟着另一个自适应高度示例代码
- 定时任务会重复执行俩次的解决方法
- Python3.4网页爬虫,提取图片
- 定时任务会重复执行俩次的解决方法
- LeetCode-4
- 定时任务会重复执行俩次的解决方法
- 【框架-MFC】MFC 在捕获控件外(窗口外)鼠标事件
- 定时任务会重复执行俩次的解决方法
- windows 64位机器安装python机器学习环境scikit_learn
- 资源模块句柄的切换 .
- 定时任务会重复执行俩次的解决方法
- 使Eclipse下支持编写HTML/JS/CSS/JSP页面的自动提示。
- github 中文教程