mirror of
https://gitee.com/coder-xiaomo/leetcode-problemset
synced 2025-09-13 19:31:42 +08:00
add leetcode problem-cn part3
This commit is contained in:
@@ -0,0 +1,34 @@
|
||||
<p>当且仅当每个相邻位数上的数字 <code>x</code> 和 <code>y</code> 满足 <code>x <= y</code> 时,我们称这个整数是<strong>单调递增</strong>的。</p>
|
||||
|
||||
<p>给定一个整数 <code>n</code> ,返回 <em>小于或等于 <code>n</code> 的最大数字,且数字呈 <strong>单调递增</strong></em> 。</p>
|
||||
|
||||
<p> </p>
|
||||
|
||||
<p><strong>示例 1:</strong></p>
|
||||
|
||||
<pre>
|
||||
<strong>输入:</strong> n = 10
|
||||
<strong>输出:</strong> 9
|
||||
</pre>
|
||||
|
||||
<p><strong>示例 2:</strong></p>
|
||||
|
||||
<pre>
|
||||
<strong>输入:</strong> n = 1234
|
||||
<strong>输出:</strong> 1234
|
||||
</pre>
|
||||
|
||||
<p><strong>示例 3:</strong></p>
|
||||
|
||||
<pre>
|
||||
<strong>输入:</strong> n = 332
|
||||
<strong>输出:</strong> 299
|
||||
</pre>
|
||||
|
||||
<p> </p>
|
||||
|
||||
<p><strong>提示:</strong></p>
|
||||
|
||||
<ul>
|
||||
<li><code>0 <= n <= 10<sup>9</sup></code></li>
|
||||
</ul>
|
Reference in New Issue
Block a user