1
0
mirror of https://gitee.com/coder-xiaomo/leetcode-problemset synced 2025-09-14 20:01:41 +08:00
Code Issues Projects Releases Wiki Activity GitHub Gitee

add leetcode problem-cn part3

This commit is contained in:
2022-03-27 20:46:41 +08:00
parent 6dafca13c5
commit dfacb20d31
1385 changed files with 115239 additions and 3 deletions

View File

@@ -0,0 +1,27 @@
<p>给你一个正整数 <code>n</code> ,请你找出符合条件的最小整数,其由重新排列 <code>n</code><strong> </strong>中存在的每位数字组成,并且其值大于 <code>n</code> 。如果不存在这样的正整数,则返回 <code>-1</code></p>
<p><strong>注意</strong> ,返回的整数应当是一个 <strong>32 位整数</strong> ,如果存在满足题意的答案,但不是 <strong>32 位整数</strong> ,同样返回 <code>-1</code></p>
<p> </p>
<p><strong>示例 1</strong></p>
<pre>
<strong>输入:</strong>n = 12
<strong>输出:</strong>21
</pre>
<p><strong>示例 2</strong></p>
<pre>
<strong>输入:</strong>n = 21
<strong>输出:</strong>-1
</pre>
<p> </p>
<p><strong>提示:</strong></p>
<ul>
<li><code>1 <= n <= 2<sup>31</sup> - 1</code></li>
</ul>