[leetcode] 13. Roman to Integer (easy)
class Solution: def romanToInt(self, s: str) -> int: dict = {'I':1, 'V':5, 'X':10, 'L':50, 'C':100, 'D':500, 'M':1000} ans = 0 size = len(s) for i in range(size): if i I 1, V 5, X 10, L 50, C 100, D 500, M 1000 [풀이] 4, 9, 40, 90, 400, 9..