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
Files
leetcode-problemset/leetcode-cn/problem (Chinese)/移除十进制表示中的所有零 [remove-zeros-in-decimal-representation].html
2025-11-11 22:54:49 +08:00

38 lines
1.0 KiB
HTML
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
<p>给你一个<strong>正整数</strong><code>n</code></p>
<p>返回一个整数,该整数是将 <code>n</code> 的十进制表示中所有的零都移除后得到的结果。</p>
<p>&nbsp;</p>
<p><strong class="example">示例 1</strong></p>
<div class="example-block">
<p><strong>输入:</strong> <span class="example-io">n = 1020030</span></p>
<p><strong>输出:</strong> <span class="example-io">123</span></p>
<p><strong>解释:</strong></p>
<p>从 1<strong><u>0</u></strong>2<strong><u>00</u></strong>3<strong><u>0</u></strong> 中移除所有的零后,得到 123。</p>
</div>
<p><strong class="example">示例 2</strong></p>
<div class="example-block">
<p><strong>输入:</strong> <span class="example-io">n = 1</span></p>
<p><strong>输出:</strong> <span class="example-io">1</span></p>
<p><strong>解释:</strong></p>
<p>1 的十进制表示中没有零,因此结果为 1。</p>
</div>
<p>&nbsp;</p>
<p><strong>提示:</strong></p>
<ul>
<li><code>1 &lt;= n &lt;= 10<sup>15</sup></code></li>
</ul>