1
0
mirror of https://gitee.com/coder-xiaomo/leetcode-problemset synced 2025-09-13 11:21:42 +08:00
Code Issues Projects Releases Wiki Activity GitHub Gitee

add leetcode problem-cn part6

This commit is contained in:
2022-03-27 20:56:26 +08:00
parent c11d601602
commit 08d1f2a596
1096 changed files with 88216 additions and 2 deletions

View File

@@ -0,0 +1,42 @@
<p>给你一个 32 位的有符号整数 <code>x</code> ,返回将 <code>x</code> 中的数字部分反转后的结果。</p>
<p>如果反转后整数超过 32 位的有符号整数的范围 <code>[2<sup>31</sup>,  2<sup>31 </sup> 1]</code> ,就返回 0。</p>
<strong>假设环境不允许存储 64 位整数(有符号或无符号)。</strong>
<p> </p>
<p><strong>示例 1</strong></p>
<pre>
<strong>输入:</strong>x = 123
<strong>输出:</strong>321
</pre>
<p><strong>示例 2</strong></p>
<pre>
<strong>输入:</strong>x = -123
<strong>输出:</strong>-321
</pre>
<p><strong>示例 3</strong></p>
<pre>
<strong>输入:</strong>x = 120
<strong>输出:</strong>21
</pre>
<p><strong>示例 4</strong></p>
<pre>
<strong>输入:</strong>x = 0
<strong>输出:</strong>0
</pre>
<p> </p>
<p><strong>提示:</strong></p>
<ul>
<li><code>-2<sup>31</sup> <= x <= 2<sup>31</sup> - 1</code></li>
</ul>