7. Reverse Integer Easy
来源:互联网 发布:毕业论文数据造假 编辑:程序博客网 时间:2024/04/29 22:58
好生僻的一题啊,居然是easy,没想到什么好办法,看讨论才懂
class Solution {
public:
int reverse(int x) {
long long res = 0;
while(x) {
res = res*10 + x%10;
x /= 10;
}
return (res<INT_MIN || res>INT_MAX) ? 0 : res;
}
};
涨知识~
0 0
- 7. Reverse Integer Easy
- 7. Reverse Integer [easy] (Python)
- 7. Reverse Integer (Easy)
- Easy-题目58:7. Reverse Integer
- Leetcode 7. Reverse Integer (Easy) (cpp)
- Reverse Integer [Easy]
- 【Leetcode】Reverse Integer(easy)
- Reverse Integer(EASY)
- 2.[easy] Reverse Integer
- [Leetcode 7, Easy] Reverse integer
- 【LeetCode】(7)Reverse Integer(Easy)
- Easy 7题 Reverse Integer
- LeetCode #7 - Reverse Integer - Easy
- Leet Code OJ 7. Reverse Integer [Difficulty: Easy]
- Leetcode解题笔记 7.Reverse Integer [Easy]
- Easy 2 Reverse Integer(7)
- Leetcode算法练习-easy篇-Reverse Integer
- LeetCode OJ 7 Reverse Integer [easy]
- spark sql与hive整合
- Wechat--小开发
- Unix网络编程——常见辅助函数总结
- centos7 修改host名
- [LeetCode] 269. Alien Dictionary 解题报告
- 7. Reverse Integer Easy
- 11,ListView+SpringView+网络数据统一处理+基类的抽取
- leetcode week2
- Android文件操作 —— 6.0之后文件操作
- git新手的几个必备命令
- 【剑指offer】面试题16:反转链表
- 【数据结构与算法】二维数组 最大矩形和
- 微信小程序拉下无法刷新问题
- 根据总页数制作的分页按钮,有跳转功能以及多页数的时候中间按钮显示...功能