mirror of
https://gitee.com/coder-xiaomo/leetcode-problemset
synced 2025-09-03 22:42:52 +08:00
存量题库数据更新
This commit is contained in:
@@ -10,7 +10,7 @@ C 100
|
||||
D 500
|
||||
M 1000</pre>
|
||||
|
||||
<p>For example, <code>2</code> is written as <code>II</code> in Roman numeral, just two one's added together. <code>12</code> is written as <code>XII</code>, which is simply <code>X + II</code>. The number <code>27</code> is written as <code>XXVII</code>, which is <code>XX + V + II</code>.</p>
|
||||
<p>For example, <code>2</code> is written as <code>II</code> in Roman numeral, just two ones added together. <code>12</code> is written as <code>XII</code>, which is simply <code>X + II</code>. The number <code>27</code> is written as <code>XXVII</code>, which is <code>XX + V + II</code>.</p>
|
||||
|
||||
<p>Roman numerals are usually written largest to smallest from left to right. However, the numeral for four is not <code>IIII</code>. Instead, the number four is written as <code>IV</code>. Because the one is before the five we subtract it making four. The same principle applies to the number nine, which is written as <code>IX</code>. There are six instances where subtraction is used:</p>
|
||||
|
||||
@@ -23,7 +23,7 @@ M 1000</pre>
|
||||
<p>Given a roman numeral, convert it to an integer.</p>
|
||||
|
||||
<p> </p>
|
||||
<p><strong>Example 1:</strong></p>
|
||||
<p><strong class="example">Example 1:</strong></p>
|
||||
|
||||
<pre>
|
||||
<strong>Input:</strong> s = "III"
|
||||
@@ -31,7 +31,7 @@ M 1000</pre>
|
||||
<strong>Explanation:</strong> III = 3.
|
||||
</pre>
|
||||
|
||||
<p><strong>Example 2:</strong></p>
|
||||
<p><strong class="example">Example 2:</strong></p>
|
||||
|
||||
<pre>
|
||||
<strong>Input:</strong> s = "LVIII"
|
||||
@@ -39,7 +39,7 @@ M 1000</pre>
|
||||
<strong>Explanation:</strong> L = 50, V= 5, III = 3.
|
||||
</pre>
|
||||
|
||||
<p><strong>Example 3:</strong></p>
|
||||
<p><strong class="example">Example 3:</strong></p>
|
||||
|
||||
<pre>
|
||||
<strong>Input:</strong> s = "MCMXCIV"
|
||||
|
Reference in New Issue
Block a user