![](https://img-blog.csdnimg.cn/20201014180756923.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
leetcode
lyz_lucky
这个作者很懒,什么都没留下…
展开
-
12. Integer to Roman
题目: Given an integer, convert it to a roman numeral. Input is guaranteed to be within the range from 1 to 3999. 借鉴了别人的思路 知识点:罗马数字的表达,字符串合并 代码如下(C++): class Solution { public: string intTo原创 2017-08-10 16:47:56 · 149 阅读 · 0 评论 -
7. Reverse Integer
一,代码1如下: 结果:边界溢出??没有通过 int reverse(int x) { int y=abs(x); int z=y; int length=0; //x的长度 int num=0; //最后返回值的绝对值 int key=0; while(z>0) { length原创 2017-08-10 20:47:18 · 137 阅读 · 0 评论 -
7. Reverse Integer (2)
可以调通 int reverse(int x) { int y=abs(x); int z=y; int length=0; //x的长度 int num=0; //最后返回值的绝对值 int key=0; if(y==0) return num=0; int cuto原创 2017-08-10 21:08:16 · 162 阅读 · 0 评论