1
0
mirror of https://gitee.com/coder-xiaomo/leetcode-problemset synced 2025-11-12 15:25:48 +08:00
Code Issues Projects Releases Wiki Activity GitHub Gitee
This commit is contained in:
2025-11-11 22:54:49 +08:00
parent 73ae78c4b4
commit 1ea1df8784
65 changed files with 17243 additions and 10240 deletions

View File

@@ -0,0 +1,35 @@
<p>You are given a <strong>positive</strong> integer <code>n</code>.</p>
<p>Return the integer obtained by removing all zeros from the decimal representation of <code>n</code>.</p>
<p>&nbsp;</p>
<p><strong class="example">Example 1:</strong></p>
<div class="example-block">
<p><strong>Input:</strong> <span class="example-io">n = 1020030</span></p>
<p><strong>Output:</strong> <span class="example-io">123</span></p>
<p><strong>Explanation:</strong></p>
<p>After removing all zeros from 1<strong><u>0</u></strong>2<strong><u>00</u></strong>3<strong><u>0</u></strong>, we get 123.</p>
</div>
<p><strong class="example">Example 2:</strong></p>
<div class="example-block">
<p><strong>Input:</strong> <span class="example-io">n = 1</span></p>
<p><strong>Output:</strong> <span class="example-io">1</span></p>
<p><strong>Explanation:</strong></p>
<p>1 has no zero in its decimal representation. Therefore, the answer is 1.</p>
</div>
<p>&nbsp;</p>
<p><strong>Constraints:</strong></p>
<ul>
<li><code>1 &lt;= n &lt;= 10<sup>15</sup></code></li>
</ul>