LeetCode Reverse Integer
来源:互联网 发布:json传值到controller 编辑:程序博客网 时间:2024/04/29 03:53
class Solution {public: int reverse(int x) { long long ans=0; bool symbol=-1; if (x>0) { symbol=1; } while (x) { ans=ans*10+x%10;//有可能溢出 if (ans>INT_MAX||ans<INT_MIN) { ans=0; break; } x/=10; } return ans*symbol; } };
0 0
- LeetCode:Reverse Integer
- LeetCode: Reverse Integer
- [Leetcode] Reverse Integer
- LeetCode : Reverse Integer
- [LeetCode] Reverse Integer
- Leetcode: Reverse Integer
- LeetCode 7 - Reverse Integer
- leetcode 104: Reverse Integer
- Leetcode : Reverse Integer
- 【leetcode】Reverse Integer
- [LeetCode]Reverse Integer
- LeetCode-Reverse Integer
- [leetcode] Reverse Integer
- LeetCode - Reverse Integer
- leetcode之Reverse Integer
- LeetCode | Reverse Integer
- LeetCode: Reverse Integer
- Leetcode: Reverse Integer
- maltab line函数用法
- Structs+Spring+Hibernate快速入门
- Linux启动oracle
- IOS关于支付宝的集成与支付
- POJ 百炼 保研机试 1003:Hangover
- LeetCode Reverse Integer
- 从老师教了半年oc,到自学了1年多ios的我
- 多态机制原理解析--从内存角度分析
- session_unset()和session_destroy()用法分析
- jQuery 实现多页面换肤
- 黑马程序员——interface
- 回调使用记录
- C__ Linux C 中__user的含义
- iOS——分享自己封装的验证码按钮控件CFSecurityCodeButton