http://oj.leetcode.com/problems/roman-to-integer/
Given a roman numeral, convert it to an integer.
Input is guaranteed to be within the range from 1 to 3999.
思路:
根据个十百千位分别作为一个状态机处理就可以了。
1 class Solution { 2 public: 3 int romanToInt(string s) { 4 int val = 0, mul = 0; 5 char one, five, ten; 6 const char *p = s.c_str(); 7 8 while (*p != '