随笔分类 - leetcode-easy
摘要:题目链接:https://leetcode.cn/problems/roman-to-integer/ 题目描述:将给定的罗马数字转化为整数 思路:一般的罗马数字都是从左到右依次变小,但是有几种情况小的罗马数字在左边,例如IV(4),I在V的左边,此时我们可以看作I表示的是一个负值,减去I的值就好。
阅读全文
摘要:题目链接:https://leetcode.com/problems/palindrome-number/ 参考链接:https://leetcode.cn/problems/palindrome-number/solution/hui-wen-shu-by-leetcode-solution/ 题
阅读全文