13. 羅馬數字轉整數

小的數在大的數的右邊,所表示的數等於這些數字相加得到的數,小的數在大的數的左邊,所表示的數等於大數減小數得到的數 class Solution: def romanToInt(self, s): """ :type s: str :rtype: int """ sum=0 convert={'M': 1000,'D': 500 ,'C': 1
相關文章
相關標籤/搜索