关于C语言中输入一个三位整数逆序输出一个三位数的方法
发布时间
阅读量:
阅读量
最初在LeetCode平台上练习编程时
最初在LeetCode平台上练习编程时
题目:
Given a 32-bit signed integer, reverse digits of an integer.
Example 1:
Input:Output:
Example 2:
Input:Output:
Example 3:
Input:Output:
Note:
We are considering an environment that is capable of storing integers confined within the 32-bit signed integer range, specifically spanning from −2³¹ to 2³¹ − 1. For this problem's context, we will assume that our function returns a value of zero whenever the reversed integer exceeds the permissible range.
_解题思路:那么我认为它是一个负整数的话是否需要考虑它的符号呢?是否需要判断它是不是三位数呢?接
全部评论 (0)
还没有任何评论哟~
