摘要:
http://oj.leetcode.com/problems/roman-to-integer/罗马数字到自然数字的转换,先自己查相关的背景知识,然后分析清楚了。可以简化写,嗯嗯。“简化”,抓到本质。#include #include #include using namespace std;class Solution {public: int change(char ch) { int num = 0; switch(ch) { case 'I': num = 1; break...
阅读全文