[Leetcode] 12. Integer to Roman

1 · Rain Hu · Oct. 26, 2022, 12:36 p.m.
12. Integer to Roman Hardness: \(\color{orange}\textsf{Medium}\) Ralated Topics: Hash Table、Math、String 一、題目 Roman numerals are represented by seven different symbols: I, V, X, L, C, D, and M. \(\boxed{\begin{array}{ll} \textbf{Symbol}&\textbf{Value}\\ \texttt{I}&1\\ \texttt{V}&5\\ \texttt{X}&10\\ \texttt{L}&50\\ \texttt{C}&100\\ \texttt{D}&500\\ \texttt{M}&1000\\ \end{array}}\) For example, 2 is written as II in Roman numeral, just two one’s added together. 12 is written as XII, which is simply...