mirror of
https://gitee.com/coder-xiaomo/leetcode-problemset
synced 2025-09-06 16:01:41 +08:00
移除零宽空格
This commit is contained in:
@@ -6,7 +6,7 @@
|
||||
"boundTopicId": null,
|
||||
"title": "Maximum Value after Insertion",
|
||||
"titleSlug": "maximum-value-after-insertion",
|
||||
"content": "<p>You are given a very large integer <code>n</code>, represented as a string, and an integer digit <code>x</code>. The digits in <code>n</code> and the digit <code>x</code> are in the <strong>inclusive</strong> range <code>[1, 9]</code>, and <code>n</code> may represent a <b>negative</b> number.</p>\n\n<p>You want to <strong>maximize </strong><code>n</code><strong>'s numerical value</strong> by inserting <code>x</code> anywhere in the decimal representation of <code>n</code>. You <strong>cannot</strong> insert <code>x</code> to the left of the negative sign.</p>\n\n<ul>\n\t<li>For example, if <code>n = 73</code> and <code>x = 6</code>, it would be best to insert it between <code>7</code> and <code>3</code>, making <code>n = 763</code>.</li>\n\t<li>If <code>n = -55</code> and <code>x = 2</code>, it would be best to insert it before the first <code>5</code>, making <code>n = -255</code>.</li>\n</ul>\n\n<p>Return <em>a string representing the <strong>maximum</strong> value of </em><code>n</code><em> after the insertion</em>.</p>\n\n<p> </p>\n<p><strong class=\"example\">Example 1:</strong></p>\n\n<pre>\n<strong>Input:</strong> n = "99", x = 9\n<strong>Output:</strong> "999"\n<strong>Explanation:</strong> The result is the same regardless of where you insert 9.\n</pre>\n\n<p><strong class=\"example\">Example 2:</strong></p>\n\n<pre>\n<strong>Input:</strong> n = "-13", x = 2\n<strong>Output:</strong> "-123"\n<strong>Explanation:</strong> You can make n one of {-213, -123, -132}, and the largest of those three is -123.\n</pre>\n\n<p> </p>\n<p><strong>Constraints:</strong></p>\n\n<ul>\n\t<li><code>1 <= n.length <= 10<sup>5</sup></code></li>\n\t<li><code>1 <= x <= 9</code></li>\n\t<li>The digits in <code>n</code> are in the range <code>[1, 9]</code>.</li>\n\t<li><code>n</code> is a valid representation of an integer.</li>\n\t<li>In the case of a negative <code>n</code>, it will begin with <code>'-'</code>.</li>\n</ul>\n",
|
||||
"content": "<p>You are given a very large integer <code>n</code>, represented as a string, and an integer digit <code>x</code>. The digits in <code>n</code> and the digit <code>x</code> are in the <strong>inclusive</strong> range <code>[1, 9]</code>, and <code>n</code> may represent a <b>negative</b> number.</p>\n\n<p>You want to <strong>maximize </strong><code>n</code><strong>'s numerical value</strong> by inserting <code>x</code> anywhere in the decimal representation of <code>n</code>. You <strong>cannot</strong> insert <code>x</code> to the left of the negative sign.</p>\n\n<ul>\n\t<li>For example, if <code>n = 73</code> and <code>x = 6</code>, it would be best to insert it between <code>7</code> and <code>3</code>, making <code>n = 763</code>.</li>\n\t<li>If <code>n = -55</code> and <code>x = 2</code>, it would be best to insert it before the first <code>5</code>, making <code>n = -255</code>.</li>\n</ul>\n\n<p>Return <em>a string representing the <strong>maximum</strong> value of </em><code>n</code><em> after the insertion</em>.</p>\n\n<p> </p>\n<p><strong class=\"example\">Example 1:</strong></p>\n\n<pre>\n<strong>Input:</strong> n = "99", x = 9\n<strong>Output:</strong> "999"\n<strong>Explanation:</strong> The result is the same regardless of where you insert 9.\n</pre>\n\n<p><strong class=\"example\">Example 2:</strong></p>\n\n<pre>\n<strong>Input:</strong> n = "-13", x = 2\n<strong>Output:</strong> "-123"\n<strong>Explanation:</strong> You can make n one of {-213, -123, -132}, and the largest of those three is -123.\n</pre>\n\n<p> </p>\n<p><strong>Constraints:</strong></p>\n\n<ul>\n\t<li><code>1 <= n.length <= 10<sup>5</sup></code></li>\n\t<li><code>1 <= x <= 9</code></li>\n\t<li>The digits in <code>n</code> are in the range <code>[1, 9]</code>.</li>\n\t<li><code>n</code> is a valid representation of an integer.</li>\n\t<li>In the case of a negative <code>n</code>, it will begin with <code>'-'</code>.</li>\n</ul>\n",
|
||||
"translatedTitle": null,
|
||||
"translatedContent": null,
|
||||
"isPaidOnly": false,
|
||||
|
Reference in New Issue
Block a user