摘要:
# 将罗马数字转换成整型# class Solution:# def romanToInt(self, s):# d = {'I': 1, 'V': 5, 'X': 10, 'L': 50, 'C': 100, 'D': 500, 'M': 1000}# num = 0# for i in rang 阅读全文
摘要:
class Solution: def isPalindrome(self, x): if str(x).startswith('-'): return False else: a = str(x) b = a[::-1] if a == b: return True else: return Fa 阅读全文